Discrete MathematicsCounting: Choices, Arrangements and Selections3 of 7
Counting: Choices, Arrangements and Selections · 3

Combinations: Choosing Subsets

Slots count how many ways we can put items in a specific order, and now we need a way to count unordered groups where the order we pick the items in doesn't matter.

1

Dividing Out the Scrambling and the (nk)\binom{n}{k} Formula

Suppose we have 55 people, A,B,C,D,A, B, C, D, and EE, and 33 tickets to a concert, or a deck of 1010 cards from which we deal a 44-card hand. We want to find how many different groups we can choose when rearranging the same items gives the exact same group.

If order did matter, we would fill 33 ordered slots from the 55 people in 5×4×3=605 \times 4 \times 3 = 60 ways. Because everyone chosen gets into the same car regardless of when their name was called, we need to see how many times each group of 33 is repeated inside those 6060 slot outcomes.

Dividing Out the Scrambling and the (n choose k) Formula
AA
BB
CC
DD
EE
11
22
33
#groups of 3=  ?\#\text{groups of } 3 = \thickspace ?

All 3×2×1=63 \times 2 \times 1 = \leftover{6} ways of ordering the same three people in the slots give the same group in the car, bundling the 6060 slot outcomes into 10\howmany{10} groups of 6\leftover{6}.

Rearranging the same three people in the slots only steps through the 6 rows inside one box, while the group in the car stays the same.

Now let's record the steps for counting the 44-card hands dealt from a deck of 1010 cards.

Text solution
Fill 44 ordered slots from the 1010 cardsPretend order matters first so we can count the slot arrangements.
10×9×8×7\displaystyle 10 \times 9 \times 8 \times 7
Divide by the 4!\leftover{4!} ways to scramble a 44-card handAny chosen set of 44 cards can be dealt in 4×3×2×1\leftover{4 \times 3 \times 2 \times 1} different orders, so dividing bundles each box of duplicates into one hand.
Hands\displaystyle \text{Hands} =10×9×8×74×3×2×1\displaystyle = \frac{10 \times 9 \times 8 \times 7}{\leftover{4 \times 3 \times 2 \times 1}}
Cancel the denominator into the top before multiplyingBecause the final answer must be a whole number, the bottom always divides cleanly into the top: 4×2=8\leftover{4 \times 2} = 8 cancels the 88 on top, and 3\leftover{3} divides into 99 to leave 33.
10×9×8×74×3×2×1\displaystyle \frac{10 \times 9 \times 8 \times 7}{\leftover{4 \times 3 \times 2 \times 1}} =10×3×7\displaystyle = 10 \times 3 \times 7 =210\displaystyle = \howmany{210}

So there are 210\howmany{210} different 44-card hands from a 1010-card deck.

We write the number of ways to choose an unordered subset of kk items from nn items using the symbol below (there is no fraction bar between the nn and the kk; read it as the question, "from nn items, how many ways can I choose a group of kk?"):

(nk)⏟read "n choose k"=n(n−1)⋯(n−k+1)⏞k slots stepping downk!⏟scrambles of the k items=n!k!(n−k)!\displaystyle \begin{aligned} \underbrace{\binom{n}{k}}_{\text{read "n choose k"}} &= \frac{\overbrace{n(n - 1)\cdots(n - k + 1)}^{k\text{ slots stepping down}}}{\underbrace{\leftover{k!}}_{\text{scrambles of the }k\text{ items}}} \\ &= \frac{n!}{\leftover{k!}\leftover{(n - k)!}} \end{aligned}

In the factorial form on the right, dividing n!n! by (n−k)!\leftover{(n - k)!} simply cancels the factors from (n−k)\leftover{(n - k)} down to 11 so that only the kk slots on top remain:

