Expected number of slots required for channel access - Birthday paradox

84 Views Asked by At

Let $n$ be the number of users who want to access a channel divided into with $s$ time-slots and let $n<<s$. Each user randomly chooses one time-slot (out of $s$) for accessing the channel. A collision occurs if more than one user chooses a given time-slot.
The probability of successful access for everybody without any collisions ( considering $n<<s$) can be approximated by $e^{-n^2/2s}$. The expected number of users who experience a collision is also given by $n(1-(1-1/s)^{n-1})$.
This part of the problem is actually equivalent to the birthday problem where a year is assumed to have $s$ days.

Now, assume that in the case of a collision in the first round $i=1$ (time-slots $1,..., s$), the users who experience a collision will back off and try to access the channel, again randomly, during the next round $i = 2$ with $s$ time-slots (time-slots in $[s+1, 2s]$) and this procedure goes on during the next $s$ time-slots, if a collision occurs, until everybody accesses the channel.

The question is, how many rounds are required on average so that all the users access the channel once? What would be a closed-form approximation?

1

There are 1 best solutions below

2
On BEST ANSWER

The expected number of people who experience collisions in a round is $$n(1 - (1 - 1/s)^{n-1}) \approx n(1 - (1 - n/s)) = n^2 / s$$ as you noted. So we expect the number of people $P_i$ still participating after $i$ rounds to satisfy the recurrence $$P_0 = n \qquad P_{i+1} = \frac{P_i^2}{s}$$ The first few values are $n, \frac{n^2}{s}, \frac{n^4}{s^3}, \frac{n^8}{s^7}, \cdots$ and the closed form is $$P_i = \frac{n^{2^i}}{s^{2^i-1}}$$ Solving for when this is less than 1, $$n^{2^i} = s^{2^i - 1}$$ $$2^i \log n = (2^i - 1)\log s$$ $$\log s = 2^i(\log s - \log n)$$ $$\log \log s = i + \log(\log s - \log n)$$ $$i = \log \log s - \log(\log s - \log n) = \log(1 + \frac{\log n}{\log s - \log n})$$ which is approximately $\log \log n$ assuming $n << s$.

This is just a heuristic estimation of the expected number of rounds in total.