Math Core

Module 2.4 · Counting and Probability

Combinations

A combination is a selection where order doesn't matter: a committee, a hand of cards, a set of pizza toppings. Combinations count handshakes, diagonals, triangles, grid paths and ways to share identical objects. They are the most-used formula on the counting problems of the AMC 8.

From permutations to combinations

How many ways can you choose 33 toppings from 88? If order mattered, there would be 8⋅7⋅6=3368 \cdot 7 \cdot 6 = 336 ordered choices. But each set of 33 toppings (say mushroom, onion, pepper) appears 3!=63! = 6 times in that list, once for each order. So there are 336÷6=56336 \div 6 = 56 sets.

Combinations

The number of ways to choose kk objects from nn different objects, when order doesn't matter, is

(nk)=n⋅(n−1)⋯(n−k+1)k!=n!k! (n−k)!.\binom{n}{k} = \frac{n \cdot (n-1) \cdots (n-k+1)}{k!} = \frac{n!}{k!\,(n-k)!}.

Read (nk)\binom{n}{k} as "nn choose kk."

Two facts save time:

  • Symmetry: (nk)=(nn−k)\dbinom{n}{k} = \dbinom{n}{n-k}. Choosing 33 people to go is the same as choosing n−3n - 3 to stay. So (108)=(102)=45\binom{10}{8} = \binom{10}{2} = 45.
  • Pairs: (n2)=n(n−1)2\dbinom{n}{2} = \dfrac{n(n-1)}{2}. This counts handshakes, games in a round robin, and segments between nn points.

Ask: does order matter?

Choosing a president, vice president and treasurer is a permutation (the jobs are different). Choosing a 33-person committee is a combination (the members are equal). If swapping two chosen items gives a different result, use permutations; if it gives the same result, use combinations.

Worked example: A committee with two groups

A club has 66 boys and 55 girls. How many 55-person committees have exactly 33 boys and 22 girls?

Choose the boys and the girls separately, then multiply: (63)⋅(52)=20⋅10=200\dbinom{6}{3} \cdot \dbinom{5}{2} = 20 \cdot 10 = 200.

Grid paths

To walk from the bottom-left corner to the top-right corner of a 4×34 \times 3 grid, moving only right or up, you make 44 right moves and 33 up moves, 77 moves in all.

A 4 by 3 grid. Every shortest path from the bottom-left corner to the top-right corner uses 4 right moves and 3 up moves.

A path is decided by which 33 of the 77 moves are "up." So there are (73)=35\dbinom{7}{3} = 35 paths.

Worked example: Paths through a point

On the grid above, how many shortest paths pass through the point (2,1)(2, 1)?

Split the walk at (2,1)(2, 1). From (0,0)(0, 0) to (2,1)(2, 1): 22 rights and 11 up, (31)=3\binom{3}{1} = 3 paths. From (2,1)(2, 1) to (4,3)(4, 3): 22 rights and 22 ups, (42)=6\binom{4}{2} = 6 paths. Total: 3⋅6=183 \cdot 6 = 18.

Sharing identical objects (stars and bars)

Worked example: Stars and bars

In how many ways can 1010 identical candies be given to 33 children (a child may get none)?

Line up the 1010 candies as stars and insert 22 bars to split them into 33 groups: ⋆⋆⋆∣⋆⋆⋆⋆⋆∣⋆⋆\star\star\star \mid \star\star\star\star\star \mid \star\star means 33, 55, 22. Every arrangement of 1010 stars and 22 bars gives one sharing, and every sharing gives one arrangement. So count the ways to choose the 22 bar positions among 1212 spots: (122)=66\dbinom{12}{2} = 66.

If each child must get at least one, first hand one candy to each child, then share the remaining 77 freely: (92)=36\dbinom{9}{2} = 36.

Common mistake

Stars and bars only works when the objects are identical. Giving 1010 different prizes to 33 children is a multiplication problem: 3103^{10}, since each prize independently picks a child.

Practice

Practice 1

Seven people are at a party, and each person shakes hands with every other person exactly once. How many handshakes take place?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 2

How many diagonals does a convex octagon have?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 3

Ten points are marked on a circle. How many triangles have all three vertices among these points?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 4

A team of 44 is chosen from 66 girls and 55 boys. How many teams have exactly 22 girls?

Practice 5

A robot walks from (0,0)(0, 0) to (5,3)(5, 3), one unit at a time, moving only right or up. How many different paths can it take?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 6

Six points are marked on a line ℓ\ell, and four points are marked on a different line mm parallel to ℓ\ell. How many triangles have all three vertices among these 1010 points?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 7

A committee of 44 is chosen from 77 people. Two of the people, Rosa and Sam, refuse to serve together. How many committees are possible?

Practice 8

In how many ways can 1212 identical pencils be given to 44 students so that each student gets at least one pencil?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Real contest practice