(104)=10!4! 6!=10×9×8×7×(6×5×4×3×2×1)⏞6! cancels4!×(6×5×4×3×2×1)⏟6! cancels=10×9×8×74×3×2×1\displaystyle \begin{aligned} \binom{10}{4} &= \frac{10!}{\leftover{4!}\,\leftover{6!}} \\ &= \frac{10 \times 9 \times 8 \times 7 \times \leftover{\overbrace{(6 \times 5 \times 4 \times 3 \times 2 \times 1)}^{6!\text{ cancels}}}}{\leftover{4!} \times \leftover{\underbrace{(6 \times 5 \times 4 \times 3 \times 2 \times 1)}_{6!\text{ cancels}}}} \\ &= \frac{10 \times 9 \times 8 \times 7}{\leftover{4 \times 3 \times 2 \times 1}} \end{aligned}

When you need to calculate an actual number, skip the three factorials: write kk numbers stepping down on top, put k!\leftover{k!} on the bottom, and cancel before multiplying.

2

Symmetry: Choosing What to Leave Behind

Writing kk slots on top and k!\leftover{k!} on the bottom is a lot of work when kk is large. For example, suppose there are 100100 cookies on a table and we want to find (10098)\howmany{\binom{100}{98}}, the number of ways to choose 98\howmany{98} cookies to pack into a box.

Symmetry: Choosing What to Leave Behind
(10098)=  ?\htmlClass{lc-green}{\dbinom{100}{98}} = \thickspace ?
100 cookies100\text{ cookies}
98\htmlClass{lc-green}{98}
Text solution
Switch from the 98\howmany{98} cookies packed to the 2\leftover{2} cookies left behindEvery selection of 98\howmany{98} cookies to take leaves behind one exact pair of cookies on the table.
(10098)\displaystyle \howmany{\binom{100}{98}} =(100100−98)\displaystyle = \leftover{\binom{100}{100 - 98}} =(1002)\displaystyle = \leftover{\binom{100}{2}}
Put 22 slots on top and 2!\leftover{2!} on the bottomCancel the 2\leftover{2} into 100100 before multiplying.
(1002)\displaystyle \leftover{\binom{100}{2}} =100×992×1\displaystyle = \frac{100 \times 99}{\leftover{2 \times 1}} =50×99\displaystyle = 50 \times 99 =4950\displaystyle = \howmany{4950}

So there are 4950\howmany{4950} ways to choose 98\howmany{98} of the 100100 cookies.

In any lineup of nn items, circling k\howmany{k} items to take automatically leaves the remaining n−k\leftover{n - k} items behind, pairing every subset of size k\howmany{k} one-to-one with a subset of size n−k\leftover{n - k}.

Choosing a group to take automatically sets the group left behind, pairing every possible group you could take with the exact group it leaves behind.

This same pairing explains the two extreme cases: taking all n\howmany{n} items is the same decision as leaving 0\leftover{0} behind, and there is only 1\howmany{1} way to take everything (or to take nothing and leave with the empty group):

(nk)\displaystyle \howmany{\binom{n}{k}} =(nn−k),(nn)\displaystyle = \leftover{\binom{n}{n - k}}, \qquad \howmany{\binom{n}{n}} =(n0)\displaystyle = \leftover{\binom{n}{0}} =1\displaystyle = \howmany{1}
3

Combining Pools with "And," "Or," and "At Least One"

So far we have chosen a single group from one pool. Now suppose a company has two separate pools, 6\firstpool{6} developers and 4\secondpool{4} designers (1010 people in total), and we want to count how many ways we can form:

Combining Pools with "And," "Or," and "At Least One"
11
22
33
44
55
66
6 developers\htmlClass{lc-blue}{6\text{ developers}}
AA
BB
CC
DD
4 designers\htmlClass{lc-pink}{4\text{ designers}}
3 developers and 2 designers\htmlClass{lc-blue}{3}\text{ developers and }\htmlClass{lc-pink}{2}\text{ designers}
#teams=  ?\#\text{teams} = \thickspace ?

Picking one "guaranteed" designer first and then choosing 33 more people from the remaining 99 ((41)×(93)\secondpool{\binom{4}{1}} \times \binom{9}{3}) counts every multi-designer team once for each designer on it, because swapping which designer was picked first gives the exact same 44-person team.

