Imagine you have many birds. 
Imagine you have many birds. 

Imagine you have many birds. 
This idea helps us solve puzzles. For example, if you pick three socks from a drawer with black and blue socks, two must be the same color. It also works with birthdays. If you have 367 people, at least two must share a birthday. This is because there are only 366 possible birthdays.

Some people call this the drawer principle. A man named Peter Dirichlet wrote about it in 1834. He used the idea of putting pearls into drawers. The name comes from small boxes in desks used to sort papers.
We can even use it to learn about people. A person can have about one million hairs on their head. London has more than one million people. This means at least two people in London must have the same number of hairs. It is a simple way to prove things are true.
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. 
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. 
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. 
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.
{
"text": "The pigeonhole principle is a fundamental counting argument in mathematics. It states that if you distribute a set of items into a smaller number of containers, at least one container must hold more than one item. This principle may seem obvious, yet it serves as a powerful tool for proving unexpected results. In formal mathematics, it is described using the concept of functions. It asserts that there is no injective function from a larger set to a smaller one. An injective function, or one-to-one function, is one where every input maps to a unique output. If the number of possible outputs is smaller than the number of inputs, a collision is mathematically inevitable.\n\n



🖼️ Images & Media (3)
More to explore
✨ What else?
Related topics you might enjoy
🔬 Go deeper
More advanced topics to explore
🪜 Step back
Simpler topics to build understanding
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.