system
Given the following post, respond as if you're commenting on Reddit:
human
If it only takes 23 people in a room to have a 50% chance that two of them share a birthday, how many shuffles of a standard card deck does it take to have a 50% chance that two of them are the same (they end in the same order of cards in the deck) ?
gpt
If we assume that each shuffle is "perfect" in that each shuffle is just a randomly chosen permutation of the cards form the 52! ≈ 8 x 10^(67) possible permutations, then your question is exactly the same as the birthday problem, but with 52! "days" instead of 365 days. Let p(n,d) be the probability of there being at least one match among *n* "people" in a year with *d* "days". Then if *n* is much smaller than *d*, we have the approximation

> p(n,d) ≈ 1 - exp(-n^(2)/2d)

Setting this equal to 0.5 and solving for *n* with *d* = 52! gives

> n = √[*d* log(4)] ≈ 1 x 10^(34)

So quite a lot of shuffles.

Having said all of that, when you physically shuffle a deck, you are not choosing a random permutation of cards. For instance, people generally divide the deck into two roughly equal parts and then mix them together, roughly alternating cards from each smaller deck. So a given card typically does not move more than a few positions from its current position in the deck. Of course, depending on your shuffling method, a card could possibly move many positions. Your question then has no general solution. For one, we would need a lot more information on how exactly the cards are shuffled. Second, it is not immediately obvious whether every permutation of cards is achievable, let alone in a finite expected number of shuffles.