Picking one "guaranteed" designer first and mixing the other designers into the remaining pool counts every multi-designer team once for each designer on it.

Here are the steps for both team rules while keeping the pools separate.

Text solution
Multiply the two pool choices for "3\firstpool{3} developers and 2\secondpool{2} designers."Each of the (63)\firstpool{\binom{6}{3}} developer groups can be paired with each of the (42)\secondpool{\binom{4}{2}} designer groups to complete a team.
(63)×(42)\displaystyle \firstpool{\binom{6}{3}} \times \secondpool{\binom{4}{2}} =6×5×43×2×1×4×32×1\displaystyle = \frac{6 \times 5 \times 4}{\leftover{3 \times 2 \times 1}} \times \frac{4 \times 3}{\leftover{2 \times 1}} =20×6\displaystyle = \firstpool{20} \times \secondpool{6} =120\displaystyle = \howmany{120}
Count all unrestricted 44-person teams and the 0\leftover{0}-designer teamsFor a 44-person team with at least 1\secondpool{1} designer, the only forbidden outcome among all (104)\binom{10}{4} teams is choosing all 44 members from the 6\firstpool{6} developers.
(104)\displaystyle \binom{10}{4} =210,(64)\displaystyle = 210, \qquad \leftover{\binom{6}{4}} =(62)\displaystyle = \binom{6}{2} =6×52×1\displaystyle = \frac{6 \times 5}{\leftover{2 \times 1}} =15\displaystyle = \leftover{15}
Subtract the 0\leftover{0}-designer teams from the totalRemoving the all-developer teams leaves every 44-person team with 1,2,3,\secondpool{1, 2, 3,} or 4\secondpool{4} designers.
(104)−(64)\displaystyle \binom{10}{4} - \leftover{\binom{6}{4}} =210−15\displaystyle = 210 - \leftover{15} =195\displaystyle = \howmany{195}

So there are 120\howmany{120} teams with 3\firstpool{3} developers and 2\secondpool{2} designers, and 195\howmany{195} four-person teams with at least 1\secondpool{1} designer. Splitting "at least 1\secondpool{1} designer" into non-overlapping cases by the exact number of designers ("1\secondpool{1} designer or 2\secondpool{2} designers or 3\secondpool{3} designers or 4\secondpool{4} designers") adds to the same count:

(41)(63)⏟1 des, 3 devs+(42)(62)⏟2 des, 2 devs+(43)(61)⏟3 des, 1 dev+(44)(60)⏟4 des, 0 devs=80+90+24+1=195\displaystyle \begin{aligned} & \underbrace{\secondpool{\binom{4}{1}}\firstpool{\binom{6}{3}}}_{\secondpool{\text{1 des}}\text{, }\firstpool{\text{3 devs}}} + \underbrace{\secondpool{\binom{4}{2}}\firstpool{\binom{6}{2}}}_{\secondpool{\text{2 des}}\text{, }\firstpool{\text{2 devs}}} \\ & \quad + \underbrace{\secondpool{\binom{4}{3}}\firstpool{\binom{6}{1}}}_{\secondpool{\text{3 des}}\text{, }\firstpool{\text{1 dev}}} + \underbrace{\secondpool{\binom{4}{4}}\firstpool{\binom{6}{0}}}_{\secondpool{\text{4 des}}\text{, }\firstpool{\text{0 devs}}} \\ & \quad = 80 + 90 + 24 + 1 = \howmany{195} \end{aligned}
4

Rules About Specific People

Now suppose the rule isn't about categories like developers and designers, but about specific individuals among the 1010 people when forming a 44-person team:

