Filling Buckets over $\mathbb{Z}_q$

20 Views Asked by At

Suppose we can sample and store values from $\mathbb{Z}_q$ uniformly at random and independently, how many values do we need to sample (roughly) in order to cover all $\mathbb{Z}_q$. This what I have, let $X$ be the random variable that indicates the amount of values that need to be sampled to cover all $\mathbb{Z}_q$, then for the expected value

$$ \mathbb{E}(X)=\displaystyle\Sigma_{k=q}^\infty\mathbb{P}(X=k)k $$

this is ok and the first term is easily computed, using that $\mathbb{P}(X=q)=q!/q^q$. But I feel that from this point on we go straight downhill, since $\mathbb{P}(X=q+1)$ is already quite messy, because we would need to take into account that collisions may happen at any stage of the sampling. For the next terms is even worse. Thus I'm curious if there is a better approach to this conundrum.

Regards