142. Counting Principle
Count the total number of possible outcomes in a multi-step process
- The first stage has possible outcomes,
- The second stage has possible outcomes,
- …
- The k-th stage has possible outcomes
then the total number of outcomes is:
Permutations
Number of -element subsets of a given -element set
Because :
| Ordering elements |
|
| Ordering out of |
|
| Choosing and ordering out of |
|
| Number of subsets of |
|
| Sequences of length from choices |
|
Example
Find the probability that 6 rolls of a fair 6-sided die all give different numbers
- Total outcomes for 6 rolls:
- Favorable outcomes (all numbers different):
Therefore:
Combination
Definition: Number of -element subsets of a given -element set
Two ways to construct an ordered sequence of distinct items:
- Choose the items one at a time
- Choose items, then order them