How many times I should shuffle a deck so that the probability of getting repeated orderings is at least 0.5?

52 Views Asked by At

I'm interested in the normal deck case (52 cards), and I know that the probability of NOT getting repeated orderings after $N$ shuffles using a deck with $n$ cards is given by

$\frac{{n! \choose N} N!}{{n!}^{N}} = \frac{n!-1}{n!} \cdots \frac{n!-N+1}{n!} = \prod_{i=1}^{N} (1-\frac{i}{n!})$

So I tried to get the $N$ for which this quantity is less than $0.5$, but I couldn't find it analitically. Wolfram alpha suggested another representation in terms of the Pochhammer symbol but it wasn't very useful.

I naively tried to simply do the computation with an arbitrary decimal precision library but after a few million iterations it was still really far from 0.5; its probably not a good idea since the answer could take trillions of iterarions, but I tried it anyway.

Finally, I tried to get a lower bound for $N$ using the fact that

$\prod_{i=1}^{N} (1-\frac{i}{n!}) \leq (1-\frac{1}{n!})^N \leq 0.5$

and I got $N \geq 5.59 x 10^{67}$ using this precission calculator, but I don't know how tight this bound is

So, is there an easy way to know how many shuffles do I need?

1

There are 1 best solutions below

1
On BEST ANSWER

The Wikpedia article on the birthday problem derives the equation that if you have $d$ possibilities you need $\sqrt{2d \ln 2}$ tries to get a $50\%$ chance of a collision. In your case if we let a shuffle be a random selection from the $52!$ permutations of the deck we need $\sqrt {2 \cdot 52! \ln 2}\approx 1.05\cdot 10^{34}$