T

Worst Case and the Pigeonhole Principle

Maths · HAST Middle Secondary
Years 8–9
Lesson Guide
Explanation
To be sure means it has to work even on the unluckiest possible run, so luck plays no part in the answer. You might get a matching pair in two draws, but you are not sure of one in two draws. The method is to imagine someone handing you the most awkward socks they can, deliberately, for as long as they can manage — then count how far they can string you along, and add one more draw. That one extra draw is the answer, and everything before it is just counting the unlucky run.
Your Turn
Could two socks be a matching pair? Check: yes — but you are not SURE, so two is not the answer.
Watch Out
"To be sure" and "how many might be needed" are opposite questions. Read which one is asked.
Explanation
Here is the core idea. The unluckiest first three draws give you one sock of each colour, so no pair. But there is no fourth colour, so the fourth sock must match something you already hold. Four socks guarantee a pair. The rule generalises: with however many categories there are, one more than that number forces a repeat. Notice that the thirty socks in the drawer played no part at all — only the three colours mattered. Big totals are put into these questions precisely to make you think the answer must be big.
Your Turn
A box has 5 colours of pen. How many must you take to be sure of two the same? Check: 6.
Watch Out
The answer depends on the number of CATEGORIES, not the number of items. 30 socks, 3 colours, answer 4.
Explanation
Asking for a pair of a specific colour changes the count enormously. To be sure of a red pair, assume the unlucky run hands you every black sock and every blue sock first — that is twenty socks with no red at all. Only then does red start appearing, and you need two of them. So twenty-two. Notice how different that is from four: wanting any matching pair took four socks, wanting a red pair takes twenty-two. The word red is doing all the work.
Your Turn
Same drawer — to be sure of ONE red sock? Check: 21, since 20 could be black and blue.
Watch Out
A pair means TWO. Stopping at 21 gives you one red sock, not a red pair.
Explanation
To be sure of a pair of every colour, the unlucky run empties two whole colours first. Ten black, then ten red — that is twenty socks, and you already have a black pair and a red pair, but not a single blue. Blue is now all that is left, so two more draws finish it. Twenty-two. It is worth noticing that this is the same number as the red-pair question but reached by a completely different unlucky run, so do not assume that matching numbers mean matching reasoning. Build the run each time.
Your Turn
Same drawer — a pair of each colour needs 22. What if there were 4 colours of 10? Check: 32.
Watch Out
Two questions can share an answer by coincidence. Work the run out rather than reusing a number.
Explanation
A few phrases always signal this question type: to be sure of, guaranteed, must, certain to, and the smallest number that will always work. By contrast, might, could and at best are asking about a lucky run instead, which is a different and much easier question. The method is three steps every time: work out the unluckiest run that still fails, count how long it is, and add one more draw. Just be careful at the end — if success means a pair you add two, not one. Quiz and exercises now.
Your Turn
4 colours, 10 of each. To be sure of any matching pair? Check: 5.
Watch Out
Success might be one item, a pair, or one of each. The final step depends on which.
📌 Key Points — this lesson in a nutshell
  • "To be sure" means it must work even on the unluckiest possible run.
  • Imagine someone handing you the worst items on purpose, then count one more.
  • Pigeonhole: with 3 colours, 4 socks must contain a matching pair.
  • For a specific colour, assume you are given every other colour first.
Step 1: Introduction
Step 1 of 5
10 black, 10 red, 10 blue socks in a drawer black 10 drawn red 10 drawn blue 10 drawn "How many must you take to be SURE?" is not "how many might be enough?" You might get a matching pair in two draws. You are not sure of it in two draws. So ignore luck entirely and imagine the unluckiest run that could happen. Picture someone handing you the most awkward socks on purpose. Count how far they can string you along — then add one more draw. That "one more" is the whole answer. The rest is just counting the run.
Three colours, so four socks must match forced The unluckiest first three draws give one of each colour — no pair yet. There is no fourth colour, so the fourth sock MUST match one you already hold. So 4 socks guarantee a matching pair, whatever happens. The rule: with C categories, C + 1 items force a repeat. It does not matter that there are 30 socks — only that there are 3 colours. Large totals are put in the question to make you think the answer is large. Count the CATEGORIES, not the items.
To be sure of a RED pair every black sock, handed to you first 10 every blue sock as well 10 still no red pair — you hold 20 socks 20 now red is all that is left: two more +2 smallest number to be sure 22 For a specific colour, assume every other colour is handed over first. Only then do you start getting reds — and you need two of them, not one.
To be sure of a pair of each colour all 10 black — that is one black pair 10 all 10 red — now black and red pairs 10 20 socks, but still not a single blue 20 blue is all that remains: two more +2 smallest number to be sure 22 The unlucky run exhausts two whole colours before giving you the third. It happens to be 22 again — the same number, reached by a completely different run.
Spotting the question type "to be sure of" · "guaranteed" · "must" · "certain to" "the smallest number that will always work" "might" · "could" · "at best" → a lucky run, not a worst case The three steps, every time: 1. What is the unluckiest run that still fails? 2. How long is it? 3. Add one more. For a pair you add two at the end, not one. Read what counts as success. Worst run · pigeonhole · specific colour · all colours · the signal words. Quiz and exercises now.
Was this lesson helpful? Rate this Course
Discussion
Loading comments...