Now there is a question:

For twenty two-digit numbers, we add two digits together. (like 12 and get the result 3) Prove in these twenty numbers, there must be at least 2 same results.

Now I know I can assume the most extreme example which is adding 0,0 0,1 until 9,9, so I have at most 19 results. Therefore, the twentieth must be as same as one of the previous 19 ones.

But actually, I don't know the standard and rigorous proof of this problem. Can anyone help me with this standard proof?

  • 1
    $\begingroup$ You need to take a little care how you express yourself. The twentieth need not be the same as one of the previous ones - rather two must give the same result. Which of the sums are are equal depends on the numbers and their order. If I take the numbers from $80$ to $99$ there are plenty of pairs equal, but the last has sum $18$ which is not the same as any of the others. $\endgroup$ Commented Oct 10, 2018 at 11:26
  • 1
    $\begingroup$ If you're talking about the rigorous general proof that, for $n$ elements to be distributed into $d$ containers, at least one container has $\lceil n/d\rceil$ elements, assume otherwise then prove a contradiction. $\endgroup$
    – YiFan Tey
    Commented Oct 10, 2018 at 11:28
  • $\begingroup$ @MarkBennet Ok, My expression is not very rigorous. My example is the most extreme one. $\endgroup$
    – An Yan
    Commented Oct 10, 2018 at 11:31
  • $\begingroup$ I don't think "00" counts as a two-digit number. So there are really only 18 possibilities. $\endgroup$
    – Wildcard
    Commented Oct 10, 2018 at 20:03
  • $\begingroup$ "I don't know the standard and rigorous proof of this problem." Have you googled it already? See for example: whitman.edu/mathematics/cgt_online/book/section01.06.html for a very simple proof, second result on google. $\endgroup$ Commented Oct 11, 2018 at 11:53

3 Answers 3


The Pigeonhole Principle is really the statement that for finite sets $S,T$ with $|S|>|T|$, there is no injective mapping from $S$ to $T$. Proceed by induction on $|T|$. For $|T|=1$, $|S|\ge 2$ by hypothesis; there is one map from $S$ to $T$ and it is not one-to-one. Now suppose true for sets with $n$ elements and that $|T|=n+1$ (and $|S|>n+1$), and let $\phi:S\to T$. Let $t\in T$. Then as there are no injective mappings from $S$ to $T-\{t\}$ by the induction hypothesis, $\phi$ won't be injective unless some $s\in S$ maps to $t$, so suppose this is so. If another element also maps to $T$, then clearly $\phi$ is not one-to-one, so suppose that $\phi^{-1}(t) = \{s\}$. Then $\phi|_{S-\{s\}}$ maps $S-\{s\}$ to $T-\{t\}$, and by the induction hypothesis this map can't be one-to-one. So in all cases $\phi$ fails to be one-to-one.

  • 7
    $\begingroup$ While I'm sorry to be critical of this post, it is disappointing to me that the most upvoted answer (at this time) is one that gets an "A" grade in how to do math, but only gets a "D" grade in how to explain math to others. Know your audience and keep it simple are key principles in teaching. $\endgroup$ Commented Oct 10, 2018 at 16:29
  • 15
    $\begingroup$ @PaulSinclair It's really because OP was confusing - the title and body of the question are different. The question in the body - answered by the accepted answer - is "How do I apply the pigeonhole principle", while the question in the title - answered here - is "How do I prove the pigeonhole principle". These not only necessitate different answers, but also imply different audiences. While the other answer works for OP, it would be a disappointment to anyone who found the question by title alone if it didn't have this answer. $\endgroup$
    – Ordous
    Commented Oct 10, 2018 at 17:54
  • 2
    $\begingroup$ @PaulSinclair I thought the OP was looking for a proof of the Pigeonhole Principle. I don't see why you needed to take a swipe at me for trying to help. $\endgroup$ Commented Oct 10, 2018 at 19:39
  • 2
    $\begingroup$ @JohnBrevik - It was not a swipe at you. I meant it when I said I'm sorry to criticize. But it is an honest critique of the appropriateness of your answer, and I will not apologize for that. This is something you need to improve on if you wish to be helpful. My disappointment is not with your answer, but with the failure of so many others to recognize that it wasn't helpful to the OP because you didn't take the OP's level of sophistication into consideration. $\endgroup$ Commented Oct 10, 2018 at 23:39
  • 2
    $\begingroup$ @Ordous - there is plenty of evidence that the OP's mathematical sophistication is roughly high school level in the post. The initial impression of the title may have been higher, but it should have been been adjusted by the content of the post itself. Everything needs to be accounted for. The OP was not looking for how to apply the principle, but rather for an understanding of why it was true. Both of the other posts provided this in a way the OP could follow. But this one was effectively in another language that the OP did not know, so it was meaningless for them. $\endgroup$ Commented Oct 10, 2018 at 23:47

The pigeonhole principle says that if $i$ items are to be placed into $c$ containers, where $i>c$, then at least one container must have at least two items. The sums of the 20 numbers stand for 20 items and the number of possible results, 19, stands for the containers.

  • $\begingroup$ The application of the principle accomplishes the proof. $\endgroup$
    – Wuestenfux
    Commented Oct 10, 2018 at 11:24
  • 1
    $\begingroup$ So you mean the most extreme example is there are 20 pigeons and 19 holes, so there must be two pigeons in the same holes? $\endgroup$
    – An Yan
    Commented Oct 10, 2018 at 11:36
  • $\begingroup$ Right. This is the case. $\endgroup$
    – Wuestenfux
    Commented Oct 10, 2018 at 11:37
  • $\begingroup$ OK, I see, thank you very much $\endgroup$
    – An Yan
    Commented Oct 10, 2018 at 11:40

I don't like quoting the pigeonhole principle when it is nothing more than common sense. Like this:

There are only $19$ possible two-digit sums, because the smallest is $0+0$ and the largest is $9+9$ and there are only $19$ integers from $0$ to $18$. So obviously if you have $20$ two-digit numbers, they cannot all have different digit sums, because $20 > 19$.

More generally, if you have $c·k+1$ items and assign one of $c$ labels to each item, there is a label assigned to at least $k+1$ items. Proof: If the claim is false, then every label is assigned to at most $k$ items, so there can be at most $c·k$ items, contradicting the given number of items. Therefore the claim is true.

  • 1
    $\begingroup$ Of course, translating this 'common sense' into formal rigorous reasoning is possible (such as in higher-order arithmetic or ZFC set theory), but it is not instructive at this level, because the intrinsic reasoning will be obscured. $\endgroup$
    – user21820
    Commented Oct 10, 2018 at 14:09
  • 2
    $\begingroup$ The pigeonhole principle is not at all a surprising result, but I think it has a name more because it's a useful category of thinking about how to solve problems, when it might not be obvious it does apply. "I need to show some subset of a finite set has something in common - can I sort all the elements into some list of possible categories?" $\endgroup$
    – aschepler
    Commented Oct 11, 2018 at 3:37
  • $\begingroup$ @aschepler: That may be so, but my point was that it is pedagogically unwise to give names to lemmas that not only are trivially provable via simple logical reasoning but also obscure that reasoning when used directly. In this case, the "pigeonhole" name also carries with it some baggage that does not contribute to the mathematical pedagogy, since thinking in terms of "pigeons" and "holes" is less general than the idea of counting and bounding. For example getting the optimal bound for this question. $\endgroup$
    – user21820
    Commented Oct 11, 2018 at 6:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .