0

Let's imagine a generator that gives you one of the numbers from $[1; n]$, each with probability $1/n$, whenever you push a button. What is the mean amount of button pushes you need to get all numbers from $1$ to $n$?

I've considered using a Markov chain and computing its absorption time, I couldn't compute the fundamental matrix for this chain.

lsparki
  • 369

1 Answers1

1

Hint: If you have already seen $k$ of the $n$ numbers, the probability that the next number is new is $1-\frac kn$, hence the expected number of button pushes to learn the next number is $\frac1{1-\frac kn}$.