Progress
0 / 10
The Pigeonhole Principle · Worst-case capacity

Count the Worst Case before a Match Is Forced

Fill every category in the most unhelpful legal way. Once even that arrangement cannot avoid the target, the next object proves the guarantee.

maximum failure + 1finite capacitiesoutcome drawerspair guarantees
Saved only in this browser.

The decisive question

Do not begin with the successful arrangement. Ask:

What is the greatest number of objects I can take while the desired match still fails?

That value is the failure ceiling. If the available supplies make the target possible, one more object forces success. Otherwise no draw can guarantee an impossible target.

1
Foundation

Build the greatest unsuccessful arrangement

Not complete

Unlimited category laboratory

8maximum failure
9guarantee
3forced occupancy
4drawers

Why the next object works

  1. Keep every drawer below the target by placing at most r−1 objects in it.
  2. Across k drawers, that permits at most k(r−1) objects.
  3. The next object cannot fit without creating a drawer of size r.
“At least” questions need an unsuccessful example and the argument that one more object forces success.
Checkpoint
Need a hint? Start here

Keep every drawer just below its target.

Show the reasoning

Seven drawers can hold 4 each: 28 objects without five together. The 29th forces five in a drawer. In general the threshold is k(r−1)+1.

2
Worked example 5

Draw cards until an ordinary rank must repeat

Not complete

The greatest safe draw

Draw without replacement from a54-card deck:13ordinary ranks with4cards each, plus two different jokers. Take one card per ordinary rank and both jokers to avoid an ordinary-rank pair.

What the drawers really are

The repeated property concerns the 13 ordinary ranks. The two jokers are one-time escape cards: both can be drawn without repeating an ordinary rank.

15 can fail: 13 different ranks + 2 jokers.
16 must succeed: every remaining card has an ordinary rank already seen.

The suits do not create separate drawers because the desired match is a repeated rank, not a repeated exact card.

Checkpoint
Need a hint? Start here

Keep the two jokers separate from the ordinary ranks.

Show the reasoning

One of each of 13 ordinary ranks plus the two jokers makes a safe draw of 15. A 16th card must repeat an ordinary rank.

3
Worked example 6

Guarantee a target multiset: the digits 2, 0, 0, 9

Not complete

Available inventory

There are10balls labeled0,11labeled1,…,19labeled9. Draw without replacement. You may select any four drawn balls and reorder them to read2009; draw order does not matter.

145all balls
2zeros needed
1two needed
1nine needed

Which failure mode lets us draw the most?

To avoid the complete target, at least one required label must still be short. The most dangerous failure mode is the one with the greatest possible draw.

One extra draw beyond that greatest failure forces every required label count to be present.
Checkpoint
Need a hint? Start here

Compare all ways the required digit collection can fail.

Show the reasoning

With 145 balls, at most one zero permits 136 draws, no 2 permits 133, and no 9 permits 126. The greatest failure is 136, so 137 guarantees 2009.

4
Guided Practice 5

Use the total to strengthen the ordinary ceiling bound

Not complete

Eighteen nonempty boxes contain 64 balls, and every box holds at most 6. The possible occupancies are 1 through 6.

Occupancy-frequency table

Live audit

18boxes
63balls
3largest frequency
near missstatus
The basic principle gives only ⌈18÷6⌉=3. But if every occupancy appeared exactly three times, the total would be 3(1+2+3+4+5+6)=63, not 64.

A 64-ball arrangement with largest frequency 4 proves the strengthened guarantee is tight.

Checkpoint
Need a hint? Start here

An occupancy is the number of balls in a box.

Show the reasoning

There are six possible occupancies. At most three of each would force exactly three of each in 18 boxes, totaling 63 balls. The actual 64 balls force four boxes with the same occupancy.

5
Finite capacities

Stop counting a category when its supply runs out

Not complete

original Exercise 1: colored balls

Draw without replacement from4red,7yellow,and8black balls. To avoid six of one color, a color may contribute at most 5 balls—but red can contribute only 4.

4red safe maximum
5yellow safe maximum
5black safe maximum
4+5+5=14 can still fail; 15 forces six of a color.

General finite-capacity laboratory (draw without replacement)

14maximum failure
15guarantee
19total supply
yestarget possible
original Exercise 5. If 125 toys are shared among 40 children, 3 toys each would use only 120. Therefore someone receives at least 4 toys.
Checkpoint
Need a hint? Start here

A category cannot supply more balls than it has.

Show the reasoning

To avoid six of one color, capacities 4,7,8 permit only 4+5+5=14 safe draws. The 15th forces six. If every capacity is below the target, success is impossible even after drawing all balls.

6
Outcome drawers

