Permutations and Combinations
When order matters—and when it doesn't
You have probably faced decisions like these: Which three friends should you invite to a concert when you have four tickets? In what order should you tackle your homework assignments? How many different ways could you arrange your bookshelf? These questions might seem casually different, but they share a crucial mathematical distinction: sometimes the order of your choices matters, and sometimes it does not.
If you are choosing three people for a relay race and assigning them to run first, second, and third, then order matters. The team “Alice first, Bob second, Carol third” is different from “Carol first, Alice second, Bob third” even though it is the same three people.
But if you are just choosing three people to be on a committee where everyone has equal status, then order does not matter. The committee {Alice, Bob, Carol} is the same whether you picked Alice first or last.
This distinction is the heart of permutations and combinations. Once you learn to recognize which type of problem you are facing, the calculations follow naturally.
Core Concepts
The Key Question: Does Order Matter?
Before diving into formulas, train yourself to ask one question whenever you encounter a counting problem: Does the order of selection matter?
- Order matters: You are creating an arrangement where position or sequence is important. These are called permutations.
- Order does not matter: You are making a selection where only the members matter, not their order. These are called combinations.
Here are some quick examples to build your intuition:
| Situation | Does order matter? | Type |
|---|---|---|
| Choosing a president, VP, and treasurer from 10 candidates | Yes (different roles) | Permutation |
| Choosing 3 people for a committee from 10 candidates | No (all equal members) | Combination |
| Arranging 5 books on a shelf | Yes (different positions) | Permutation |
| Selecting 5 books to bring on vacation | No (just which books) | Combination |
| Creating a 4-digit PIN | Yes (1234 differs from 4321) | Permutation |
| Choosing 4 pizza toppings | No (same pizza either way) | Combination |
| Ranking your top 3 favorite movies | Yes (1st differs from 3rd) | Permutation |
| Choosing 3 movies to watch this weekend | No (just which ones) | Combination |
Permutations: When Order Matters
A permutation is an arrangement of objects where the order is significant. When you select $r$ objects from a set of $n$ objects and arrange them in a specific order, you are counting permutations.
The Permutation Formula
Recall from counting principles that if you have $n$ objects and want to arrange all of them, there are $n!$ ways. But what if you only want to arrange some of them?
Suppose you have 10 people and want to select 3 of them for 1st, 2nd, and 3rd place. How many ways can this be done?
- First place: 10 choices
- Second place: 9 choices (one person already selected)
- Third place: 8 choices (two people already selected)
Total: $10 \times 9 \times 8 = 720$ ways.
This can be written more elegantly using factorials:
$$P(n, r) = \frac{n!}{(n-r)!}$$
Let us verify: $P(10, 3) = \frac{10!}{(10-3)!} = \frac{10!}{7!}$
Since $10! = 10 \times 9 \times 8 \times 7!$, we get:
$$P(10, 3) = \frac{10 \times 9 \times 8 \times 7!}{7!} = 10 \times 9 \times 8 = 720$$
The formula works by canceling out the “unused” factors in the factorial.
Why this formula makes sense: You have $n$ choices for the first position, $n-1$ for the second, $n-2$ for the third, and so on until you have filled $r$ positions. This product of $r$ consecutive decreasing numbers starting from $n$ equals $\frac{n!}{(n-r)!}$.
Permutations of All Objects
When you arrange all $n$ objects (meaning $r = n$), the formula simplifies:
$$P(n, n) = \frac{n!}{(n-n)!} = \frac{n!}{0!} = \frac{n!}{1} = n!$$
This confirms what you already knew: arranging all $n$ distinct objects yields $n!$ permutations.
Permutations with Repetition
What if you can use the same item more than once? If you are choosing $r$ items from $n$ options and repetition is allowed, then:
$$n^r$$
For example, a 4-digit PIN using digits 0-9 (repetition allowed) has $10^4 = 10,000$ possibilities.
This is different from the permutation formula because you always have $n$ choices at each step, not a decreasing number of choices.
Combinations: When Order Does Not Matter
A combination is a selection of objects where the order does not matter. When you select $r$ objects from $n$ objects and only care about which objects are chosen (not their arrangement), you are counting combinations.
The Combination Formula
Let us return to our 10-person example. If you are choosing 3 people for a committee (no assigned roles), how many ways can this be done?
From the permutation calculation, we know there are 720 ways to choose 3 people for distinct 1st, 2nd, and 3rd positions. But for a committee, the group {Alice, Bob, Carol} is the same regardless of the order we picked them. How many times did we count this same committee?
The 3 people can be arranged among themselves in $3! = 6$ ways:
- Alice, Bob, Carol
- Alice, Carol, Bob
- Bob, Alice, Carol
- Bob, Carol, Alice
- Carol, Alice, Bob
- Carol, Bob, Alice
So every committee was counted 6 times in our permutation calculation. To get the correct count, we divide:
$$\frac{720}{6} = 120 \text{ committees}$$
This leads to the combination formula:
$$C(n, r) = \binom{n}{r} = \frac{n!}{r!(n-r)!}$$
The notation $\binom{n}{r}$ is read as “n choose r.”
Let us verify: $\binom{10}{3} = \frac{10!}{3! \times 7!} = \frac{10 \times 9 \times 8 \times 7!}{6 \times 7!} = \frac{720}{6} = 120$
The relationship between permutations and combinations:
$$C(n, r) = \frac{P(n, r)}{r!}$$
This makes intuitive sense: combinations equal permutations divided by the number of ways to arrange the selected items (because we do not care about that arrangement).
Special Properties of Combinations
Symmetry: $\binom{n}{r} = \binom{n}{n-r}$
Choosing $r$ objects to include is the same as choosing $n-r$ objects to exclude.
For example: $\binom{10}{3} = \binom{10}{7} = 120$
Choosing 3 people for a committee is equivalent to choosing 7 people to not be on the committee.
Boundary cases:
- $\binom{n}{0} = 1$ (there is exactly one way to choose nothing)
- $\binom{n}{n} = 1$ (there is exactly one way to choose everything)
- $\binom{n}{1} = n$ (there are $n$ ways to choose one item)
Deciding Between Permutations and Combinations
Here is a systematic approach:
-
Identify what you are selecting from: How many objects in total? This is your $n$.
-
Identify how many you are selecting: How many objects are you choosing? This is your $r$.
-
Ask: Would rearranging my selection create a different outcome?
- If YES, use permutations: $P(n, r) = \frac{n!}{(n-r)!}$
- If NO, use combinations: $C(n, r) = \frac{n!}{r!(n-r)!}$
-
Check for repetition: Can you select the same item more than once?
- If YES (with order mattering), use $n^r$
- If YES (without order mattering), the formula is more complex (covered in advanced courses)
Common keywords that suggest permutations: arrange, order, rank, first/second/third, sequence, assign to positions, schedule, password, code.
Common keywords that suggest combinations: choose, select, pick, group, committee, team, hand (in cards), subset.
Pascal’s Triangle Connection
There is a beautiful pattern connecting combinations called Pascal’s Triangle. Each entry in the triangle equals a combination:
Row 0: 1 (n=0)
Row 1: 1 1 (n=1)
Row 2: 1 2 1 (n=2)
Row 3: 1 3 3 1 (n=3)
Row 4: 1 4 6 4 1 (n=4)
Row 5: 1 5 10 10 5 1 (n=5)
Row 6: 1 6 15 20 15 6 1 (n=6)
The entry in row $n$, position $r$ (counting from 0) equals $\binom{n}{r}$.
For example, in row 6, position 2: $\binom{6}{2} = 15$.
The key pattern: Each entry is the sum of the two entries directly above it.
$$\binom{n}{r} = \binom{n-1}{r-1} + \binom{n-1}{r}$$
This is called Pascal’s Identity, and it makes sense: to choose $r$ items from $n$, you either include a specific item (then choose $r-1$ from the remaining $n-1$) or exclude it (then choose all $r$ from the remaining $n-1$).
Applications to Probability
Permutations and combinations are essential tools for probability calculations. Remember:
$$P(\text{event}) = \frac{\text{Number of favorable outcomes}}{\text{Total number of possible outcomes}}$$
Often, both the numerator and denominator require counting using permutations or combinations.
Key insight: When selecting items randomly (where each selection is equally likely), use the same counting method for both favorable and total outcomes.
For example, if you randomly deal 5 cards from a deck, the total number of possible hands is $\binom{52}{5}$ (order does not matter for a hand). The number of favorable outcomes also uses combinations.
Notation and Terminology
| Term | Meaning | Example |
|---|---|---|
| Permutation | Ordered arrangement | Ranking 3 winners from 10 |
| $P(n,r)$ or $_nP_r$ | Permutations of $r$ from $n$ | $P(10,3) = 720$ |
| Combination | Unordered selection | Choosing 3 people from 10 |
| $C(n,r)$ or $\binom{n}{r}$ | Combinations of $r$ from $n$ | $\binom{10}{3} = 120$ |
| “n choose r” | Spoken form of $\binom{n}{r}$ | “10 choose 3” equals 120 |
| $n!$ | n factorial | $5! = 120$ |
| With replacement | Items can be selected more than once | Drawing a card, replacing it, drawing again |
| Without replacement | Items can only be selected once | Dealing cards from a deck |
Examples
You have 8 different books and want to arrange 3 of them on a small shelf. How many different arrangements are possible?
Solution:
This is a permutation problem because the arrangement matters. A shelf with “Mystery, Romance, Sci-Fi” is different from “Sci-Fi, Romance, Mystery.”
We are selecting $r = 3$ books from $n = 8$ books, where order matters.
$$P(8, 3) = \frac{8!}{(8-3)!} = \frac{8!}{5!}$$
Simplify by expanding: $$P(8, 3) = \frac{8 \times 7 \times 6 \times 5!}{5!} = 8 \times 7 \times 6 = 336$$
There are 336 different arrangements of 3 books from 8 on the shelf.
Alternative calculation: Think step by step.
- First position: 8 choices
- Second position: 7 remaining choices
- Third position: 6 remaining choices
- Total: $8 \times 7 \times 6 = 336$
A club has 12 members. In how many ways can a 4-person team be selected to attend a conference?
Solution:
This is a combination problem because the selection does not have any order or assigned roles. The team {Ali, Bo, Chen, Dana} is the same team regardless of the order in which they were chosen.
We are selecting $r = 4$ members from $n = 12$ members, where order does not matter.
$$\binom{12}{4} = \frac{12!}{4!(12-4)!} = \frac{12!}{4! \times 8!}$$
Simplify: $$\binom{12}{4} = \frac{12 \times 11 \times 10 \times 9}{4 \times 3 \times 2 \times 1} = \frac{11,880}{24} = 495$$
There are 495 ways to select the 4-person team.
Verification using symmetry: $\binom{12}{4} = \binom{12}{8}$ because choosing 4 to go is the same as choosing 8 to stay.
Determine whether each situation involves permutations or combinations, then calculate the answer.
a) How many ways can a DJ arrange 5 songs from a playlist of 20? b) How many ways can you choose 5 songs from a playlist of 20 to add to a new playlist? c) How many ways can 7 students line up for a photo? d) How many 5-card poker hands can be dealt from a standard 52-card deck?
Solution:
a) Arranging songs: Order matters because the sequence of songs is different. This is a permutation. $$P(20, 5) = \frac{20!}{15!} = 20 \times 19 \times 18 \times 17 \times 16 = 1,860,480$$
b) Choosing songs: Order does not matter because you are just selecting which songs to include. This is a combination. $$\binom{20}{5} = \frac{20!}{5! \times 15!} = \frac{20 \times 19 \times 18 \times 17 \times 16}{120} = \frac{1,860,480}{120} = 15,504$$
c) Lining up for a photo: Order matters because different positions create different arrangements. This is a permutation of all 7 students. $$P(7, 7) = 7! = 5,040$$
d) Poker hands: Order does not matter because a hand is the same regardless of the order the cards were dealt. This is a combination. $$\binom{52}{5} = \frac{52!}{5! \times 47!} = \frac{52 \times 51 \times 50 \times 49 \times 48}{120} = 2,598,960$$
Notice: In parts (a) and (b), we have the same $n$ and $r$, but the permutation count (1,860,480) is much larger than the combination count (15,504). The ratio is $5! = 120$, exactly as the formulas predict.
In a lottery, you choose 6 numbers from 1 to 49. The order in which you pick them does not matter. What is the probability of matching all 6 winning numbers?
Solution:
Step 1: Count total possible outcomes.
Since order does not matter, this is a combination problem. The total number of ways to choose 6 numbers from 49 is:
$$\binom{49}{6} = \frac{49!}{6! \times 43!} = \frac{49 \times 48 \times 47 \times 46 \times 45 \times 44}{6!}$$
Calculate the numerator: $49 \times 48 \times 47 \times 46 \times 45 \times 44 = 10,068,347,520$
Calculate the denominator: $6! = 720$
$$\binom{49}{6} = \frac{10,068,347,520}{720} = 13,983,816$$
Step 2: Count favorable outcomes.
There is exactly 1 way to match all 6 winning numbers (you must pick those exact 6 numbers).
Step 3: Calculate probability.
$$P(\text{jackpot}) = \frac{1}{13,983,816} \approx 0.0000000715$$
That is about 1 in 14 million, or roughly 0.000007%.
To put this in perspective, you are more likely to be struck by lightning multiple times in your life than to win this lottery.
A club has 15 members (9 seniors and 6 juniors). They need to form a 5-person committee with a chairperson and a secretary (the other 3 members have no special role). In how many ways can this be done if: a) There are no restrictions? b) The chairperson must be a senior?
Solution:
This problem involves both concepts: selecting committee members (combination) and assigning roles (permutation).
Part a) No restrictions:
Method 1: Choose members, then assign roles.
- Choose 5 members from 15: $\binom{15}{5} = 3,003$
- From those 5, choose a chairperson: 5 ways
- From the remaining 4, choose a secretary: 4 ways
- Total: $3,003 \times 5 \times 4 = 60,060$
Method 2: Assign roles first, then choose remaining members.
- Choose chairperson from 15: 15 ways
- Choose secretary from remaining 14: 14 ways
- Choose 3 regular members from remaining 13: $\binom{13}{3} = 286$
- Total: $15 \times 14 \times 286 = 60,060$
Both methods give 60,060 ways.
Part b) Chairperson must be a senior:
Using Method 2:
- Choose chairperson from 9 seniors: 9 ways
- Choose secretary from remaining 14 members: 14 ways
- Choose 3 regular members from remaining 13: $\binom{13}{3} = 286$
- Total: $9 \times 14 \times 286 = 36,036$
There are 36,036 ways to form the committee with a senior chairperson.
Verification: The fraction $\frac{36,036}{60,060} = \frac{9}{15} = \frac{3}{5}$ makes sense because 9 out of 15 members are seniors, and each member is equally likely to be chairperson in a random selection.
In 5-card poker, a “full house” consists of three cards of one rank and two cards of another rank (for example, three Kings and two 7s). What is the probability of being dealt a full house?
Solution:
Step 1: Count total possible 5-card hands.
$$\text{Total hands} = \binom{52}{5} = 2,598,960$$
Step 2: Count full house hands.
A full house requires:
- Choose the rank for the three-of-a-kind (e.g., Kings): 13 choices
- Choose 3 suits from 4 for that rank: $\binom{4}{3} = 4$ ways
- Choose the rank for the pair (must be different): 12 remaining choices
- Choose 2 suits from 4 for that rank: $\binom{4}{2} = 6$ ways
$$\text{Full houses} = 13 \times 4 \times 12 \times 6 = 3,744$$
Step 3: Calculate probability.
$$P(\text{full house}) = \frac{3,744}{2,598,960} = \frac{6}{4,165} \approx 0.00144$$
The probability of being dealt a full house is about 0.144%, or roughly 1 in 694.
Note: We use combinations throughout because the order of cards in a hand does not matter. Whether the three Kings are dealt first or last, it is the same hand.
Key Properties and Rules
Permutation Formulas
Permutations of $r$ items from $n$ (without repetition): $$P(n, r) = \frac{n!}{(n-r)!} = n \times (n-1) \times (n-2) \times \cdots \times (n-r+1)$$
Permutations of all $n$ items: $$P(n, n) = n!$$
Permutations with repetition allowed: $$n^r$$
Combination Formulas
Combinations of $r$ items from $n$: $$C(n, r) = \binom{n}{r} = \frac{n!}{r!(n-r)!}$$
Relationship to permutations: $$\binom{n}{r} = \frac{P(n, r)}{r!}$$
Key Properties
Symmetry: $$\binom{n}{r} = \binom{n}{n-r}$$
Pascal’s Identity: $$\binom{n}{r} = \binom{n-1}{r-1} + \binom{n-1}{r}$$
Sum of a row in Pascal’s Triangle: $$\binom{n}{0} + \binom{n}{1} + \binom{n}{2} + \cdots + \binom{n}{n} = 2^n$$
Boundary values: $$\binom{n}{0} = \binom{n}{n} = 1$$ $$\binom{n}{1} = \binom{n}{n-1} = n$$
Decision Guide
| Question | If YES | If NO |
|---|---|---|
| Does order/arrangement matter? | Permutation | Combination |
| Can items be repeated? | Use $n^r$ (if order matters) | Use standard formulas |
| Are there assigned positions/roles? | Permutation | Combination |
| Does rearranging give a different outcome? | Permutation | Combination |
Real-World Applications
Lottery and Gambling Odds
Lotteries are pure combination problems. When Powerball asks you to choose 5 numbers from 69 (plus a Powerball from 26), the odds against winning the jackpot are calculated using combinations:
$$\binom{69}{5} \times 26 = 292,201,338$$
That is nearly 1 in 300 million odds. Understanding these calculations helps you make informed decisions about gambling.
Poker and Card Games
Every poker probability involves combinations. The total number of 5-card hands ($\binom{52}{5} = 2,598,960$) is the denominator, and the number of hands matching specific patterns (flush, straight, full house, etc.) forms the numerator.
Professional players understand these odds intuitively. A “pocket pair” in Texas Hold’em happens about once every 17 hands because $\binom{4}{2} \times 13 = 78$ pocket pairs exist among $\binom{52}{2} = 1,326$ possible starting hands.
Scheduling and Seating
Permutations arise in scheduling problems. If a conference has 8 speakers and 8 time slots, there are $8! = 40,320$ possible schedules. Adding constraints (some speakers must go before others, some cannot speak at certain times) creates restricted permutation problems.
Seating arrangements at round tables, wedding receptions, or classroom seating all involve permutations, sometimes with interesting twists like circular arrangements where rotations are considered equivalent.
Committee and Team Selection
Organizations constantly face combination problems. How many ways can a company form a project team of 5 from 20 employees? That is $\binom{20}{5} = 15,504$ possible teams. If the team needs a leader and deputy (adding structure), permutations enter the picture.
Sports drafts, jury selection, and academic admissions all involve similar counting problems at much larger scales.
Computer Science and Security
Password security directly relates to permutations with repetition. A password of length $k$ using an alphabet of $n$ characters has $n^k$ possibilities. This is why security experts recommend longer passwords with more character types.
Combination locks (ironically named since they typically use permutations) with 40 numbers and 3-number codes have $40 \times 40 \times 40 = 64,000$ combinations if numbers can repeat, or $40 \times 39 \times 38 = 59,280$ if they cannot.
Genetics and Biology
In genetics, combinations help calculate the number of ways genes can combine during reproduction. If a trait is controlled by selecting $r$ alleles from $n$ possible alleles, combinations give the number of possible genotypes.
Drug trial design uses combinations to determine how many ways patients can be assigned to treatment and control groups.
Self-Test Problems
Problem 1: Calculate: a) $P(8, 3)$ b) $\binom{8}{3}$ c) Verify that $\binom{8}{3} = \frac{P(8,3)}{3!}$
Show Answer
a) $P(8, 3) = \frac{8!}{5!} = 8 \times 7 \times 6 = 336$
b) $\binom{8}{3} = \frac{8!}{3! \times 5!} = \frac{8 \times 7 \times 6}{6} = \frac{336}{6} = 56$
c) $\frac{P(8,3)}{3!} = \frac{336}{6} = 56 = \binom{8}{3}$ ✓
Problem 2: A pizza shop offers 10 toppings. How many different pizzas can be made with exactly 4 toppings?
Show Answer
The order of toppings does not matter (pepperoni then mushrooms is the same pizza as mushrooms then pepperoni), so this is a combination.
$$\binom{10}{4} = \frac{10!}{4! \times 6!} = \frac{10 \times 9 \times 8 \times 7}{24} = \frac{5,040}{24} = 210$$
There are 210 different 4-topping pizzas.
Problem 3: In a race with 12 runners, how many ways can the gold, silver, and bronze medals be awarded?
Show Answer
Order matters (gold is different from silver), so this is a permutation.
$$P(12, 3) = 12 \times 11 \times 10 = 1,320$$
There are 1,320 ways to award the medals.
Problem 4: A standard deck has 52 cards (13 ranks in 4 suits). What is the probability of being dealt a 5-card hand that is all hearts?
Show Answer
Total 5-card hands: $\binom{52}{5} = 2,598,960$
All-heart hands: Choose 5 cards from the 13 hearts: $\binom{13}{5} = \frac{13 \times 12 \times 11 \times 10 \times 9}{120} = 1,287$
Probability: $\frac{1,287}{2,598,960} = \frac{33}{66,640} \approx 0.000495$
The probability is about 0.0495%, or roughly 1 in 2,019.
Problem 5: From a group of 7 men and 5 women, a committee of 4 is to be formed. How many committees are possible if the committee must have at least 2 women?
Show Answer
“At least 2 women” means exactly 2 women, exactly 3 women, or exactly 4 women.
Exactly 2 women (and 2 men): $$\binom{5}{2} \times \binom{7}{2} = 10 \times 21 = 210$$
Exactly 3 women (and 1 man): $$\binom{5}{3} \times \binom{7}{1} = 10 \times 7 = 70$$
Exactly 4 women (and 0 men): $$\binom{5}{4} \times \binom{7}{0} = 5 \times 1 = 5$$
Total: $210 + 70 + 5 = 285$
There are 285 committees with at least 2 women.
Alternative (complementary counting): Total committees: $\binom{12}{4} = 495$ Committees with 0 or 1 woman: $\binom{5}{0}\binom{7}{4} + \binom{5}{1}\binom{7}{3} = 35 + 175 = 210$ At least 2 women: $495 - 210 = 285$ ✓
Problem 6: How many different 7-letter “words” can be formed from the letters in MISSISSIPPI?
Show Answer
MISSISSIPPI has 11 letters: M (1), I (4), S (4), P (2).
Choosing 7 letters from these 11 where some letters repeat is a complex problem involving combinations with repetition. However, if the question asks about arrangements of all 11 letters:
Arrangements of all 11 letters (permutations with repetition):
When items repeat, we divide by the factorial of each repeated count:
$$\frac{11!}{1! \times 4! \times 4! \times 2!} = \frac{39,916,800}{1 \times 24 \times 24 \times 2} = \frac{39,916,800}{1,152} = 34,650$$
There are 34,650 arrangements of all letters in MISSISSIPPI.
(Note: The 7-letter version requires case-by-case analysis based on which letters are selected.)
Problem 7: Verify Pascal’s Identity for $n = 6$, $r = 2$: show that $\binom{6}{2} = \binom{5}{1} + \binom{5}{2}$.
Show Answer
Left side: $\binom{6}{2} = \frac{6 \times 5}{2} = 15$
Right side: $\binom{5}{1} + \binom{5}{2} = 5 + \frac{5 \times 4}{2} = 5 + 10 = 15$
Conclusion: $15 = 15$ ✓
Pascal’s Identity is verified!
Summary
-
Permutations count arrangements where order matters. Use when positions, rankings, or sequences are important. $$P(n, r) = \frac{n!}{(n-r)!}$$
-
Combinations count selections where order does not matter. Use when only the members of a group matter, not their arrangement. $$C(n, r) = \binom{n}{r} = \frac{n!}{r!(n-r)!}$$
-
The key question: Does rearranging the selection give a different outcome? If yes, use permutations. If no, use combinations.
-
The relationship: $\binom{n}{r} = \frac{P(n,r)}{r!}$ because combinations “divide out” the orderings that permutations count.
-
Permutations with repetition: When the same item can be chosen multiple times and order matters, use $n^r$.
-
Pascal’s Triangle displays all combination values, with each entry being the sum of the two entries above it.
-
Symmetry property: $\binom{n}{r} = \binom{n}{n-r}$. Choosing $r$ items to include is equivalent to choosing $n-r$ items to exclude.
-
Applications to probability: Use combinations or permutations to count both favorable outcomes and total outcomes. Use the same method for both to ensure consistency.
-
Real-world applications include lottery odds, poker hands, scheduling, committee selection, password security, and genetics.
-
Decision tip: Look for keywords like “arrange,” “rank,” or “order” (permutation) versus “choose,” “select,” or “group” (combination).