How many integers do we need to select from a set from 1 to 20 to guarantee there will be two of the same pairwise sum?

45 Views Asked by At

What is the intuition for this? I currently know that there are 38 possible sums, and I'm stuck after that. Any intuition would help, thanks!

1

There are 1 best solutions below

4
On

If we have 2 choosen numbers we have one pair, with 3 - 3 different- so two different sums. and so on. With n numbers we can create possibly $ \frac{n*(n-1)}{2} $ different pairs. We have to find such n, that this amount would be grater than 38. Then we can make use from Pigeonhole principle we can say that there would exist at least two same pairwise sum.

$ \frac{n(n-1)}{2}>38 \\ n^2-n>76 \\ n^2-n-76>0 $

after making some maths i find that n has to be at least 10