Rules About Specific People
AA
BB
CC
DD
11
22
33
44
55
66
Alice\htmlClass{lc-blue}{\text{Alice}}
Bob\htmlClass{lc-pink}{\text{Bob}}
#teams of 4=  ?\#\text{teams of } 4 = \thickspace ?
Text solution
Put a required person on the team before counting (Alice must be in)Putting Alice into one of the 44 spots leaves 33 empty spots to fill from the remaining 99 people.
(10−14−1)\displaystyle \binom{10 \firstpool{- 1}}{4 \firstpool{- 1}} =(93)\displaystyle = \binom{9}{3} =9×8×73×2×1\displaystyle = \frac{9 \times 8 \times 7}{\leftover{3 \times 2 \times 1}} =84\displaystyle = \howmany{84}
Cross off an excluded person before counting (Bob must be out)Removing Bob from the pool of 1010 people leaves all 44 spots to fill from the remaining 99 people.
(10−14)\displaystyle \binom{10 \secondpool{- 1}}{4} =(94)\displaystyle = \binom{9}{4} =9×8×7×64×3×2×1\displaystyle = \frac{9 \times 8 \times 7 \times 6}{\leftover{4 \times 3 \times 2 \times 1}} =126\displaystyle = \howmany{126}
Subtract the teams that include both people (Alice and Bob together)Putting both Alice and Bob on the team leaves 22 spots to fill from the other 88 people, and subtracting those (82)\leftover{\binom{8}{2}} forbidden teams from all (104)\binom{10}{4} teams leaves the valid teams.
(104)−(82)\displaystyle \binom{10}{4} - \leftover{\binom{8}{2}} =210−8×72×1\displaystyle = 210 - \frac{8 \times 7}{\leftover{2 \times 1}} =210−28\displaystyle = 210 - \leftover{28} =182\displaystyle = \howmany{182}

So there are 84\howmany{84} teams with Alice, 126\howmany{126} teams without Bob, and 182\howmany{182} teams where Alice and Bob do not serve together. Setting Alice and Bob aside so 88 people remain and adding the three non-overlapping valid cases gives the same result:

(83)⏟Alice in, Bob out+(83)⏟Bob in, Alice out+(84)⏟both out=56+56+70=182\displaystyle \begin{aligned} & \underbrace{\binom{8}{3}}_{\firstpool{\text{Alice}}\text{ in, }\secondpool{\text{Bob}}\text{ out}} + \underbrace{\binom{8}{3}}_{\secondpool{\text{Bob}}\text{ in, }\firstpool{\text{Alice}}\text{ out}} + \underbrace{\binom{8}{4}}_{\text{both out}} \\ & \quad = 56 + 56 + 70 = \howmany{182} \end{aligned}
5

Combinations in Disguise: Bit Strings, Grid Paths, and Networks

Combinations also count outcomes in problems that don't look like picking a committee at all. We want to find:

Combinations in Disguise: Bit Strings, Grid Paths, and Networks
8-bit strings with exactly three 1s8\text{-bit strings with exactly three } 1\text{s}
0 1 1 0 0 1 0 00\,1\,1\,0\,0\,1\,0\,0
1 0 0 0 0 0 1 11\,0\,0\,0\,0\,0\,1\,1
#strings=  ?\#\text{strings} = \thickspace ?

Every corner-to-corner path across the 44-by-33 grid is completely determined by the 3\howmany{3}-element subset of step numbers in {1,2,3,4,5,6,7}\{1, 2, 3, 4, 5, 6, 7\} where the path steps Up, leaving the other 44 steps to go Right.

Picking a path across the grid is the same as picking which 3 of its 7 steps go Up.
1 cable=1 unordered pair of nodes1\text{ cable} = 1\text{ unordered pair of nodes}
Text solution
Choose 3\howmany{3} of the 88 bit positions to hold 11sStarting with eight 00s in boxes 11 through 88, an 88-bit string with three 11s is completely determined by which subset of 3\howmany{3} box numbers we flip to 11.
(83)\displaystyle \binom{8}{3} =8×7×63×2×1\displaystyle = \frac{8 \times 7 \times 6}{\leftover{3 \times 2 \times 1}} =56\displaystyle = \howmany{56}
Choose 3\howmany{3} of the 77 total steps to go UpEvery path across the 44-by-33 grid takes 4+3=74 + 3 = 7 steps in total, and choosing which 3\howmany{3} step slots get a U\howmany{U} (or which 44 get an RR) fixes the entire route.
(73)\displaystyle \binom{7}{3} =(74)\displaystyle = \binom{7}{4} =7×6×53×2×1\displaystyle = \frac{7 \times 6 \times 5}{\leftover{3 \times 2 \times 1}} =35\displaystyle = \howmany{35}
Choose 2\howmany{2} of the 66 computers as the endpoints of a cableEach cable connects one unordered pair of computers, so the number of cables equals the number of 2\howmany{2}-computer subsets.
(62)\displaystyle \binom{6}{2} =6×52×1\displaystyle = \frac{6 \times 5}{\leftover{2 \times 1}} =15\displaystyle = \howmany{15}

