Lesson progress
0 / 10
Chapter 23 · The Pigeonhole Principle

Find the Objects, Drawers, and Guaranteed Count

Turn a crowded situation into a proof. Identify the objects, choose the drawers, build the greatest arrangement that can still fail, and add the one object that forces success.

10 interactive missionsWorks offlineAutosavesoriginal examples included
Your answers save automatically in this browser.

The worked example calls them “apples” and “drawers”

The objects are the things being placed, chosen, or classified. The drawers are the categories they can enter. A drawer can be a score, birth month, card rank, color pair, or box occupancy.

Power question: What is the greatest number of objects that can be placed while the desired event is still avoided?

Two guarantee formulas

N objects in k drawers ⇒ at least ⌈N ÷ k⌉ in one
To force r in one of k drawers: k(r−1)+1
1

Identify objects, drawers, and the overloaded drawer

Begin with a balanced worst-case picture.
Not complete

Interactive drawer model

Move the sliders. The page distributes the objects as evenly as possible—the arrangement that makes the fullest drawer as small as it can be.

Equal base3
Extras2
Guaranteed4

Balanced distribution

Why it proves the guarantee: no other distribution can make every drawer smaller than this fullest drawer.

Checkpoint

Seventeen objects are placed into five drawers. At least how many objects must be in one drawer?

Need a hint? Start here

Try the most even distribution.

Show the reasoning

Five drawers can hold 3 each: 15 objects. With 17 objects, at least one drawer holds 4. The arrangement 4,4,3,3,3 shows you cannot force 5.

2

Work backward from the guarantee you want

Fill every drawer to the greatest still-unsuccessful level.
Not complete

Reverse guarantee builder

6 × (4 − 1) + 1 = 19

The “one more” proof

  1. Keep every drawer at no more than r−1.
  2. The greatest unsuccessful total is k(r−1).
  3. The next object has nowhere safe to go.
Eighteen objects can still be arranged as 3 in each of 6 drawers. Object 19 forces a fourth object somewhere.

Checkpoint

How many objects guarantee at least four in one of six drawers?

Need a hint? Start here

How many fit if every drawer stays one below the target?

Show the reasoning

Six drawers can hold 3 each without reaching 4: 18 objects. One more gives the guarantee 19.

3

Worked example 5 — force a repeated card rank

Count the greatest draw that can still avoid a repeated ordinary rank.
Not complete
original setup: Draw cards without replacement. A 54-card deck has 13 ordinary ranks, four suits per rank, plus a big joker and a small joker. The two jokers are different one-off types.

Build the greatest safe draw

Take one card from every ordinary rank, then both different jokers. No ordinary rank repeats yet.

Why the next card forces success

After all 15 safe types have been used, every remaining card belongs to an ordinary rank already represented.

13 ordinary ranks + 2 distinct jokers = 15 safe cards
15 + 1 = 16 cards to guarantee a repeated rank

Checkpoint

Need a hint? Start here

Jokers do not count as an ordinary rank pair.

Show the reasoning

You can choose one of each of 13 ordinary ranks and both jokers: 15 cards with no ordinary pair. Card 16 must repeat an ordinary rank.

4

Worked example 6 — guarantee the multiset 2, 0, 0, 9

A target may need repeated copies of one category.
Not complete

Inventory in the bag

Digit d appears on 10+d balls.

Find the largest way to fail

Draw balls without replacement. You may choose any four of the drawn balls and arrange them to read2009; their draw order does not matter. To avoid forming2009, at least one requirement must be missing.

Failure conditionMost drawsReason
At most one zero136All 135 nonzero balls + one zero
No digit 2133All balls except the 12 twos
No digit 9126All balls except the 19 nines
The greatest unsuccessful case is 136. The next draw forces {2,0,0,9}.

Checkpoint

Need a hint? Start here

List every way the digits for 2009 could still be missing.

Show the reasoning

Failure can mean at most one zero, no 2, or no 9. From the total 145, those permit 136, 133, or 126 draws. The largest failure is 136, so 137 guarantees success.

5

Guided Practice 5 — strengthen a basic guarantee with the total

Eighteen nonempty boxes hold 64 balls, with at most 6 per box.
Not complete

First use ordinary pigeonhole counting

The six possible occupancies—1 through 6 balls—are the drawers.

⌈18 ÷ 6⌉ = 3

The brackets ⌈ ⌉ mean divide, then round upward if there is a remainder. For example, ⌈17 ÷ 5⌉ = 4.

This guarantees three boxes with the same occupancy, but the total of 64 gives more information.

Why three each cannot happen

If no occupancy appeared four times, all six occupancies would have to appear exactly three times:

3(1+2+3+4+5+6)=63

There are actually 64 balls, so some occupancy appears at least four times.

Tight example: frequencies (2,4,3,3,3,3) use 18 boxes and 64 balls, with maximum frequency 4.

Occupancy-frequency laboratory

Each input is the number of boxes containing 1, 2, …, 6 balls.