Count ordered and unordered outcomes correctly

Not complete

Ordered two-digit numbers

Each student has cards1,2,3, chooses two different cards and arranges them as a two-digit number. Cards are available again for the next student.

6 outcomes, so 7 students force two equal numbers.

Unordered ball pairs

Each person chooses two balls, then replaces both before the next choice; at least two of each type are available. When two balls are considered together, red–blue and blue–red are the same outcome, and same-color pairs are allowed.

10pair types
11same outcome among 101

The formula

n same-type pairs + C(n,2) mixed pairs
n(n+1)/2

Test 23 gives:

  • 4 ball types → 10 outcomes; 101 people force 11 equal outcomes.
  • 5 colors → 15 outcomes; 16 people force a repeated unordered color pair.
Checkpoint
Need a hint? Start here

Decide whether changing order creates a new outcome.

Show the reasoning

Two different digits from 1,2,3 make six ordered numbers, so seven choices force a duplicate. Two balls from five colors have 5 same-color and 10 mixed types: 15 unordered outcomes, so 16 force a duplicate.

7
Pairs and occupancy categories

Count all harmless leftovers before a pair or match is forced

Not complete

Test 23 Question 10: guarantee ten sock pairs

There are four sock colors with enough of each available. Draw without replacement; a pair is any two socks of the same color, and no sock can belong to two pairs. Left/right sock labels are irrelevant. To avoid ten pairs, keep only nine completed pairs, then add one unpaired sock of each color.

2×9+4=22 may still have only 9 pairs.
23 socks force 10 pairs.

Exercise 7: apple-box occupancies

Each of 126 boxes contains an integer number of apples from 120 through 144.

25possible counts
126boxes
6forced equal count
5per count may fail
Five boxes in each of 25 drawers use 125 boxes. The 126th box makes some occupancy occur six times.

Range-category laboratory

25drawers
6forced frequency
125largest count below this forced occupancy
1extra object
Checkpoint
Need a hint? Start here

A color may have one leftover sock after its completed pairs.

Show the reasoning

Nine pairs use 18 socks; four colors allow four additional singles. Thus 22 may still have only nine pairs, while 23 force ten. For apple counts 120–144 there are 25 values, so 126 boxes force six with the same count.

8
Coverage and distinct totals

Use blocks and minimum totals when ordinary drawers are hidden

Not complete

Exercise 2: cover a row of 27 seats

Choose the initial occupied seats so that every remaining empty seat has an occupied seat immediately to its left or right. The27seats form one row, not a circle. What is the fewest initial occupants? One seated person can cover at most a block of three seats: left neighbor, own seat, right neighbor.

⌈27÷3⌉=9

Exercise 10: 450 books among 30 students

Every student has a positive number of books. If all 30 counts were different, the smallest possible total would be:

1+2+⋯+30=465

But the actual total is only 450, so at least two students must have the same number of books.

The positivity condition matters. Without it, the minimum distinct total would change.
Checkpoint
Need a hint? Start here

A seated person covers at most three positions.

Show the reasoning

Twenty-seven positions need at least nine people; seats 2,5,8,…,26 attain it. Thirty distinct positive book counts total at least 1+…+30=465, so a total of 450 forces a repeated count.

Try a fresh problem

A bag has 3 red, 8 blue, and 9 green balls. What is the least number of blind draws without replacement that guarantees five balls of one color?

This fresh problem has its own checkpoint. Your written explanation is saved for comparison and is not automatically graded.

Worked explanation for the fresh problem

The greatest failing draw is 3 red + 4 blue + 4 green = 11. Draw 12 forces five blue or five green. Red can never supply five.

9
Practice

Worst-case counting workshop

Not complete
0 / 8 correct
Correct all eight questions to complete the workshop.
Need a hint? Start here

Revisit the mission connected to each question.

Show the reasoning

For each threshold, identify the largest possible failure. Cards:15;digit bag:136;colored balls:14;socks:22. Add one only when success is possible. For the book argument, the least distinct positive total is465;for seat coverage,9occupants suffice.

10
Exit ticket

Show that you can locate the failure ceiling

Not complete
Chapter 23 Achievement

Worst-Case Match Guarantee Architect

This certifies that

Learner

can build a greatest unsuccessful arrangement, count finite category capacities, and prove that the next object forces a match.

Lesson 23.6 · The Pigeonhole Principle

Optional reflection — not graded
Need a hint? Start here

Solve each item without using the answer shown in an earlier example.

Show the reasoning

Answers:21;16;137;23;6. Four unlimited categories can hold5each without6together;20+1=21. The card, digit and sock failure ceilings are15,136,22. For126boxes in25occupancy categories, five per category cover only125.