Emzini weCodeUmhlahlandlelaMathematics 15.7 · Sets, Logic and Counting NoticesAll books

Chapter 15/15.7Accelerateabout 6 min

The pigeonhole principle

Try this first

How many learners must be in a room to be sure that two of them have birthdays in the same month? Can you be sure with 12?

With 12 learners every month might be different. With 13 it cannot: 13 birthdays cannot fit into 12 months without two sharing. Recall the pigeonhole principle from Chapter 10. Here it is in a stronger form.

Key fact

The pigeonhole principle. If more than k × n objects are put into n boxes, at least one box contains at least k + 1 objects.

Proof

If every box held at most k objects, there would be at most k × n objects altogether. There are more, so some box holds more than k.

The skill is in deciding what the boxes are. With k = 1 we get the form from Chapter 10.

Worked example 15.6
  1. (a)A drawer holds 10 black, 10 grey and 10 white socks. How many must you take out in the dark to be sure of a pair of the same colour? To be sure of a black pair?
  2. (b)A school has 1,000 learners. Prove that at least 3 share a birthday.
  3. (c)Prove that from any 6 whole numbers you can choose two whose difference is divisible by 5.
(a)
The colours are 3 boxes, so 4 socks make a pair certain, and 3 do not (one of each).
For a black pair, you might first take all 20 grey and white socks, so you need 22.
(b)
The boxes are the 366 possible birthdays.
Since 1,000 is more than 2 × 366 = 732, some birthday is shared by at least 3.
(c)
The boxes are the 5 possible remainders on division by 5.
Six numbers in 5 boxes put two in the same box.
Two numbers with the same remainder differ by a multiple of 5.

Now try one yourself

Solving the six learners problem. Choose one learner, Farai. Each of the other 5 either knows Farai or does not: 5 objects in 2 boxes, and 5 is more than 2 × 2, so one box holds at least 3. Suppose 3 learners all know Farai (the other case is the same with the words swapped). If any two of these 3 know each other, they and Farai are three who all know each other. If no two of them know each other, those 3 are all strangers. Either way we are done. With five people it can fail: put them round a circle, with neighbours knowing each other and no one else. This is the start of Ramsey theory, named after the English mathematician Frank Ramsey, who proved a general result of this kind in 1930.

The pigeonhole principle at workMore things than boxes: some box must hold at least two of them.13 BIRTHDAYS, 12 MONTHSSIX LEARNERSJanFebMarAprMayJunJulAugSepOctNovDec12 months, 13 birthday cardstwo must share one monthFaraiABCDE?knows Faraistrangernot decided yetFarai knows 3 of the 5: A, B and C
Figure 15.5 Left: 13 birthdays in 12 months. Right: three of the five others are on the same side of Farai.
Going further

Some infinities are bigger. Two sets have the same size if their elements can be paired off exactly, with none left over, as people can be matched with chairs. In the 1870s the German mathematician Georg Cantor took this seriously for infinite sets. The even numbers can be paired with all the counting numbers (1 with 2, 2 with 4, 3 with 6, ...), so there are just as many of them, although they seem to be half. But Cantor proved that the points of a line cannot be paired off with the counting numbers: any list of decimals misses some decimal. So there are different sizes of infinity, and the infinity of the line is bigger. Many mathematicians of his time rejected the idea. Today it is a foundation of mathematics.

Check your understanding 15.7

  1. How many learners guarantee that two share the same first letter of their first name?
    Show answerHide answer
    27, since there are 26 letters.
  2. A bag has 5 red, 7 blue and 9 green beads. How many must be drawn blindly to be sure of 3 of the same colour?
    Show answerHide answer
    Seven. Six beads could be two of each colour, but 7 is more than 2 × 3, so some colour has at least 3.
  3. Prove that among any 5 whole numbers, two have a difference divisible by 4.
    Show answerHide answer
    The boxes are the 4 remainders on division by 4. Five numbers in 4 boxes put two in the same box, and their difference is a multiple of 4.