2

In the scenario where there are $50$ options and $1$ option is chosen randomly at a time, on how many times would it take until all options are chosen on an average attempt?

Then, if there are again $50$ options, and $1$ option is chosen at time, but with a random number that is influenced like:

$1$ would be chosen twice as often as $2$, $2$ would be chosen twice as often as $3$, $3$ would be chosen twice as often as $4$, etc. I think this would be $y = 2x$.

How many times would an option be chosen before all options would be chosen on an average attempt?

I am not for sure if this is possible, but it seems like it would be.

joriki
  • 238,052
Jack
  • 133

1 Answers1

2

The first question is the standard coupon collector’s problem. The answer is

$$ 50H_{50}\approx224.96\;, $$

where $H_{50}$ is the $50$-th harmonic number.

For the second question, with unequal probabilities, see the excellent collection of answers at Coupon collector's problem: mean and variance in number of coupons to be collected to complete a set (unequal probabilities).

In your case, the probabilities are

\begin{eqnarray} p_i &=& \frac{2^{-i}}{\sum_{i=1}^n2^{-i}} \\ &=& \frac{2^{-i}}{1-2^{-n}}\;, \end{eqnarray}

where $n=50$ is the number of options. This makes for an interesting sum; the expected time to choose all options is

\begin{eqnarray} \sum_{\emptyset\ne S\subseteq[n]}(-1)^{|S|+1}\frac1{\sum_{i\in S}p_i} =(2^n-1)\sum_{k=1}^{2^n-1}\frac{(-1)^{b(k)+1}}k\;, \end{eqnarray}

where $b(k)$ is the bit count of $k$ and $[n]$ is the set of the first $n$ positive integers.

The sum has $2^{50}-1\approx10^{15}$ terms, so it’s hard to evaluate exactly, and I don’t immediately see a way to simplify it; but it appears to converge rapidly with $n\to\infty$. At $n=15$, which is as far as Wolfram|Alpha can calculate the sum in the standard computation time, the first $27$ digits seem to have converged; they are

$$ \lim_{n\to\infty}\sum_{k=1}^{2^n-1}\frac{(-1)^{b(k)+1}}k\approx1.19628326432525643722229163\;. $$

Thus, the expected time to choose all options is about $1.20\cdot2^{50}\approx1.35\cdot10^{15}$. As might have been expected, this is dominated by the expected time $2^{50}-1$ that it takes to choose the $50$-th option with its astronomically low probability of $\left(2^{50}-1\right)^{-1}$ of being chosen, and the sum is already quite well approximated by the expected time $\left(1+\frac12-\frac13\right)\left(2^{50}-1\right)=\frac76\left(2^{50}-1\right)\approx1.17\cdot2^{50}$ that it takes to choose the $49$-th and the $50$-th option.

joriki
  • 238,052