Pigeon nest principle-Wikipedia, a free encyclopedia
Pigeon nest Principle
Wikipedia, a free encyclopedia
Jump to: navigation, search
If 10 pigeons are put into 9 pigeon cages, there must be at least two pigeon cages.
Pigeon nest Principle, Also knownPrinciple of Dirichlet drawer,Concept of pigeon cage.
One simple expression is:
- If there are n cages and n + 1 pigeon, all the pigeons are in the cage, then at least one cage has at least 2 pigeons..
The other is:
- If there are n cages and kn + 1 pigeon, all the pigeons are in the cage, then at least one cage has at least k + 1 pigeon.
The ramqi theorem is an extension of this principle.
| Directory [Hide]
- 1 Example
- 2 Promotion
- 3 Mathematical Proof
- 4 Infinite concentration
- 5 Source
- 6 External link
|
[Edit] Example
Although the concept of Pigeon nest seems easy to understand, sometimes some interesting conclusions are drawn from the use of the concept:
- For example, at least two people in Beijing have the same hair size.
- Proof: the number of normal people's hair is about 0.15 million. It can be assumed that no one has more than 1 million hairs, but Beijing has a population greater than 1 million. If we make each Pigeon nest correspond to a hair number, and the pigeon corresponds to a person, it becomes that more than 1 million pigeons need to enter up to 1 million nests. Therefore, we can get the conclusion that "at least two people in Beijing have the same hair count.
Another example:
- There are 10 black so and 12 blue so in the box. You need to get them in the same color. Assume that you can only take the so of the same color once. Only three so of the same color can be obtained, because there are only two colors (only two pigeon nests), and three so (three pigeons ), in this way, we can get the conclusion that "Take 3 sock out and there will be a pair of identical colors.
More intuitive example:
- There are n people (at least two people) shaking hands with each other (randomly looking for someone to hold), and there must be two people shaking hands for the same number of times.
- Here, the Pigeon nest corresponds to the number of handshakes, And the pigeon corresponds to a person. Each person can hold [0, n-1] times (but 0 and n-1 cannot exist at the same time, because if a person does not shake hands with anyone, then there will be no one who has been in touch with everyone else), so there will be n-1 Pigeon nest. However, N people (N pigeons) prove that the proposition is correct.
The concept of Pigeon nest is often applied in the computer field. For example, the duplicate problem (conflict) of hash tables is inevitable, because the number of keys is always more than the number of indices, no matter how cleverAlgorithmIt is impossible to solve this problem. This principle also proves that any lossless compression algorithm can reduce the size of a file while adding other files. Otherwise, some information will be lost.