Nepedia
Back to Discover
Fluent Reader
🔢

Pigeonhole principle

math Maturity 7-9 Next article →

Imagine you are sorting items into containers. If you have more items than you have containers, something special must happen. At least one container will end up holding more than one item. This simple idea is called the pigeonhole principle. It is a type of counting argument used in mathematics. It helps us prove things that might seem surprising at first.

TooManyPigeons
TooManyPigeons

You can see this with a small group of objects. If you have three gloves, two must be right-handed or two must be left-handed. This is because there are only two categories of handedness for three objects.

This principle works like a rule for sharing or grouping. For example, think about picking socks from a drawer. If you have black socks and blue socks, you only have two colors. If you pull out three socks, you are guaranteed to have a matching pair. The colors are the holes, and the socks are the pigeons.

Pigeon-hole messagebox 3
Pigeon-hole messagebox 3

You can also use it to think about birthdays. There are 366 possible birthdays, including February 29. If you gather 367 people, at least two people must share a birthday. This is a certain way to find a match.

History shows us that people have used this idea for a long time. The first written reference appears in 1622. A French writer named Jean Leurechon mentioned it in his work. He noted that two men must have the same number of certain items. Later, in 1834, Peter Gustav Lejeune Dirichlet wrote about it. He called it the drawer principle or the shelf principle. He used the idea of putting pearls into drawers to explain it.

Pigeon-hole messagebox 3
Pigeon-hole messagebox 3

We can use this math to look at huge numbers in the real world. Let us look at the people living in London. A human head can have about one million hairs. London has a population of more than one million people. Because there are more people than possible hair counts, a match must exist. In fact, if London has 9.002 million people, at least ten people must have the same hair count. This shows how math works even with very large groups.

This principle connects to many different parts of science and technology. In computer science, it is used in a process called hashing. Hashing maps large amounts of data into smaller, fixed sizes. Since there are often more pieces of data than hash codes, some data must share a code. It also helps explain how computer files are compressed. If a program makes some files smaller, it must make other files larger. This keeps the math of the data balanced and true.

Dudeney no 3 pawns in line
Dudeney no 3 pawns in line
437 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

🖼️ Images & Media (3)
File:TooManyPigeons.jpg
TooManyPigeons.jpg
File:Pigeon-hole messagebox 3.jpg
Pigeon-hole messagebox 3.jpg
File:Dudeney_no_3_pawns_in_line.svg
Dudeney_no_3_pawns_in_line.svg
More to explore

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.