Emzini weCodeUmhlahlandlelaMathematics 15.6 · Sets, Logic and Counting NoticesAll books

Chapter 15/15.6Accelerateabout 4 min

Choosing: combinations and Pascal's triangle

Try this first

Five learners, A, B, C, D and E, want to choose 2 of them to attend a coding camp. List every possible pair. How many are there? How does this compare with the number of ways of choosing a leader and a deputy from the five?

There are 10 pairs. Choosing a leader and a deputy gives 5 × 4 = 20 ordered choices, but now order does not matter: AB and BA are the same pair, so each pair was counted 2 times. Then 20 ÷ 2 = 10.

Definition

combination A combination is a selection of objects in which order does not matter. The number of ways of choosing r objects from n is written C(n, r), read "n choose r".

Key fact

Counting combinations. C(n, r) = n!/r! (n − r)!. Ordered choices number n!/(n − r)!, and each unordered choice of r objects appears among them r! times, once for each order.

The handshake count of Chapter 1 is C(n, 2): each handshake is a choice of 2 people.

Worked example 15.5
  1. (a)How many committees of 3 can be chosen from 7 learners?
  2. (b)How many committees of 2 boys and 2 girls from 5 boys and 4 girls?
(a)
C(7, 3) = 7 × 6 × 5/3 × 2 × 1 = 35
(b)
Choose the boys and then the girls:
C(5, 2) × C(4, 2) = 10 × 6 = 60

Now try one yourself

The link with Pascal's triangle. Row 7 of Pascal's triangle (Chapter 10) is 1, 7, 21, 35, 35, 21, 7, 1, and C(7, 3) = 35 is entry 3, counting from 0. This is no accident. In Chapter 10 each entry counted paths, each path being a choice of which rows to go right in. In general, entry r in row n is C(n, r).

Key fact

Pascal's rule. C(n, r) = C(n − 1, r − 1) + C(n − 1, r).

Proof

Fix one learner, Thandi, among the n. A committee of r either includes Thandi or not. If it does, the other r − 1 members come from the other n − 1 learners: C(n − 1, r − 1) ways. If not, all r come from the other n − 1: C(n − 1, r) ways. By the addition principle the total is the sum.

This is the rule that builds the triangle, each number being the sum of the two above it. It also shows why C(n, r) = C(n, n − r): choosing who goes is the same as choosing who stays.

Check your understanding 15.6

  1. Find C(6, 2), C(8, 3) and C(10, 8).
    Show answerHide answer
    15, 56 and 45.
  2. In how many ways can 4 books be chosen from 9?
    Show answerHide answer
    C(9, 4) = 126.
  3. How many lines join 12 points, no three of which lie on a straight line?
    Show answerHide answer
    C(12, 2) = 66.