Repeated Random Number Selection Until No Collisions - Number of Repetitions

162 Views Asked by At

I have a problem that has to do with my research that troubles me for a while and I could not find a solution either by myself or online.

Suppose you have $n$ people in one room. Everyone picks a number. You find out the number of people that have the same number in any way (either all have the same number or some one number and some another and so on) and you keep them in the room and remove everyone else. You do this until no people are left in the room. What is the average times you need to do this with respect to $n$.

Thans in advance for taking the time to answer!

Edit: The random numbers picked are uniform between $0$ and $N$ ($N$ unrelated to $n$)

1

There are 1 best solutions below

3
On

I'm assuming that when there are $n$ people, everyone picks a number between 1 and $n$, or between $1$ and some fixed integer $N$. If everyone picks a real number wrt some distribution like the inverse exponential, then no two are ever likely to be equal :).

With that assumption, I believe the answer, for $n > 3$, is "infinity". Why? Because as you decrease the number of people, some fraction -- perhaps ~10%? -- of the time, you'll end up with 3 people in the room. When you do, there's a decent probability that two of them will get the same number, and one will get a different number (e.g., 3, 3, 1). When that happens, there's one person left, and even after infinitely many repetitions, that person is never removed. So your "expected value" computation will have a nonzero probability times an infinite value, resulting in an infinite answer.