[Math] How many numbers must be selected from 100…999 so that three of them have the same sum of digits

combinatoricsprobability

A box contains 900 cards enumerated from 100 to 999 (Each number appears once and just in one card). I took some random cards without looking at them and calculated the sum of the digits in each one.
How many cards should I take as minimum for making sure I have three cards with the same sum of digits?


I knew that every sum of cards belongs to sets from $1$ to $27$.
Noticing that, I thought the answer would be $55$ but I didn't took in consideration there were only $1$ card belonging to $1$ and $27$. Therefore the answer was $55-2$.

Best Answer

Hint: How many different sum of digits are there for the cards?

(the smallest sum of digits is 1 from the card labeled 100, the largest is 27 from the card labeled 999).

Apply pigeon-hole principle to this result, noting that there is only one card with sum equal to 1 and only one card with sum equal to 27.


As there are 27 different possible sums on each card, pigeon-hole principle says that if you have $(27\cdot 2 + 1)$ cards, you are guaranteed to have three in the same category. This was based on the idea that you could have $(27\cdot 2)$ cards, with two in each category and avoiding having three in any single category. Note however, that you cannot have two in the category (sum=1) and you cannot have two in the category (sum=27). So, a final answer for this problem would be $(27\cdot2+1-2)=53$.

Related Question