When a problem has too many possibilities to list by hand or draw out in a tree diagram, we need a direct way to count them.
1
Counting with Slots
Suppose we have 5 people (A, B, C, D, and E) and we want to find how many different ways we can seat 3 of them in 3 chairs painted Gold, Silver, and Bronze.
Counting with Slots
Text solution
Fill the slots one chair at a timeAll 5 people are available for the Gold chair, which leaves 4 people for the Silver chair and 3 people for the Bronze chair.
Gold5×Silver4×Bronze3=60
So there are 60 different ways to seat 3 of the 5 people in the Gold, Silver, and Bronze chairs.
No matter which of the 5 people sits in the Gold chair first, that choice branches into 4 remaining people for the Silver chair, and each of those branches into 3 people for the Bronze chair.
No matter who sits down first or second, the same number of people are left for the next chair, so every branch splits the same way.
2
Factorials and Permutations
When the slots have different labels like Gold, Silver, and Bronze, changing the order changes the outcome, which is called a permutation. We write nPr for the number of ways to fill r different slots from n total items, and n! (read "n factorial") for the full countdown from n all the way down to 1.
Factorials and Permutations
To compute nPr by hand, you just draw r slots and multiply down from n, though you might also see nPr written with factorials by dividing the full countdown n! by the unused tail (n−r)!:
r ordered slotsfrom n itemsnPr=first r slotsn×(n−1)×⋯=chops off the tail(n−r)!n!full countdown
Text solution
Count down for the given number of slotsFor 8P2, start at 8 and multiply down across 2 slots.
8P2=2 slots8×7=56
Divide by the unused tail to write a permutation with factorialsFor 5P3, dividing 5! by (5−3)!=2! cancels the final 2×1 from the full 5-person countdown.
5P3=(5−3)!5!=2!5!=2×15×4×3×2×1=5×4×3=60
Seat all 5 people in 5 chairs using 0!=1Filling 5 chairs with all 5 people leaves zero people standing, so 0! in the denominator must equal 1 for the factorial formula to match the 5-slot count of 5!=120.
5P5=(5−5)!5!==10!5!=1120=120
So 8P2 gives 56 arrangements, and seating all 5 people in 5 chairs gives 120 arrangements.
3
Combinations: Erasing the Labels
Now suppose we wipe the Gold, Silver, and Bronze labels off the 3 chairs so they become 3 identical seats in the back of a van. We want to know how many different groups of 3 people can ride in the van out of the 5 people, where the order they sit in no longer matters. This count is called a combination, written nCr.
Combinations: Erasing the Labels
Because erasing the labels turns all r! rearrangements of the same r chosen items into a single group, a combination divides the r-slot permutation count by the countdown from r:
groups of rfrom n itemsnCr=shuffles of the r slotsr×(r−1)×⋯×1n×(n−1)×⋯first r slots=(n−r)!shufflesr!n!
Text solution
Divide the 3-slot count by the shuffles of the 3 seatsEvery group of 3 riders was counted 3×2×1=6 times in the 60 labeled seatings, so divide by the countdown from 3.
5C3=3×2×15×4×3=660=10
Cancel factors before multiplying by handFor 7C3, place 3 slots counting down from 7 over the countdown from 3, and cancel 3×2=6 in the denominator against the 6 in the numerator.
7C3=3×2×17×6×5=7×5=35
Choose all 5 people for 5 van seatsWhen the van holds all 5 people, both 5! factors cancel and 0!=1 leaves the single group containing everyone.
5C5=(5−5)!5!5!==10!×5!5!=1
So there are 10 possible groups of 3 riders for the van, 35 combinations for 7C3, and 1 way to take all 5 people at once.
With the Gold, Silver, and Bronze labels on the chairs, the 60 outcomes form 10 rows of 6 shuffles each; without the labels, all 6 shuffles in each row collapse into 1 unordered group of three people in the van.
Without the Gold, Silver, and Bronze labels, all 6 arrangements of the same three people become a single group.
4
Arrows, Line Segments, and Triangles
To see how the geometry of a shape tells us whether slot order matters, suppose we draw 6 dots around a circle and want to count how many one-way arrows, plain line segments, and triangles we can form using those dots.
Arrows, Line Segments, and Triangles
Text solution
One-way arrows (keep the 2-slot count)An arrow needs a Start dot and an End dot, and reversing them points the arrow the opposite way, so we multiply the 2 slots and stop.
6P2=Start6×End5=30
Line segments (divide by the 2! endpoint swaps)Erasing the arrowheads turns the arrow from 1 to 2 and the arrow from 2 to 1 into the same line segment, so divide the 2-slot count by 2×1.
6C2=2×16×5=230=15
Triangles (divide by the 3! corner orders)Connecting the same 3 dots in any order traces the exact same triangle on the circle, so put 3 slots on top and divide by 3×2×1, cancelling 3×2=6 against the 6 on top.
6C3=3×2×16×5×4=5×4=20
So the 6 dots form 30 one-way arrows, 15 line segments, and 20 triangles.
Swapping two dots between the Start and End slots flips the arrowhead to point the opposite way, whereas all 3×2×1=6 slot orders of three chosen dots trace the exact same triangle on the circle.
Changing the order in the slots makes a new arrow between two dots, while every order of three dots traces the exact same triangle.
5
The Swap Test
Some problems don't tell you whether order matters, or they mix different roles with identical ones in the same group. Suppose we have 10 players and want to find how many ways we can choose 1 Captain and 2 equal Co-Captains.
The Swap Test
Text solution
Fill all 3 slots from the 10 playersDraw one slot for the Captain and two slots for the Co-Captains, and multiply down from 10 across the 3 slots.
Captain10×Co-Captain9×Co-Captain8=720
Divide only by the shuffles of the matching slotsSwapping the Captain with a Co-Captain changes who leads the team, while swapping the two Co-Captains changes nothing, so divide only by the 2×1 shuffles of the two Co-Captain slots.
2 Co-Captains2×110×9×8=2720=360
So there are 360 different ways to pick 1 Captain and 2 Co-Captains from the 10 players.
Swapping the Captain with either Co-Captain changes who wears the Captain badge and gives a new lineup, whereas swapping the two Co-Captains leaves the team leadership unchanged and merges those two arrangements into one.
Swapping the two Co-Captains keeps the exact same leadership team, while swapping the Captain creates a different one.
6
Probability with Permutations
When a sample space has hundreds of outcomes, we can use slots to count the top and bottom of a probability fraction instead of drawing out the tree. Suppose 8 equally matched runners are in a race, 3 of them are from your school, and we want the probability that runners from your school sweep the race by taking 1st, 2nd, and 3rd place.
For these equally matched runners, we treat all finishing orders as equally likely, so we can divide the number of favorable finishes by the total number of possible finishes:
Probability=Total number of outcomesNumber of favorable outcomes
Probability with Permutations
Text solution
Count all possible finishes for the bottomSwapping 1st and 2nd place changes the race result, so use permutations to fill the 3 places from all 8 runners.
8P3=8×7×6=336
Count the finishes where your school takes all 3 places for the topFill the same 1st, 2nd, and 3rd place slots using only the 3 runners from your school.
3P3=3×2×1=6
Form the probability fraction and cancelPut the favorable finishes over the total finishes and cancel 3×2×1=6 against the 6 in the denominator.
P(sweep)=8P33P3=8×7×63×2×1=8×71=561
So the probability that runners from your school take 1st, 2nd, and 3rd place is 561.
7
Probability with Combinations
Now suppose we are choosing at random from 10 students (6 Juniors and 4 Seniors) to fill 3 unlabeled seats in a van, and we want the probability of picking all 3 Juniors, and then the probability of picking 2 Juniors and 1 Senior.
Probability with Combinations
Text solution
Count all possible groups of 3 for the bottomSwapping seats in the van leaves the same 3 riders on the trip, so use combinations to pick 3 students out of all 10.
10C3=3×2×110×9×8=120
All 3 Juniors (fill all 3 slots from the 6 Juniors)Count the groups of 3 chosen only from the 6 Juniors, and divide by the 120 total groups.
2 Juniors and 1 Senior (multiply the choices for each part of the group)Count the ways to pick 2 Juniors out of 6 and 1 Senior out of 4, multiply those two counts together for the top, and divide by the same 120 total groups.
So the probability of picking all 3 Juniors is 61, and the probability of picking 2 Juniors and 1 Senior is 21.
Key concepts
When choosing different items from one group, start by drawing a slot for each item you need to pick and multiplying down from the number of available options. To decide whether to stop there or divide, run the Swap Test by trading two items between slots:
Distinct slots (Permutations, nPr)
When the slots have different roles, like Gold, Silver, and Bronze chairs, President and VP, or the Start and End of a one-way arrow, swapping two items changes the outcome. Stop right after multiplying the slots and do not divide:
6P2=6×5=30 arrows
Identical slots (Combinations, nCr)
When the slots have no labels, like seats in a van, pizza toppings, or the 3 corners of a triangle, swapping items leaves the same group, so divide the slot count by the countdown from the number of identical slots:
6C3=3×2×16×5×4=20 triangles
If only some of the slots share the same role (like 1 Captain and 2 Co-Captains from 10 players), only divide by the shuffles of the matching slots: 2×110×9×8=360.
Factorial formulas and 0!=1
You don't need factorials to calculate by hand, but you might also see these written as nPr=(n−r)!n!, which chops off the unused tail, and nCr=(n−r)!r!n!, which also divides by the r! shuffles. Because there is 1 way to leave an empty table, 0!=1, which keeps both formulas working when you use all n items (5P5=0!5!=120 and 5C5=0!5!5!=1).
Probability with slots
For equally likely outcomes, count favorable outcomes on top and all possible outcomes on the bottom, with both counts ordered or both unordered. For 2 Juniors and 1 Senior chosen from 6 Juniors and 4 Seniors:
10C36C2×4C1=12015×4=21
8
Practice
1
Evaluate 9P2 and 9C3 by hand without a calculator.
Be careful not to divide by 2×1, which would compute 9C2=36 instead of 9P2.
Look at the second number to see how many slots to fill starting from 9, and check which letter tells you to divide by the slot shuffles on the bottom.
Fill 2 ordered slots for 9P2Start at 9 and multiply down across 2 slots (be careful not to divide by 2×1, which would compute 9C2=36 instead of 9P2).
9P2=9×8=72
Fill 3 slots and divide by 3! for 9C3Put 3 slots counting down from 9 over 3×2×1 (forgetting to divide by 3×2×1=6 leaves the permutation count 504).
9C3=3×2×19×8×7=3×4×7=84
2
A club of 8 students is electing a President, a Vice President, a Secretary, and a Treasurer. How many different ways can these 4 offices be filled?
Dividing by 4×3×2×1=24 treats the 4 offices as identical and gives the wrong answer 70.
Draw 4 slots for the 4 offices, place two students in two of the slots, and ask if swapping them changes who holds each office.
Multiply across the 4 distinct officer slotsSwapping two officers changes who holds those offices, so we use permutations and do not divide (dividing by 4×3×2×1=24 treats the 4 offices as identical and gives the wrong answer 70).
8P4=8×7×6×5=1,680
3
An ice cream shop offers 12 flavors. How many different bowls of 3 scoops can you order if all 3 scoops must be different flavors?
Stopping after 12×11×10 counts every bowl 6 times and gives the wrong answer 1,320.
After filling 3 slots from the 12 flavors, run the Swap Test: does swapping two scoops in the same bowl give you a different bowl of ice cream?
Divide the 3-slot count by the 3! scoop shufflesBecause the 3 scoops sit together in the same bowl, divide 12×11×10 by 3×2×1 (stopping after 12×11×10 counts every bowl 6 times and gives the wrong answer 1,320).
12C3=3×2×112×11×10=2×11×10=220
4
Use the factorial formulas nPr=(n−r)!n! and nCr=(n−r)!r!n! to find the number of ways to (a) line up all 6 different books on a shelf in order, and (b) pack all 6 books into a backpack at once. Show where 0! appears in each formula.
Cancelling 6! as if 0! were 6! gives the wrong answer 1.
Both questions use all 6 books (n=6 and r=6); substitute those numbers into each factorial formula and replace 0! with its value.
(a) Line up all 6 books in order with 6P6Plug n=6 and r=6 into the permutation formula and use 0!=1 (treating 0! as 0 makes the fraction undefined, and cancelling 6! as if 0! were 6! gives the wrong answer 1).
6P6=(6−6)!6!=0!6!=1720=720
(b) Pack all 6 books into a backpack at once with 6C6Plug n=6 and r=6 into the combination formula, replace 0! with 1, and cancel 6!.
6C6=(6−6)!6!6!=0!6!6!=1×6!6!=1
5
Seven dots are drawn around a circle. (a) How many one-way arrows can be drawn connecting one dot to another? (b) How many triangles can be formed using the dots as corners?
Dividing by 2×1 erases the arrowheads and counts 21 line segments instead of arrows.
Count how many dots each shape needs, then check whether reordering the chosen dots in the slots changes the drawing on the circle.
(a) Count 2 ordered slots for the one-way arrowsSwapping the Start and End dots flips the arrow, so multiply 2 slots from 7 without dividing (dividing by 2×1 erases the arrowheads and counts 21 line segments instead of arrows).
7P2=7×6=42
(b) Divide the 3 corner slots by 3! for the trianglesAny order of the same 3 dots traces the same triangle, so divide by 3×2×1 (forgetting to divide by 3×2×1=6 counts every triangle 6 times and gives the wrong answer 210).
7C3=3×2×17×6×5=7×5=35
6
A band director has 9 musicians and needs to choose 1 Lead Guitarist and 3 equal Backup Guitarists. How many different ways can these roles be filled?
Dividing by 4!=24 treats all 4 guitarists as identical and gives 126.Not dividing at all leaves 3,024.
Draw all 4 slots and fill them from the 9 musicians, then use the Swap Test to see how many of those 4 slots can trade places without changing the roles.
Fill 4 slots and divide only by the 3! shuffles of the 3 Backup GuitaristsThe Lead Guitarist has a distinct role while the 3 Backup Guitarists are interchangeable, so divide 9×8×7×6 by 3×2×1 (dividing by 4!=24 treats all 4 guitarists as identical and gives 126, while not dividing at all leaves 3,024).
3×2×19×8×7×6=9×8×7=504
7
Ten equally matched swimmers are in a race, and 4 of them are on your team. What is the probability that swimmers from your team take 1st, 2nd, and 3rd place?
Starting at 3 on top as 3×2×1=6 forgets that any of your 4 swimmers can fill those 3 places and gives the wrong answer 7206=1201.
Run the Swap Test on 1st, 2nd, and 3rd place, then fill those 3 places from your 4 team members on top and from all 10 swimmers on the bottom.
Divide the 3-slot team permutations by the 3-slot total permutationsStart the top countdown at 4 for all 4 swimmers on your team (starting at 3 on top as 3×2×1=6 forgets that any of your 4 swimmers can fill those 3 places and gives the wrong answer 7206=1201).
10P34P3=10×9×84×3×2=72024=301
8
A committee of 4 students is chosen at random from a group of 5 Sophomores and 4 Juniors. (a) What is the probability that all 4 students chosen are Sophomores? (b) What is the probability that the committee has 2 Sophomores and 2 Juniors?
Add the two class counts to find the total group for the bottom of the fraction, and in part (b), remember that every pair of Sophomores can be paired with every pair of Juniors.
(a) Pick all 4 committee members from the 5 Sophomores over all 9 studentsUse combinations with 5+4=9 total students on the bottom.
9C45C4=4×3×2×19×8×7×64×3×2×15×4×3×2=1265
(b) Multiply the ways to pick 2 Sophomores and 2 Juniors on topMultiply 5C2=10 by 4C2=6 for the numerator over the same 126 total committees (adding 10+6=16 instead of multiplying on top gives the wrong answer 12616=638).