Boxes18
Balls63
Largest frequency3

Checkpoint

Need a hint? Start here

The drawers are occupancies, not physical boxes.

Show the reasoning

There are six possible occupancies. If each occurred at most 3 times, 18 boxes require exactly 3 of each. That totals 63 balls. The 64th forces an occupancy to occur at least 4 times.

6

Transfer the principle to scores and birthdays

A drawer can be a score or a year–month category.
Not complete

Test 23 transfer — integer scores

There are 10,000 test takers. Four fifths score at least 60. Scores are whole numbers and the maximum is 150.

8,000 objects ÷ 91 score drawers
⌈8000 ÷ 91⌉ = 88

Test 23 transfer — same birth year and month

Fifty students were all born in either 2014 or 2015. Their birth year–month falls into at most:

2 years × 12 months = 24 drawers
⌈50 ÷ 24⌉ = 3

Checkpoint

The two calendar years are essential. Knowing only that children are aged 11 or 12 can span parts of three calendar years; it does not justify 24 year–month drawers.
Need a hint? Start here

Include both endpoints of a score range. Use the stated calendar years.

Show the reasoning

There are 150 − 60 + 1 = 91 integer scores; 91 × 87 = 7917 < 8000, so at least 88 match. Two calendar years give 24 year–month categories; 2 in each accounts for 48, so 50 force 3.

7

Combine lower and upper guarantees, then count pair types

Some problems need two bounds or a compound drawer.
Not complete

Exactly how many girls?

Fifty-five contestants are divided into four nonempty groups. In every possible division, at least one group has more than two girls. This forces at least:

4×2+1=9 girls

Any ten contestants include a boy, so ten girls cannot exist. Thus there are at most 9 girls.

Exactly 9 girls and 46 boys.

Two-ball color-pair outcomes

With five colors, each person draws two balls and replaces both before the next person draws. There are at least two balls of each color. Each result is an unordered pair with repetition. Red–blue and blue–red are one type; red–red is allowed.

5 same-color + 10 mixed = 15 pair drawers

Sixteen people force two identical color-pair outcomes.

Checkpoint

Need a hint? Start here

Turn each statement about girls into a bound. For colors, ignore order.

Show the reasoning

The group condition forces at least 9 girls; any ten containing a boy permits at most 9 girls. There are 46 boys. Two-ball types are 5 matching colors plus 10 mixed pairs, so 16 people force a duplicate.

8

Use capacities in a general worst-case laboratory

Finite supplies can change the simple formula.
Not complete

Capacity-aware guarantee (draw without replacement)

For capacities c₁,c₂,…, the greatest draw avoiding r from one category is:

min(c₁,r−1)+min(c₂,r−1)+···
Total supply19
Greatest safe draw14
Threshold15

Two direct transfers

Colored balls: capacities 4, 7, 8; target 6.

4+5+5=14; next draw ⇒ 15

Toys among six children: force four toys for one child.

6×3+1=19

Checkpoint

Need a hint? Start here

Each category can contribute at most target minus one, but never more than its supply.

Show the reasoning

For capacities 4,7,8 and target 6, the safe draw is 4+5+5=14: 15 forces six. To force four toys in one of six categories, 6×3+1=19 toys suffice.

Try a fresh problem

Seven shelves receive books. What is the least number of books that guarantees at least six on one shelf?

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

Seven shelves with five books each hold 35 without six together. Book 36 forces six.

9

Guaranteed-count workshop

Correct all eight to complete the workshop.
Not complete
Not graded yet
Answer all eight, then grade your work.
Need a hint? Start here

Revisit the mission connected to each question.

Show the reasoning

Answers:4,19,16,137,4,88,3,16. For each minimum threshold, build a draw or distribution that falls one short:18objects,15cards,136balls,or15different pair types. The64-ball occupancy total strengthens3matching boxes to4.

10

Exit ticket and certificate

All five answers must be correct, and all ten missions must be complete to earn the certificate.
Not complete
Chapter 23 Achievement

Objects & Drawers Guarantee Architect

This certificate recognizes

A determined learner

for identifying objects and drawers, building worst-case arrangements, and proving sharp guarantees.

Lesson 23.1 completed

Need a hint? Start here

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

Show the reasoning

28objects in9drawers force4. Seven drawers holding4each can hold28, so29forces5. Supplies4,7,8 allow at most4+5+5=14without6matching, so15forces it. Four colors give4matching-color types and6mixed types:10types, so11people force a repeated type.

Optional reflection

Saved, but not automatically graded.

Exercise notes and lesson scope

This page develops the chapter introduction’s “apples and drawers” language, original Examples 5 and 6, Guided Practice 5, and selected direct-guarantee exercises. It also uses four transfer problems from Test 23. The ceiling formula, capacity laboratory, unordered-pair matrix, tight examples, and automatic feedback are added learning supports.

Next: Lesson 23.2 invents number drawers that force coprime pairs, fixed differences, shared factors, and forbidden sums.