So there are 56\howmany{56} eight-bit strings with three 11s, 35\howmany{35} shortest paths across the 44-by-33 grid, and 15\howmany{15} cables connecting the 66 computers.

6

Counting Subsets by Size: Why the Combinations Add Up to 2n2^n

Each (nk)\binom{n}{k} counts the subsets of one fixed size kk. Now we want to find what happens when we add the combinations across every possible subset size from k=0k = 0 to k=nk = n.

Remember from power sets that building a subset of any size from nn items means walking down the line of nn items and making a Yes-or-No choice ("in" or "out") for each one, which gives 2×2×⋯×2⏟n choices=2n\underbrace{2 \times 2 \times \cdots \times 2}_{n\text{ choices}} = \howmany{2^n} subsets in total.

Counting Subsets by Size: Why the Combinations Add Up to 2ⁿ
{A,B,C}\{A, B, C\}
Size 0\text{Size } 0
Size 1\text{Size } 1
Size 2\text{Size } 2
Size 3\text{Size } 3
(30)+(31)+(32)+(33)=  ?\dbinom{3}{0} + \dbinom{3}{1} + \dbinom{3}{2} + \dbinom{3}{3} = \thickspace ?

Sorting all 2n\howmany{2^n} subsets into piles by how many items were chosen (00 items, 11 item, 22 items, all the way up to nn items) gives the sum of all combinations for a set of size nn:

(n0)⏟size 0+(n1)⏟size 1+(n2)⏟size 2+⋯+(nn)⏟size n=2n\displaystyle \begin{aligned} & \underbrace{\binom{n}{0}}_{\text{size }0} + \underbrace{\binom{n}{1}}_{\text{size }1} + \underbrace{\binom{n}{2}}_{\text{size }2} \\ & \quad + \cdots + \underbrace{\binom{n}{n}}_{\text{size }n} = \howmany{2^n} \end{aligned}

For n=3n = 3 items {A,B,C}\{A, B, C\}, the piles of size 0,1,2,0, 1, 2, and 33 add up to:

(30)+(31)+(32)+(33)\displaystyle \binom{3}{0} + \binom{3}{1} + \binom{3}{2} + \binom{3}{3} =1+3+3+1\displaystyle = 1 + 3 + 3 + 1 =8\displaystyle = \howmany{8} =23\displaystyle = \howmany{2^3}

Key concepts

Whenever you set up a counting problem, ask first whether swapping two chosen items changes the final outcome. If 33 people out of 55 receive Gold, Silver, and Bronze medals, order matters, so do not use combinations; stop at the ordered slots (5×4×3=605 \times 4 \times 3 = 60). If those 33 people are simply riding in a car together, order doesn't matter, so divide the kk slots by k!\leftover{k!} to bundle the scrambles into one group:

(nk)=n(n−1)⋯(n−k+1)k!=n!k!(n−k)!,(53)=5×4×33×2×1=10\displaystyle \begin{aligned} \binom{n}{k} &= \frac{n(n - 1)\cdots(n - k + 1)}{\leftover{k!}} \\ &= \frac{n!}{\leftover{k!}\leftover{(n - k)!}}, \\ \binom{5}{3} &= \frac{5 \times 4 \times 3}{\leftover{3 \times 2 \times 1}} = \howmany{10} \end{aligned}

