Learn more about the Pigeonhole Principle and other powerful techniques for combinatorics problems in our Intermediate Counting & Probability textbook by USA Math Olympiad winner (and MIT PhD) David Patrick.
LEARN MORE

Difference between revisions of "Pigeonhole Principle"

(a few examples)
(41 intermediate revisions by 21 users not shown)
Line 1: Line 1:
=== Pigeonhole Principle ===
+
The '''Pigeonhole Principle''' (also known as the ''Dirichlet box principle'', ''Dirichlet principle'' or ''box principle'') states that if <math>n + 1</math> or more holes are placed in <math>n</math> pigeons, then one pigeon must contain two or more holes. Another definition could be phrased as among any <math>n</math> integers, there are two with the same modulo-<math>n-1</math> residue.
  
The basic pigeonhole principle says that if there are <math>n</math> holes, and <math>n+k</math> pigons (k>1), then one hole MUST contain two or more pigeons. The extended version of the pigeonhole principle states that for n holes, and <math>{nk+j}</math> pigeons, j>1, some hole must contain k+1 pigeons. If you see a problem with the numbers n, and nk+1, think about pigeonhole.
+
Although this theorem seems obvious, many challenging olympiad problems can be solved by applying the Pigeonhole Principle. Often, a clever choice of box is necessary.
  
=== Examples ===
+
The extended version of the Pigeonhole Principle states that if <math>k</math> objects are placed in <math>n</math> boxes then at least one box must hold at least <math>\left\lceil \frac{k}{n} \right\rceil</math> objects.  Here <math>\lceil \cdot \rceil</math> denotes the [[ceiling function]].
  
Can users find some?
+
== Video Explaining Pigeonhole Principle ==
 +
https://youtu.be/NTBBLhs5qE8
 +
== Examples ==
 +
=== Introductory Problems ===
  
