Decks of cards and birthdays
Lately, I was wandering about the fact that there is a vast number of possible ways to shuffle a deck of cards. To be more exact, there are exactly 52! ≈ 8 × 10^67 ways. This might make people claim that once a deck is properly shuffled, we can be almost sure that this permutation of cards has never occured ever in history (and it never will).
Then, I though about the birthday paradox. This paradox claims that if there are 23 people in the room, there is around 50% chance that at least one of the people share a birthday. The contradiction lies in the fact that every pair of people has to be examined whether they share a birthday or not. So, the combinations of pairs come into play. I will call this the birthday effect.
I was wandering whether this paradoxical relation was standing amongst permutations of decks of cards. In other words, what is the relatively low number of decks that has to be permuted for the birthday effect to kick in?
How many decks do we have to shuffle to be 50% sure that there is a pair that are shuffled the same?
To answer that question, I first reproduced the plot for the birthday paradox.
We can see, that after around 23 people, we have a 50% chance of two people having the same birthday. This is where the birthday effect kicks in. Relating this number to the total number of days in a year results in a 23/365 ≈ 0.06 ratio.
If we play the same game with the number of available permutations in a deck, we have a similar story, but with different numbers. (In the following plot note the logarithmic axes.)
We can see that in order to be 50% sure to find two decks that are shuffled the same, we have to gather around 10^33 decks (and of course, suffle them). Relating this number to the total number of permutations results in a 10^33 / (8 × 10^67) ≈ 10^(-34) ratio. This is quite a bit lower than the one observed with the conventional birthay paradox!
To answer the above question, I can say that indeed, there is a relatively low number of decks for the birthay effect to kick in. But in absolute value, 10^33 decks is a very large amount. By writing some large numbers into WolframAlpha, I found out that 10^23 is the number of grains of sand on Earth. And 10^10 is the number of people living on Earth. So, if every person had a planed Earth, adding the total number of grains of sand on each of the planets, it would result in 10^33.
Hence, supposing that each shuffling is random (which it is not), we can claim that there is a very low chance that two decks are ever shuffled the same or ever will be.
Notes:
To reproduce the above plots, I used the this code.
To calculate the probabilities, I used an approximation by the exponential and Stirling's approximation.