# Pigeonhole problem - Can solve it but can't model how it works…

So we have the below pigeonhole problem from an example quiz and I understand how to solve the problem, but I can't really model how it is working in my head. Can anyone explain it?

There are 50 baskets of apples. Each basket contains at least one, but no more than 24 apples. Show that there are at least 3 baskets containing the same number of apples.

Solution: The baskets are the pigeons, and we place each of them in one of 24 pigeonholes according to how many apples are in it. Thus the ratio n/k of pigeons to pigeonholes is 50/24 = 2 and 1/12

By Generalized PHP there are at least this many baskets with the same number of apples, so there must be at least 3

• Can't a basket contain zero apples...? Then there would be $25$ holes, not $24$. – CiaPan May 23 '16 at 13:07
• @CiaPan: I agree. I fixed it for the OP. – TonyK May 23 '16 at 13:29

You have $50$ baskets, and each basket contains between $1$ and $24$ apples. I assume no basket contains $0$ apples since you said "$50$ baskets containing apples". Then you can take out 48 baskets and place $1$ apple in two of them, $2$ apples in two of them etc. until you have 48 baskets and for every number between $1$ and $24$ there are exactly two baskets containing that many apples. Now you have $2$ empty baskets left. Regardless of how many apples you place in them, there are two baskets already containing equally many apples. So you will at least $3$ baskets containing equally many apples.
2nd Edit: Maybe you can try to reason why there are at most two cases of "$3$ baskets containing equally many apples". That is, if there are $3$ baskets containing $a_1$ apples, and there are $3$ other baskets containing $a_2$ apples, then you cannot have a third set of $3$ baskets containing equally many apples. Begin with the two remaining baskets in my explanation above, and see what happens when you fill the last two.