You could paste in [http://www.upal.ca/adeel/problems/2006/4/9.pdf these]... (maybe, just a suggestion)
+
#If a Martian has an infinite number of red, blue, yellow, and black socks in a drawer, how many socks must the Martian pull out of the drawer to guarantee he has a pair? ([[Pigeonhole Principle/Solutions#M1|Solution]])
 +
#Suppose <math>S</math> is a set of <math>n + 1</math> integers. Prove that there exist distinct <math>a, b \in S</math> such that <math>a - b</math> is a multiple of <math>n</math>. ([[Pigeonhole Principle/Solutions#M1|Solution]])
  
*Show that in any group of five people, there are two who have an identical number of friends within the group. (Mathematical Circles)
+
=== Intermediate Problems ===
 +
#Show that in any group of <math>n</math> people, there are two who have an identical number of friends within the group. ([[Pigeonhole Principle/Solutions#M1|Solution]]) <div style="text-align:right">(Mathematical Circles)</div>
 +
#Six distinct positive integers are randomly chosen between 1 and 2006, inclusive. What is the probability that some pair of these integers has a difference that is a multiple of 5? ([[Pigeonhole Principle/Solutions#M2|Solution]])<div style="text-align:center"><math>\mathrm{(A) \ } \frac{1}{2}\qquad\mathrm{(B) \ } \frac{3}{5}\qquad\mathrm{(C) \ } \frac{2}{3}\qquad\mathrm{(D) \ } \frac{4}{5}\qquad\mathrm{(E) \ } 1\qquad</math></div><div style="text-align:right">([[2006 AMC 10A Problems/Problem 20]])</div>
 +
#Show that for any irrational <math>{x\in\mathbb R}</math> and positive integer <math>{n}</math>, there exists a rational number <math>{\frac pq}</math> with <math>1\le q\le n</math> such that <math>\left|x-\frac pq\right|<\frac 1{nq}.</math> ([[Pigeonhole Principle/Solutions#O7|Solution]]) <div style="text-align:right">(the classical Rational Approximation Theorem)</div>
  
 +
=== Olympiad Problems ===
 +
# Seven line segments, with lengths no greater than 10 inches, and no shorter than 1 inch, are given. Show that one can choose three of them to represent the sides of a triangle. ([[Pigeonhole Principle/Solutions#O1|Solution]]) <div style="text-align:right">(Manhattan Mathematical Olympiad 2004)</div>
 +
# Prove that having 100 whole numbers, one can choose 15 of them so that the difference of any two is divisible by 7. ([[Pigeonhole Principle/Solutions#O2|Solution]]) <div style="text-align:right">(Manhattan Mathematical Olympiad 2005)</div>
 +
# Prove that from any set of one hundred whole numbers, one can choose either one number which is divisible by 100, or several numbers whose sum is divisible by 100. ([[Pigeonhole Principle/Solutions#O3|Solution]]) <div style="text-align:right">(Manhattan Mathematical Olympiad 2003)</div>
 +
# Prove that among any ten points located on a circle with diameter 5, there exist at least two at a distance less than 2 from each other. ([[Pigeonhole Principle/Solutions#O4|Solution]]) <div style="text-align:right">(Japan 1997)</div>
 +
#Every point in a plane is either red, green, or blue. Prove that there exists a rectangle in the plane such that all of its vertices are the same color. ([[Pigeonhole Principle/Solutions#O5|Solution]]) <div style="text-align:right">(USAMTS Year 18 - Round 1 - Problem 4)</div>
 +
# There are 51 senators in a senate.  The senate needs to be divided into <math>n</math> committees such that each senator is on exactly one committee.  Each senator hates exactly three other senators.  (If senator A hates senator B, then senator B does 'not' necessarily hate senator A.)  Find the smallest <math>n</math> such that it is always possible to arrange the committees so that no senator hates another senator on his or her committee. ([[Pigeonhole Principle/Solutions#O6|Solution]]) <div style="text-align:right">(Red [[MOP]] lecture 2006)</div>
  
*Seven line segments, with lengths no greater than 10 inches, and no shorter than 1 inch, are given. Show that one can choose three of them to represent the sides of a triangle. (Manhattan Mathematical Olympiad 2004)
+
== See also ==
 +
* [[Combinatorics]]
  
  
 
+
[[Category:Combinatorics]]
*Prove that having 100 whole numbers one can choose 15 of them so that the difference of any two is divisible by 7. (Manhattan Mathematical Olympiad 2005)
 
 
 
 
 
*Prove that from any set of one hundred whole numbers, one can choose either one number which is divisible by 100, or several numbers whose sum is divisible by 100. (Manhattan Mathematical Olympiad 2003)
 

Revision as of 00:54, 2 April 2021

The Pigeonhole Principle (also known as the Dirichlet box principle, Dirichlet principle or box principle) states that if $n + 1$ or more holes are placed in $n$ pigeons, then one pigeon must contain two or more holes. Another definition could be phrased as among any $n$ integers, there are two with the same modulo-$n-1$ residue.

Although this theorem seems obvious, many challenging olympiad problems can be solved by applying the Pigeonhole Principle. Often, a clever choice of box is necessary.

The extended version of the Pigeonhole Principle states that if $k$ objects are placed in $n$ boxes then at least one box must hold at least $\left\lceil \frac{k}{n} \right\rceil$ objects. Here $\lceil \cdot \rceil$ denotes the ceiling function.

Video Explaining Pigeonhole Principle

https://youtu.be/NTBBLhs5qE8

Examples

Introductory Problems

  1. If a Martian has an infinite number of red, blue, yellow, and black socks in a drawer, how many socks must the Martian pull out of the drawer to guarantee he has a pair? (Solution)
  2. Suppose $S$ is a set of $n + 1$ integers. Prove that there exist distinct $a, b \in S$ such that $a - b$ is a multiple of $n$. (Solution)

Intermediate Problems

  1. Show that in any group of $n$ people, there are two who have an identical number of friends within the group. (Solution)
    (Mathematical Circles)
  2. Six distinct positive integers are randomly chosen between 1 and 2006, inclusive. What is the probability that some pair of these integers has a difference that is a multiple of 5? (Solution)
    $\mathrm{(A) \ } \frac{1}{2}\qquad\mathrm{(B) \ } \frac{3}{5}\qquad\mathrm{(C) \ } \frac{2}{3}\qquad\mathrm{(D) \ } \frac{4}{5}\qquad\mathrm{(E) \ } 1\qquad$
  3. Show that for any irrational ${x\in\mathbb R}$ and positive integer ${n}$, there exists a rational number ${\frac pq}$ with $1\le q\le n$ such that $\left|x-\frac pq\right|<\frac 1{nq}.$ (Solution)
    (the classical Rational Approximation Theorem)

Olympiad Problems

  1. Seven line segments, with lengths no greater than 10 inches, and no shorter than 1 inch, are given. Show that one can choose three of them to represent the sides of a triangle. (Solution)
    (Manhattan Mathematical Olympiad 2004)
  2. Prove that having 100 whole numbers, one can choose 15 of them so that the difference of any two is divisible by 7. (Solution)
    (Manhattan Mathematical Olympiad 2005)
  3. Prove that from any set of one hundred whole numbers, one can choose either one number which is divisible by 100, or several numbers whose sum is divisible by 100. (Solution)
    (Manhattan Mathematical Olympiad 2003)
  4. Prove that among any ten points located on a circle with diameter 5, there exist at least two at a distance less than 2 from each other. (Solution)
    (Japan 1997)
  5. Every point in a plane is either red, green, or blue. Prove that there exists a rectangle in the plane such that all of its vertices are the same color. (Solution)
    (USAMTS Year 18 - Round 1 - Problem 4)
  6. There are 51 senators in a senate. The senate needs to be divided into $n$ committees such that each senator is on exactly one committee. Each senator hates exactly three other senators. (If senator A hates senator B, then senator B does 'not' necessarily hate senator A.) Find the smallest $n$ such that it is always possible to arrange the committees so that no senator hates another senator on his or her committee. (Solution)
    (Red MOP lecture 2006)

See also