2

Say you have a deck of cards 52 distinct cards labeled numbers 1 through 52. Each turn you are given a hand of 5 different cards, each of which are labeled 1–52. Each card has an equal chance of being drawn. Each turn all cards labeled 1–52 are in play; ex: if you draw a 7 one turn, you can draw the 7 again on a future turn. How many expected turns does it take until you have collected all cards labeled 1 through 52?

bluemaster
  • 4,187
  • 5
    This is just a variant of the usual Coupon Collector's problem. – lulu Oct 07 '22 at 17:03
  • As written, I don't see how this can be answered. Perhaps you mean to ask "expected" turns – Gregory Oct 07 '22 at 17:03
  • @Gregory you're right - I've added it to say "expected" turns. Thanks for pointing that out! – Joe Uberuaga Oct 07 '22 at 17:06
  • What is the source of the problem? – user2661923 Oct 07 '22 at 17:45
  • @user2661923 I made it up as a proxy for an online-game feature I'm thinking about introducing and wondering how long it would take players to get the achievement – Joe Uberuaga Oct 07 '22 at 18:34
  • Thanks for the response. – user2661923 Oct 07 '22 at 18:34
  • You can find this variant of the coupon collector's problem analyzed in "The Coupon Collector's Problem" by Marco Ferrante and Monica Saltamlamacchia, available on-line. – awkward Oct 08 '22 at 13:19
  • If you are only interested in the numerical answer for this case (52 cards and 5 in each turn), then the expected number of turns is 45.744, which I computed with a simple algorithm based on dynamic programming. – Steven Oct 09 '22 at 09:02
  • Hi @Steven - thank you! I actually used different numbers here thinking I could replace them to find the answer I'm looking for; could you please share the answer for 180 cards / 16 in each turn? Also, any additional information around the function would be much appreciated, but I'd be thrilled with a simple answer as well. – Joe Uberuaga Oct 10 '22 at 21:40
  • @JoeUberuaga: The sum in the post linked to in the close notice above yields $45.744$ for $52$ cards with $5$ per turn, in agreement with Steven's result above, and $62.664$ for $180$ cards with $16$ per turn. – joriki Mar 20 '23 at 19:37

2 Answers2

0

If you study the link about the coupon collector's problem, suggested by @lulu in the comments, you will find out that, if you've turned just 1 card each time, and $T_n$ is the number of turns to get all the $n=52$ distinct cards, the expected number of turns will be given by $$E(T_{52})=52\left(1+\frac{1}{2}+\frac{1}{3}+\ldots+\frac{1}{52}\right)=236.$$ A good approximation for $E(T_n)$, considering $n$ in general can be given by: $$E(T_n)=n\log n+\gamma n+\frac{1}{2}+O(1/n)$$ in which, $\gamma=0.5772156649$ (Euler-Mascheroni constant). In this case the approximation considering $n=52$ by this formula is $235.48$.

But you are getting hands of 5 cards each time, and this 5 cards are being returned to the deck before the next draw of 5 cards. That´s why this is a variation.

bluemaster
  • 4,187
  • Hi @bluemaster, thanks for the comment! Does this answer consider that we would be getting hands of 5 different cards at a time? – Joe Uberuaga Oct 07 '22 at 21:15
  • No. This is just for a plain coupon collectors version in which you are getting a hand of 1 card each time. Your specific case is a variation. – bluemaster Oct 07 '22 at 21:29
0

To find the exact number of expected moves, I used a dynamic programming-technique. If $X_i$ (with $i<n$) is the random variable describing the number of turns left if we already have $i$ unique cards, then the following equation holds (because of linearity of expected values): $$ E[X_i] = 1+\sum_{j=0}^{k} P(j \text{ new cards | } i \text{ unique cards})\cdot E[X_{i+j}] $$ (for the appropriate probability function $P$, in this case involving three binomial numbers).

The important thing to note here is that the right-hand side of the equation only contains $E[X_r]$ with $r\geq i$. This gives us the opportunity to work backwards: first calculate the expected number of moves left if we already have $n-1$ unique cards. Based of that information, calculate the expected number of moves starting from $n-2$ cards, and so on. You could also see it as a large system of linear equations that can be solved with standard tools. Or as a Markov chain of which you look for the expected first passage time.

I solved it exactly for $n=180$ and $k=16$, but the exact ratio requires more than 4000 digits to write down! ;) Approximately it takes $66.62$ turns. [But beware that this is just the average; the variance on this number might be quite large.]

Steven
  • 382