Counting Techniques: Permutations and Combinations
Guessing someone's 4-digit phone passcode is a 1-in-10,000 shot. Winning the Powerball jackpot is about 1 in 292 million. Both numbers come from counting, and the two counts work very differently. In AP Statistics, whenever outcomes are equally likely, a probability is $\dfrac{\text{favorable outcomes}}{\text{total outcomes}}$, so you need to count both pieces without listing them. This page gives you the tools to do that.
The Fundamental Counting Principle
Most counting problems build an outcome in stages: pick a first digit, then a second digit, and so on. Draw one slot per stage and write how many choices each slot has.
Rule of thumb: "stage and stage" means multiply. "Case or case" (cases that cannot happen together) means add.
To celebrate the end of the school year, a group of friends decides to go for dinner at a restaurant that offers a set menu. The students must choose an appetizer from 4…
To celebrate the end of the school year, a group of friends decides to go for dinner at a restaurant that offers a set menu. The students must choose an appetizer from 4 possible ones, a main course from 5 options, and a dessert from a list of 3. In how many different ways can a student configure their dinner menu?
A high school student wants to create a secure password for their new profile on a social network. The password must have exactly 4 numerical digits (from $0$ to $9$).…
A high school student wants to create a secure password for their new profile on a social network. The password must have exactly 4 numerical digits (from $0$ to $9$). If numbers are allowed to be repeated, how many different code combinations could they generate?
A new online banking service requires its users to create a personalized security code. The code must consist of exactly 4 digits followed by 2 letters (using the 26…
A new online banking service requires its users to create a personalized security code. The code must consist of exactly 4 digits followed by 2 letters (using the 26 letters of the English alphabet).
Calculate how many different codes can be generated in the following scenarios:
- a) The digits can be repeated, but the letters must be different.
- b) Both the digits and the letters can be repeated, but the first digit cannot be zero and the last letter must be a vowel ($A, E, I, O, U$).
Factorials and Arranging Everything
How many ways can you order 5 different books on a shelf? The first spot has 5 choices, the second 4 (one book is already used), then 3, 2, 1.
| $n$ | 3 | 4 | 5 | 6 | 7 | 8 | 10 |
|---|---|---|---|---|---|---|---|
| $n!$ | 6 | 24 | 120 | 720 | 5,040 | 40,320 | 3,628,800 |
In the school library, a student has selected 5 different literature books and wants to place them on a shelf in their room. In how many different ways can they order…
In the school library, a student has selected 5 different literature books and wants to place them on a shelf in their room. In how many different ways can they order them from left to right?
How many 5-letter words, with or without meaning, can be formed by permuting the letters of the word $LIBRO$? And what if all the words had to start with the letter $L$?
How many 5-letter words, with or without meaning, can be formed by permuting the letters of the word $LIBRO$? And what if all the words had to start with the letter $L$?
For the group stage of an academic debate tournament, the speeches of 8 different schools must be organized. The organizing team has decided that the opening debate will…
For the group stage of an academic debate tournament, the speeches of 8 different schools must be organized. The organizing team has decided that the opening debate will always be held by Athena Academy and the closing debate will be concluded by Newton High School.
In how many different ways can the order of speeches of the remaining 6 schools be configured to complete the tournament program?
Ordering Some of the Objects: ${}_nP_r$
Often you don't arrange everyone, only $r$ of $n$ objects, and the order matters: gold, silver, and bronze medals, or president, vice president, and treasurer.
Some problems write ${}_nP_r$ as $V_{n,k}$ and call it "permutations of $n$ elements taken $k$ at a time". It is the same thing. On a TI-84, use MATH → PRB → nPr.
8 players participate in an esports competition. If only the top three classified players are awarded gold, silver, and bronze medals, respectively, how many different…
8 players participate in an esports competition. If only the top three classified players are awarded gold, silver, and bronze medals, respectively, how many different podiums can be formed at the end of the tournament? Bear in mind that the order in which the players finish does determine the type of medal.
Solve the following combinatorial equation with reasoning to find the value of $n$: $$V_{n, 3} = 5 \cdot V_{n, 2}$$ Knowing that $V_{n, k}$ represents the permutations…
Solve the following combinatorial equation with reasoning to find the value of $n$:
$$V_{n, 3} = 5 \cdot V_{n, 2}$$Knowing that $V_{n, k}$ represents the permutations of $n$ elements taken $k$ at a time, $k$.
Identical Objects, Circles, and Blocks
Three common twists change the factorial count.
Identical objects
If some objects are indistinguishable, swapping them gives the same arrangement, so you divide out those swaps.
Circular arrangements
Around a round table, only who sits next to whom matters. Rotating everyone one seat gives the same seating. Fix one person in place as a reference, then arrange the rest: $n$ people around a table can be seated in $(n-1)!$ ways.
Blocks
If some objects must stay together, glue them into one block. Arrange the units, then arrange the objects inside each block. If two objects must not be together, count all arrangements and subtract those where they are together.
On a shelf in a home decor shop, they want to place in a row 9 vases identical in shape but of different colors: 4 white vases, 3 blue vases, and 2 silver vases. In how…
On a shelf in a home decor shop, they want to place in a row 9 vases identical in shape but of different colors: 4 white vases, 3 blue vases, and 2 silver vases.
In how many different ways can these 9 vases be lined up on the shelf?
Eight friends, including a couple, go to dinner at a Japanese restaurant and are assigned a circular table. 1. In how many ways can they sit at the table if the couple…
Eight friends, including a couple, go to dinner at a Japanese restaurant and are assigned a circular table.
-
In how many ways can they sit at the table if the couple wants to sit together?
-
If after dinner they have a falling out and decide that at the movie theater (where they have 8 seats in a row) they do not want to sit together nor have anyone between them (that is, there must be at least one empty seat or another person separating them, but never adjacent seats), in how many ways can the eight friends sit in the row of seats?
A digital marketing team is designing an advertising campaign for a well-known sneaker brand. For a photo shoot, they must place their 10 star collaborators in a line: 3…
A digital marketing team is designing an advertising campaign for a well-known sneaker brand. For a photo shoot, they must place their 10 star collaborators in a line: 3 photographers, 4 video editors, and 3 creative writers (copywriters). Determine in how many ways they can pose for the photo if the following conditions must be met simultaneously:
-
Professionals in the same category must always be together.
-
The main photographer and the chief writer cannot be at the ends of the total formation.
Combinations: When Order Doesn't Matter
Choosing 2 delegates from Ana, Ben, and Cara is different from choosing a president and a vice president. If order doesn't matter, the pair $\{A, B\}$ and the pair $\{B, A\}$ are the same group.
Two useful facts: $\binom{n}{r} = \binom{n}{n-r}$ (choosing who is in is the same as choosing who is out), and $\binom{n}{0} = \binom{n}{n} = 1$.
Arrange the values of $\binom{n}{r}$ by rows and you get Pascal's triangle: each entry is the sum of the two above it.
An ice cream parlor offers 12 different ice cream flavors. If we want to buy a tub with 2 scoops of different flavors, how many possible ice cream combinations can we…
An ice cream parlor offers 12 different ice cream flavors. If we want to buy a tub with 2 scoops of different flavors, how many possible ice cream combinations can we choose? Consider that the order in which the scoops are placed in the tub does not change the final product.
A basketball coach has 10 players on the roster for a game. If for the tip-off they must choose a starting lineup of 5 players and the specific position each one…
A basketball coach has 10 players on the roster for a game. If for the tip-off they must choose a starting lineup of 5 players and the specific position each one occupies at that moment does not matter, how many different starting teams can they present?
A senior class has to choose a student committee made up of 3 students. If there are 25 students in the class and all are eligible, how many different groups of 3 people…
A senior class has to choose a student committee made up of 3 students. If there are 25 students in the class and all are eligible, how many different groups of 3 people can be formed? Reason whether or not the order of selection of the members matters in this case.
Combining Counts and Splitting into Groups
Many problems choose from several categories at once. Choose from each category, then multiply. For "at least" conditions, split into cases and add.
Splitting into groups
To split people into groups, fill the groups one at a time with combinations. If the groups are unlabeled, divide by the number of ways to reorder identical groups.
A chef is designing a tasting menu for a gala dinner. The menu must consist of 3 appetizers, 2 main courses, and 2 desserts. If in their recipe book they have 6…
A chef is designing a tasting menu for a gala dinner. The menu must consist of 3 appetizers, 2 main courses, and 2 desserts.
If in their recipe book they have 6 appetizer options, 4 main course options, and 3 dessert options, how many different menu combinations can they offer their customers?
In a video game development company, the art department has a staff of 12 designers, of which 7 are experts in 3D modeling and 5 are experts in texture design. For a new…
In a video game development company, the art department has a staff of 12 designers, of which 7 are experts in 3D modeling and 5 are experts in texture design.
For a new project, a work team consisting of 4 designers must be chosen. In how many ways can the team be chosen if it is required that there are at least two experts in 3D modeling?
A quick pickleball tournament is to be organized with 12 students from a class. The teacher wants to form 6 different pairs. 1. In how many ways can the 6 pairs be…
A quick pickleball tournament is to be organized with 12 students from a class. The teacher wants to form 6 different pairs.
-
In how many ways can the 6 pairs be formed if the order of the pairs and the order of the players within each pair do not matter?
-
If among the students there are 4 who are advanced level players and the teacher decides that each of them must be in a different pair (to balance the level), in how many ways can the pairs be formed now?
Restrictions and the Complement
When a problem has a restriction, you have three tools.
-
Fill the restricted slot first.
-
Complement: count everything, then subtract the outcomes you don't want.
-
Cases: split by what happens at the key position.
A blitz chess tournament is going to be held in a youth center. At the end of the qualifying phase, there are 10 players left. The organization must award three…
A blitz chess tournament is going to be held in a youth center. At the end of the qualifying phase, there are 10 players left. The organization must award three different trophies: one to the champion, another to the runner-up, and a third to the third-place finisher. In addition, a participation medal will be awarded to the remaining 7 players.
- a) In how many ways can the three main trophies be distributed?
- b) If among the 10 finalists there is a pair of siblings and we want to know in how many of those classifications the two siblings receive a trophy (regardless of which one it is).
To access a VIP area of a music festival, attendees must generate a 7-character personal code. The organization's rules are strict to prevent hacking: The first 3…
To access a VIP area of a music festival, attendees must generate a 7-character personal code. The organization's rules are strict to prevent hacking:
-
The first 3 characters must be different capital letters (from a 26-letter alphabet).
-
The remaining 4 characters must be digits from $0$ to $9$, which can be repeated.
-
Additional restriction: The code is not valid if the three central digits of the numerical block are equal to each other (for example, ABC-1222 or ABC-5550 would not be valid, but ABC-5505 would be).
Calculate how many different codes can be created under these conditions.
14 players participate in a school esports league. A committee of 5 representatives must be selected for the national federation. Among the 14 players, there is a pair…
14 players participate in a school esports league. A committee of 5 representatives must be selected for the national federation. Among the 14 players, there is a pair of siblings who do not get along at all and have declared that they will not be part of the committee if the other is also chosen. Furthermore, there must be at least one representative of the 3 most experienced players on the committee. In how many different ways can the 5-person committee be chosen?
Choosing with Repeats: Stars and Bars
At a donut shop with 4 varieties, you can buy 6 donuts and repeat varieties. The order of the donuts in the box doesn't matter, but now the same variety can be chosen again. This is a combination with repetition.
Draw each donut as a star and use bars to separate the varieties.
Limits on how many go in each place
Place the objects that create "gaps" first, then drop the others into the gaps.
An ice cream parlor offers its customers the possibility of creating a "Special Cup" by choosing 3 scoops of ice cream from its 15 available flavors. a) If a customer…
An ice cream parlor offers its customers the possibility of creating a "Special Cup" by choosing 3 scoops of ice cream from its 15 available flavors.
- a) If a customer wants the 3 scoops to be of different flavors, how many different cups can they create?
- b) If the customer is an enthusiast of a particular flavor and allows the scoops to be of the same flavor (that is, they can repeat flavors), how many cup combinations are possible now?
Three friends have won a raffle for 12 identical tickets to a theme park and decide to share them among themselves. 1. In how many ways can the tickets be shared if each…
Three friends have won a raffle for 12 identical tickets to a theme park and decide to share them among themselves.
-
In how many ways can the tickets be shared if each must receive at least one?
-
And what if they decide that the distribution should be such that one of the friends (the one who bought the raffle ticket) always receives more tickets than the other two combined?
A messaging application uses an encryption system based on 12-bit binary sequences (zeros and ones). For reasons of algorithm efficiency, each sequence is required to…
A messaging application uses an encryption system based on 12-bit binary sequences (zeros and ones). For reasons of algorithm efficiency, each sequence is required to meet two properties:
-
It must contain exactly six zeros and six ones.
-
Critical condition: There cannot be three or more consecutive ones anywhere in the sequence.
Calculate the number of valid sequences that this system can generate.
The Binomial Theorem
When you expand $(a+b)^n$, you multiply $n$ factors of $(a+b)$. Each term comes from picking either $a$ or $b$ from each factor. The term $a^{n-k}b^k$ arises when $b$ is picked from exactly $k$ of the $n$ factors, and that can happen in $\binom{n}{k}$ ways.
To find a specific term, write the general term, simplify the exponent of $x$, and solve for $k$. If the solution is not a whole number from $0$ to $n$, there is no such term.
Consider the binomial expansion for the expression: $$\left( 3x^3 - \frac{1}{2x^2} \right)^{15}$$ Without expanding the whole power, calculate: 1. The value of the…
Consider the binomial expansion for the expression:
$$\left( 3x^3 - \frac{1}{2x^2} \right)^{15}$$Without expanding the whole power, calculate:
-
The value of the coefficient of the term containing $x^{20}$.
-
Determine with reasoning if there is any term independent of $x$ in this expansion. If so, indicate its position.
Back to the start: A 4-digit passcode is 4 slots with 10 choices each (digits may repeat, and order matters), so $10^4 = 10{,}000$ codes. A Powerball ticket is 5 different white balls out of 69, where order doesn't matter, and 1 red ball out of 26. That is $\binom{69}{5} \cdot 26 = 11{,}238{,}513 \cdot 26 = 292{,}201{,}338$ tickets, so one ticket has a $\dfrac{1}{292{,}201{,}338}$ chance of winning the jackpot.