When kk is more than half of nn, switch to counting the n−k\leftover{n - k} items left behind ((nk)=(nn−k)\howmany{\binom{n}{k}} = \leftover{\binom{n}{n - k}}, turning (10098)\howmany{\binom{100}{98}} into (1002)=4950\leftover{\binom{100}{2}} = \howmany{4950}, with (nn)=(n0)=1\howmany{\binom{n}{n}} = \leftover{\binom{n}{0}} = \howmany{1} at the ends).

To combine pools or handle restrictions:

And vs. Or

Multiply combinations when completing stages of a single group ((63)(42)\firstpool{\binom{6}{3}}\secondpool{\binom{4}{2}} for 3\firstpool{3} developers and 2\secondpool{2} designers), and add them when splitting into non-overlapping cases.

At least one / People who won't serve together

Subtract the forbidden teams from the unrestricted total ((104)−(64)\binom{10}{4} - \leftover{\binom{6}{4}} for at least 1\secondpool{1} designer; (104)−(82)\binom{10}{4} - \leftover{\binom{8}{2}} when two specific people refuse to serve together) rather than picking one "guaranteed" person first and mixing the rest of their pool into the second step.

Specific people required or excluded

Handle them before writing the combination: put a required person on the team to reduce both nn and kk ((93)\binom{9}{3}), and cross off an excluded person to reduce only nn ((94)\binom{9}{4}).

Disguised subsets and all sizes at once

Count subsets of positions whenever choosing where a feature goes determines the outcome ((83)\binom{8}{3} for 88-bit strings with three 11s, (4+33)=(73)\binom{4+3}{3} = \binom{7}{3} for paths across a 44-by-33 grid, and (62)\binom{6}{2} for cables among 66 nodes). When a problem spans nearly all subset sizes of nn items, start with (n0)+(n1)+⋯+(nn)=2n\binom{n}{0} + \binom{n}{1} + \cdots + \binom{n}{n} = \howmany{2^n} and subtract the disallowed sizes.

7

Practice

1

A summer reading list has 1212 books, and you want to choose 44 of them to pack for a trip. How many different sets of 44 books can you choose?

Does the order you toss the 44 books into your bag change which books are on the trip? Put 44 slots on top starting from 1212, then divide by the ways to scramble those 44 books.

Set up 44 slots on top from the 1212 books and divide by 4!\leftover{4!} on the bottom to remove the scrambling of the 44 chosen books (watch out for stopping at the ordered slots 12×11×10×9=11,88012 \times 11 \times 10 \times 9 = \leftover{11{,}880}, or dividing by 44 instead of 4!=24\leftover{4!} = 24 to get 2970\leftover{2970}):
(124)\displaystyle \binom{12}{4} =12×11×10×94×3×2×1\displaystyle = \frac{12 \times 11 \times 10 \times 9}{\leftover{4 \times 3 \times 2 \times 1}} =11×5×9\displaystyle = 11 \times 5 \times 9 =495\displaystyle = \howmany{495}
2

A quality-control inspector tests a batch of 5050 microchips and needs to select 4848 of them to ship. In how many ways can the inspector choose the 4848 microchips?

Instead of choosing which 4848 microchips go into the shipping box, how many microchips is the inspector choosing to leave behind?

By symmetry, choosing 48\howmany{48} microchips to ship is the same decision as choosing 50−48=250 - \howmany{48} = \leftover{2} microchips to leave behind (be careful not to forget the 2!\leftover{2!} in the denominator, which would count the 2\leftover{2} rejected chips in order and give 50×49=245050 \times 49 = \leftover{2450}):
(5048)\displaystyle \howmany{\binom{50}{48}} =(502)\displaystyle = \leftover{\binom{50}{2}} =50×492×1\displaystyle = \frac{50 \times 49}{\leftover{2 \times 1}} =25×49\displaystyle = 25 \times 49 =1225\displaystyle = \howmany{1225}
3

An animal shelter has 77 dogs and 55 cats. How many different ways can you adopt a group of 33 dogs and 22 cats?

Count the combinations from the dog pool and the cat pool separately, then decide whether adopting 33 dogs and 22 cats means adding or multiplying the two stages.

