Pigeonhole principle
This chapter introduces the Pigeonhole Principle, a fundamental combinatorial technique for proving existence by mapping elements to categories. Mastering its basic and strong forms, along with advanced applications in extremal counting, is crucial for solving a wide range of problems frequently encountered in CMI examinations.
---
Chapter Contents
|
| Topic |
|---|-------| | 1 | Basic pigeonhole | | 2 | Strong pigeonhole | | 3 | Extremal counting applications |---
We begin with Basic pigeonhole.
Part 1: Basic pigeonhole
Basic Pigeonhole
Overview
The pigeonhole principle is one of the simplest ideas in combinatorics, but in serious problems it appears in disguised forms: repeated values, repeated remainders, repeated states of a process, equal subset sums, and bounded trajectories. In CMI-style questions, the difficulty is usually not the statement of the principle, but identifying what the objects are and what the boxes are. ---Learning Objectives
After studying this topic, you will be able to:
- Apply the basic and generalized pigeonhole principles correctly.
- Detect hidden pigeonholes such as residues, intervals, and bounded states.
- Use repeated-value arguments in sequences and processes.
- Convert a counting problem into an object-box framework.
- Build subset-sum and equal-value conclusions using pigeonhole reasoning.
Core Idea
If more than objects are placed into boxes, then at least one box contains at least two objects.
If objects are placed into boxes, then at least one box contains at least
objects.
The Real Skill
In many problems, the objects are not physical objects. They can be:
- numbers
- remainders
- subset sums
- positions in a process
- values of a sequence
- intervals
- colors
The boxes can also be disguised:
- possible residues modulo
- a bounded set of states
- possible birthdays, months, or labels
- possible sums in a restricted range
Standard Forms
- Repeated remainder
- Among integers, two have the same remainder modulo .
- Repeated value in a bounded set
- If a sequence takes more values than the number of allowed states, some value repeats.
- At least one large box
- If objects are distributed among boxes, some box gets at least objects.
- Equal subset sums
- If more subsets are formed than the number of possible sums, two distinct subsets must have the same sum.
Minimal Worked Examples
Example 1 Among people, prove that at least two are born in the same month. There are people and only months. So there are more objects than boxes. Hence at least two people are born in the same month. --- Example 2 If balls are placed into boxes, prove that some box contains at least balls. By the generalized pigeonhole principle, So some box contains at least balls. ---Repeated Remainders
When integers are divided by , there are only possible remainders:
So if you have more than integers, at least two must have the same remainder modulo .
Bounded-State Version
Suppose a sequence or process can only take values from a finite set of size .
If the process produces more than terms, then at least two of those terms must be equal.
This is exactly the hidden structure in many olympiad- and CMI-style sequence problems.
Prefix-Sum and Equal-Sum Method
Suppose a sequence of numbers gives rise to cumulative sums
If two of these are equal, say with , then
which means the sum of the terms from step to step is zero.
This is a very common way pigeonhole creates nonempty subsets with equal total or zero total.
- sums stay within a bounded interval
- there are more prefix sums than available values
- equal states imply equal partial totals
Subset-Sum Pigeonhole
If many different subsets are formed but only few possible sums are available, then two distinct subsets must have the same sum.
This often leads to:
- equal subset sums
- a zero-sum difference of two subsets
- existence of nonempty subsets with prescribed total
PYQ-Relevant Insight
The PYQ you gave uses pigeonhole in a deeper way:
- First show the process values lie in a bounded interval.
- Then count how many distinct values are possible.
- If the sequence has more terms than available values, some value repeats.
- Equal repeated values then produce equal sums from two different parts of the process.
So the problem is not just βmore objects than boxesβ; it is:
- objects = sequence positions or prefix states
- boxes = allowed integer values of the state
Common Mistakes
- β Saying βby pigeonholeβ without identifying objects and boxes
- β Forgetting to count the number of boxes correctly
- β Using instead of
- β Treating repeated values as useless, instead of converting them into equal-sum information
- β Ignoring the possibility of hidden pigeonholes such as residues or state values
CMI Strategy
- Ask: what are the objects?
- Ask: what are the boxes?
- Count the boxes carefully.
- If the problem involves a process, bound the possible states.
- If two states repeat, subtract them to extract structural information.
- If subsets are involved, compare the number of subsets to the number of possible sums.
Practice Questions
:::question type="MCQ" question="If objects are placed into boxes, then some box must contain at least" options=["","","",""] answer="B" hint="Use the generalized pigeonhole principle." solution="We compute So some box contains at least objects. Hence the correct option is ." ::: :::question type="NAT" question="Among integers, what is the minimum number that must have the same remainder when divided by ?" answer="3" hint="There are only possible remainders." solution="The possible remainders modulo are so there are boxes. If integers are distributed among these remainder classes, then some class contains at least integers. Therefore the answer is ." ::: :::question type="MSQ" question="Which of the following are standard uses of the pigeonhole principle?" options=["Proving two numbers have the same remainder modulo ","Proving a bounded-state sequence repeats a value","Showing some quantity strictly decreases each step","Showing two distinct subsets can have the same sum if the number of subsets is too large"] answer="A,B,D" hint="Pigeonhole needs more objects than boxes." solution="1. True. Remainders give boxes.Summary
- The pigeonhole principle is about forcing repetition when possibilities are too few.
- The hardest step is identifying the right objects and boxes.
- Remainders, bounded states, and subset sums are common hidden pigeonholes.
- Repeated values often lead to equal-sum or equal-difference conclusions.
- Generalized pigeonhole uses the ceiling value .
---
Proceeding to Strong pigeonhole.
---
Part 2: Strong pigeonhole
Strong Pigeonhole
Overview
The strong pigeonhole principle is the sharpened form of the basic pigeonhole idea. It does not merely guarantee that some box gets two objects; it gives a precise lower bound on how many objects must lie in one box. In olympiad and CMI-style problems, this topic appears in counting, divisibility, remainders, birthday-type questions, and extremal reasoning. ---Learning Objectives
After studying this topic, you will be able to:
- State and use the strong pigeonhole principle correctly.
- Convert βat least one box has many objectsβ into a sharp threshold formula.
- Solve minimum-number guarantee questions.
- Recognize disguised pigeonholes such as remainders, parity classes, or intervals.
- Use ceiling-form and contrapositive-form reasoning confidently.
Core Statement
If objects are placed into boxes, then at least one box contains at least
objects.
To guarantee that some box contains at least objects, it is enough and necessary to have
objects distributed among boxes.
Most Important Forms
- Ceiling form
- Threshold form
- Contrapositive form
If every box has at most objects, then total objects
How to Spot the Pigeonholes
The βboxesβ are often not physical boxes. They may be:
- months of the year
- weekdays
- residue classes mod
- parity classes
- intervals
- colors
- possible sums or remainders
- categories in a partition of a set
Standard Consequences
- Among integers, two have the same remainder modulo if
- Among people, two have birthdays in the same month if
- To force at least objects in one of classes, you need objects
- If objects are split among groups, one group has size at least
Minimal Worked Examples
Example 1 What is the minimum number of students needed to guarantee that at least students were born in the same month? There are months, so boxes. To force at least in one box, we need So the answer is . --- Example 2 If balls are placed into boxes, then some box contains at least balls. So the guaranteed minimum is . ---Common Traps
- β Using instead of
- β Forgetting that the result is a guarantee, not the exact distribution
- β Choosing the wrong pigeonholes
- β Using instead of in threshold questions
- β Confusing βat least one box has β with βevery box has β
CMI Strategy
- Identify the objects and the boxes.
- Ask whether the problem is a ceiling question or a minimum guarantee question.
- For guarantee questions, try the worst-case arrangement first.
- If the problem asks for the least number, distribute as evenly as possible without violating the target.
- Use the contrapositive form when direct reasoning looks messy.
Practice Questions
:::question type="MCQ" question="What is the minimum number of objects needed to guarantee that at least of them lie in the same box when there are boxes?" options=["","","",""] answer="B" hint="Use the threshold formula ." solution="To guarantee at least objects in one of boxes, we use Hence the correct option is ." ::: :::question type="NAT" question="Among integers, what is the least number you can guarantee have the same parity?" answer="10" hint="There are only two parity classes." solution="Parity gives boxes: even and odd. By the strong pigeonhole principle, among integers, some parity class contains at least integers. Hence the answer is ." ::: :::question type="MSQ" question="Which of the following statements are true?" options=["If objects are placed in boxes, then some box contains at least objects","To guarantee that some box among boxes contains at least objects, objects are sufficient","If objects are placed in boxes, then some box contains exactly objects","Among integers, two must have the same remainder upon division by "] answer="A,B,D" hint="Use ceiling form, threshold form, and remainder classes." solution="1. True, since .Summary
- The strong pigeonhole principle guarantees a box with at least objects.
- The minimum number to force at least objects in one of boxes is .
- The hidden difficulty is usually identifying the correct boxes.
- Worst-case distribution is the standard way to find minimum guarantees.
- Strong pigeonhole gives a lower bound guarantee, not an exact distribution.
---
Proceeding to Extremal counting applications.
---
Part 3: Extremal counting applications
Extremal Counting Applications
Overview
Extremal counting problems ask you to focus on the largest, smallest, most crowded, or least crowded object in a counting setup. In many olympiad-style and CMI-style questions, this topic works together with the pigeonhole principle: instead of trying to track every object, we identify an extremal one and force a useful conclusion. ---Learning Objectives
After studying this topic, you will be able to:
- Use the pigeonhole principle in strongest possible form.
- Translate words like at least, at most, guaranteed, minimum possible maximum, and maximum possible minimum into counting statements.
- Solve distribution problems using extremal reasoning.
- Recognise when a problem is asking for a sharp lower bound or upper bound.
- Apply partitioning ideas to prove the existence of repeated patterns or close values.
Core Idea
The extremal principle means: instead of studying all objects equally, choose one object with an extreme property, such as:
- the box with the most objects
- the box with the fewest objects
- the largest chosen number
- the smallest chosen number
- the most frequent residue class
- the most crowded interval
Then use that extreme choice to force a conclusion.
If objects are distributed among boxes, then:
- some box contains at least objects
- some box contains at most objects
The Two Main Extremal Questions
If objects are placed into boxes, then the minimum number guaranteed in some box is
This is the smallest possible value of the largest occupancy.
If objects are placed into boxes, then the largest number guaranteed in every box is at most
This is the largest possible value of the smallest occupancy.
Standard Extremal Patterns
- Same remainder / same parity / same month / same colour
Partition the objects into classes.
- Two numbers close together
Partition into short intervals or adjacent pairs.
- A repeated sum or difference
Group by residues or complementary pairs.
- Crowded box or crowded interval
Use the strongest pigeonhole estimate.
- Impossible equal spreading
Show that perfectly even distribution is impossible, so one place must exceed the average.
Fast Formulas
- If , then some box has at least objects.
- If , then some box has at least objects.
- If objects are divided into classes, some class has at least objects.
- If objects are divided into consecutive pairs, choosing more than objects forces one full pair.
Minimal Worked Examples
Example 1 Among students, show that at least have birthdays in the same month. There are months. If each month had at most students, then total students would be at most But there are students. So some month has at least students. This is also --- Example 2 Choose distinct numbers from the set . Show that two of them sum to . Partition the set into complementary pairs: Choosing numbers from pairs forces at least one pair to be chosen completely. That pair sums to . ---How to Build the Boxes
In extremal counting, the main difficulty is usually not the formula. It is choosing the right boxes.
Common good choices:
- residue classes modulo
- parity classes
- complementary pairs
- short intervals
- months, weekdays, colours, digits, positions
Sharpness and Best Possible Answers
Suppose you want to know the least number guaranteed in the fullest box.
If objects were spread as evenly as possible among boxes, the largest box would still have size
So this is not just a bound β it is the exact best possible guarantee.
Common Mistakes
- β Using directly when the answer must be an integer
- β Choosing the wrong classes or boxes
- β Forgetting that pigeonhole gives an existence statement, not the exact location
- β Confusing βat least one box has...β with βevery box has...β
CMI Strategy
- Ask: what is the thing I want to force?
- Partition the objects into classes matching that target.
- Count how many classes there are.
- Compare the number of chosen objects with the number of classes.
- Use the ceiling form when the problem asks for a guaranteed minimum in the most crowded class.
Practice Questions
:::question type="MCQ" question="If objects are placed into boxes, then at least one box must contain at least" options=["","","",""] answer="C" hint="Use the strong pigeonhole principle." solution="We compute So at least one box must contain at least objects. Hence the correct option is ." ::: :::question type="NAT" question="From the set , if numbers are chosen, then at least how many of them must have the same parity?" answer="6" hint="There are only two parity classes." solution="There are only two parity classes: even and odd. If each class had at most chosen numbers, then the total number of chosen numbers would be at most . But numbers are chosen. Therefore some parity class must contain at least numbers." ::: :::question type="MSQ" question="Which of the following are true?" options=["If objects are placed into boxes, some box contains at least objects","If integers are chosen, some two must have the same remainder when divided by ","If distinct numbers are chosen from , then some two are consecutive","If objects are placed into boxes, every box must contain exactly one object"] answer="A,B,C" hint="Think in terms of classes and pairs." solution="1. True. This is the strong pigeonhole principle.Summary
- Extremal counting focuses on the fullest, emptiest, largest, or smallest object.
- The strong pigeonhole principle gives the guaranteed extremal occupancy.
- The hardest step is often choosing the right boxes.
- Ceiling and floor are essential when the average is not an integer.
- Many βexistence of close/repeated structureβ problems are just cleverly disguised extremal counting problems.
Chapter Summary
The Basic Pigeonhole Principle (PHP) states that if items are put into containers, with , then at least one container must contain more than one item.
The Generalized Pigeonhole Principle extends this: if items are put into containers, then at least one container must contain at least items.
Identifying the "pigeons" (items) and "pigeonholes" (containers) is the critical first step in applying PHP. This often requires creative problem rephrasing.
PHP is fundamentally an existence proof technique, guaranteeing the presence of a certain configuration without necessarily providing a constructive method to find it.
Common applications include problems in number theory (e.g., modular arithmetic, divisibility), geometry (e.g., points in regions), graph theory (e.g., degree sequences), and combinatorial arguments.
Extremal counting applications often leverage PHP to establish lower bounds or necessary conditions for certain properties to hold, sometimes leading into areas like Ramsey Theory.
* The principle is surprisingly powerful due to its simplicity, allowing for elegant proofs of non-trivial results in discrete mathematics.
---
Chapter Review Questions
:::question type="MCQ" question="A drawer contains 12 red, 10 blue, and 8 green socks. If you pick socks randomly in the dark, what is the minimum number of socks you must pick to guarantee you have a pair of the same color?" options=["3","4","5","6"] answer="4" hint="Consider the colors as pigeonholes. How many socks must be picked to exceed the number of pigeonholes by one?" solution="Let the colors (red, blue, green) be the pigeonholes. There are 3 pigeonholes. By the Pigeonhole Principle, to guarantee at least two socks of the same color (a pair), you must pick one more sock than the number of colors. So, socks. If you pick 3 socks, you could pick one of each color, but the 4th sock must match one of the colors already picked."
:::
:::question type="NAT" question="What is the minimum number of integers that must be chosen from the set to guarantee that there are at least two integers whose sum is 21?" answer="11" hint="Form pairs of numbers from the set that sum to 21. Each pair represents a pigeonhole. What happens when you pick more numbers than pigeonholes?" solution="Form pairs of numbers from the set that sum to 21: . There are 10 such pairs. Let each pair be a pigeonhole. If we select one number from each of these 10 pairs, we would have 10 numbers, and no two would sum to 21 (e.g., or ). However, if we select an 11th number, it must come from one of the existing pairs, thereby guaranteeing that we have both numbers of a pair, and thus two numbers that sum to 21. Therefore, the minimum number is 11."
:::
:::question type="MCQ" question="In a group of 6 people, it is known that either there are 3 mutual friends or 3 mutual strangers. This is a classic result from Ramsey Theory (), often demonstrated using the Pigeonhole Principle. Consider the problem of finding the minimum number of vertices, , in a graph such that if each edge is colored either red or blue, there must exist a monochromatic triangle (a triangle with all edges of the same color). What is this minimum number ?" options=["4","5","6","7"] answer="6" hint="This question directly refers to the definition of the Ramsey number . Think about how the PHP is used to prove this specific value." solution="This is the direct definition and value of the Ramsey number , which is 6. The proof involves picking an arbitrary vertex and considering the edges connected to it. By the Pigeonhole Principle, among the 5 edges connected to this vertex, at least 3 must be of the same color (e.g., red). If these 3 vertices are connected by red edges, they form a monochromatic red triangle. If any two of them are connected by a blue edge, then these two, along with the initial vertex, form a monochromatic blue triangle. Thus, 6 vertices are sufficient to guarantee a monochromatic triangle."
:::
---
What's Next?
The Pigeonhole Principle is a fundamental tool in combinatorial problem-solving and proof techniques. Its applications often serve as an introduction to more advanced topics. As you continue your CMI preparation, consider exploring Ramsey Theory in more depth, which generalizes the concepts seen in extremal counting. The logical reasoning developed here will also be invaluable for understanding graph theory (especially extremal graph theory) and various counting arguments involving generating functions and recurrence relations. Mastery of PHP strengthens your foundation for tackling complex problems in discrete mathematics.