How many ID numbers must you have to guarantee that at least two of them sum to the same number?

1.4k Views Asked by At

ID numbers all have 7 digits from 0 to 9. We will assume that all digits can be 0 through 9

This is a homework problem, but I am afraid I am very lost, though I think I am over thinking it.

I know this is the pigeon hole theorom in which if you have N pigeons and k pigeon holes then there is at least on hole with the ceiling of N/k pigeons.

I just don't know how to apply that idea here.

The next question is similar: How many ID numbers must you have to guarantee that at least four of them have the same last 2 digits?

Would the process for this one be different than the first one?

Thanks.

1

There are 1 best solutions below

3
On BEST ANSWER

For the first part, there are exactly $64$ possibilities: the possible sums range from $0$ to $63$. In order to guarantee a repetition, you need to have $64+1$ numbers. Imagine the worst case scenario that the first $64$ are all distinct. While this is highly unlikely, it is not impossible. Now add one more random code. It must duplicate one of sums in the previous $64$ codes, its unavoidable! The thing to remember is that you might do it with fewer codes, but there is a non-zero probability that all the sums would be distinct, so you cannot guarantee that some sum is repeated.

For the second part there are $10^2$ possible 2-digit endings to the 7-digit codes. You'll need $3\cdot 10^2+1$ to guarantee one of the codes repeats $4$ times by the same reasoning as above.