Choose 3\firstpool{3} dogs from 7\firstpool{7} and 2\secondpool{2} cats from 5\secondpool{5}, then multiply the two stages because every group of 3\firstpool{3} dogs can be paired with every group of 2\secondpool{2} cats (don't add the two counts to get 35+10=4535 + 10 = \leftover{45}, which would count adopting 3\firstpool{3} dogs or 2\secondpool{2} cats rather than both):
(73)×(52)\displaystyle \firstpool{\binom{7}{3}} \times \secondpool{\binom{5}{2}} =7×6×53×2×1×5×42×1\displaystyle = \frac{7 \times 6 \times 5}{\leftover{3 \times 2 \times 1}} \times \frac{5 \times 4}{\leftover{2 \times 1}} =35×10\displaystyle = \firstpool{35} \times \secondpool{10} =350\displaystyle = \howmany{350}
4

A research lab has 88 biologists and 55 chemists (1313 scientists in total). How many ways can you form a 44-person committee that includes at least 11 chemist?

What is the only kind of 44-person committee from the 1313 scientists that fails the "at least 11 chemist" rule?

Count all unrestricted 44-person committees from the 1313 scientists and subtract the committees with 0\leftover{0} chemists, where all 44 members are chosen from the 8\firstpool{8} biologists (avoid picking 1\secondpool{1} "guaranteed" chemist first and 33 from the remaining 1212 scientists to get (51)(123)=5×220=1100\secondpool{\binom{5}{1}}\binom{12}{3} = 5 \times 220 = \leftover{1100}, which overcounts every committee with two or more chemists):
(134)−(84)=13×12×11×104×3×2×1−8×7×6×54×3×2×1=715−70=645\displaystyle \begin{aligned} \binom{13}{4} - \leftover{\binom{8}{4}} &= \frac{13 \times 12 \times 11 \times 10}{\leftover{4 \times 3 \times 2 \times 1}} - \frac{8 \times 7 \times 6 \times 5}{\leftover{4 \times 3 \times 2 \times 1}} \\ &= 715 - \leftover{70} = \howmany{645} \end{aligned}
5

From a club of 1111 members, you are choosing a 55-person delegation. Maya must be on the delegation, while Leo and Nora refuse to serve on the delegation together. How many valid 55-person delegations can be formed?

Put Maya on the delegation first so you are filling the remaining spots from the other 1010 members. From that count, how many delegations break the rule by also including both Leo and Nora?

Put Maya on the delegation first, leaving 44 spots to fill from the remaining 1010 members in (104)=210\binom{10}{4} = 210 ways. Then subtract the forbidden delegations that also include both Leo and Nora: with Maya, Leo, and Nora all on the delegation, there are 22 spots left to fill from the other 88 members in (82)=28\leftover{\binom{8}{2}} = \leftover{28} ways (watch out for forgetting that Maya already takes up a spot and subtracting (83)=56\binom{8}{3} = 56 to get 154\leftover{154}, or crossing both Leo and Nora off at the same time to get (84)=70\binom{8}{4} = \leftover{70}, which leaves out delegations where one of them serves without the other):
(104)−(82)\displaystyle \binom{10}{4} - \leftover{\binom{8}{2}} =210−28\displaystyle = 210 - \leftover{28} =182\displaystyle = \howmany{182}
6

How many 1010-bit strings (sequences of ten 00s and 11s) contain at most two 11s?

"At most two 11s" splits into non-overlapping cases based on how many of the 1010 positions hold a 11. What are the possible counts of 11s?

Split into three non-overlapping cases by the number of 11s (zero 11s, one 11, or two 11s) and add them up (don't forget the all-zeros string `0000000000` for zero 11s or treat (100)\binom{10}{0} as 00, which would give 10+45=5510 + 45 = \leftover{55}):
(100)+(101)+(102)=1+10+10×92×1=1+10+45=56\displaystyle \begin{aligned} \binom{10}{0} + \binom{10}{1} + \binom{10}{2} &= 1 + 10 + \frac{10 \times 9}{\leftover{2 \times 1}} \\ &= 1 + 10 + 45 = \howmany{56} \end{aligned}
7

On a city street grid, you start at the bottom-left corner (0,0)(0, 0) and walk 66 blocks East (Right) and 44 blocks North (Up) to (6,4)(6, 4), moving only Right and Up. How many paths pass through the coffee shop located 33 blocks East and 22 blocks North at (3,2)(3, 2)?

Break the walk into two stages, from (0,0)(0, 0) to (3,2)(3, 2) and then from (3,2)(3, 2) to (6,4)(6, 4), and count how many Right and Up steps each leg takes.

Walking from (0,0)(0, 0) to (3,2)(3, 2) takes 3+2=53 + 2 = 5 steps with 22 Up steps ((52)=10\firstpool{\binom{5}{2}} = \firstpool{10} paths), and walking the remaining 33 blocks East and 22 blocks North from (3,2)(3, 2) to (6,4)(6, 4) also takes 55 steps with 22 Up steps ((52)=10\secondpool{\binom{5}{2}} = \secondpool{10} paths). Multiply the two stages because any first-leg path can be paired with any second-leg path (don't add the two legs to get 10+10=2010 + 10 = \leftover{20}):
(52)×(52)\displaystyle \firstpool{\binom{5}{2}} \times \secondpool{\binom{5}{2}} =10×10\displaystyle = \firstpool{10} \times \secondpool{10} =100\displaystyle = \howmany{100}
8

Ten towns are building direct point-to-point fiber-optic cables so that every pair of towns is connected. Four of the towns are on an island and already have all the cables connecting them to one another built. How many more cables need to be built to finish connecting all 1010 towns?

How many cables are needed to connect all 1010 towns in total, and how many of those cables are the ones already built among the 44 island towns?

Connecting all 1010 towns requires (102)=45\binom{10}{2} = 45 cables in total, and the 4\firstpool{4} island towns already have (42)=6\leftover{\binom{4}{2}} = \leftover{6} cables among themselves (avoid subtracting the 4\firstpool{4} island towns from the pool first and computing (10−42)=(62)=15\binom{10 - \firstpool{4}}{2} = \binom{6}{2} = \leftover{15}, which leaves out the 4×6=24\firstpool{4} \times \secondpool{6} = 24 cables needed to connect the 4\firstpool{4} island towns to the 6\secondpool{6} mainland towns):
(102)−(42)=10×92×1−4×32×1=45−6=39\displaystyle \begin{aligned} \binom{10}{2} - \leftover{\binom{4}{2}} &= \frac{10 \times 9}{\leftover{2 \times 1}} - \frac{4 \times 3}{\leftover{2 \times 1}} \\ &= 45 - \leftover{6} = \howmany{39} \end{aligned}
9

A pizza shop offers 88 toppings. Using the total number of subsets of an 88-element set, find how many ways you can order a pizza with at least 22 toppings if you cannot order all 88 toppings at once.

Start with all 282^8 subsets across every topping count from 00 to 88. Which specific subset sizes are ruled out by "at least 22 toppings" and "not all 88 toppings"?

The sum of (8k)\binom{8}{k} over all sizes kk from 00 to 88 is 28=2562^8 = 256. Subtract the disallowed sizes: 0\leftover{0} toppings ((80)=1\leftover{\binom{8}{0}} = 1), 1\leftover{1} topping ((81)=8\leftover{\binom{8}{1}} = 8), and all 8\leftover{8} toppings ((88)=1\leftover{\binom{8}{8}} = 1) (be careful not to overlook the 0\leftover{0}-topping plain pizza (80)=1\leftover{\binom{8}{0}} = 1, which would leave 256−8−1=247256 - 8 - 1 = \leftover{247}):
28−(80)−(81)−(88)\displaystyle 2^8 - \leftover{\binom{8}{0}} - \leftover{\binom{8}{1}} - \leftover{\binom{8}{8}} =256−1−8−1\displaystyle = 256 - 1 - 8 - 1 =246\displaystyle = \howmany{246}