Solution

Snap by Rank

Show the problem again

Two standard 52-card decks are shuffled independently and uniformly at random. Their cards are turned over in pairs, one from each deck, for 52 turns. A turn is a match if the two cards have the same rank (suits are ignored). What is the probability that none of the 52 turns is a match? Give your answer as a decimal rounded to four places.

Worked solution

The answer is about 0.0162. Fix the first deck's order. The second deck is a uniform permutation σ of 52 cards, and a turn i is forbidden when σ(i) has the same rank as card i. The forbidden cells of the 52×52 board form 13 disjoint 4×4 blocks, one per rank. By inclusion–exclusion (the rook-polynomial method), the number of permutations with no forbidden cell is Σ_k (−1)^k r_k (52 − k)!, where r_k counts ways to place k non-attacking rooks on forbidden cells. A single 4×4 block has rook numbers C(4,k)^2·k! = 1, 16, 72, 96, 24. The blocks are independent, so the full rook polynomial is (1 + 16x + 72x^2 + 96x^3 + 24x^4)^13. Expanding it and dividing by 52! gives 0.016233. A Poisson heuristic predicts e^(−4) ≈ 0.0183, since the expected number of matches is 52 · (4/52) = 4. The exact value is smaller because the match indicators are not independent: within a rank they are negatively correlated (an ace in one ace slot leaves fewer aces for the others), so the number of matches is less spread out than a Poisson variable with the same mean, and zero matches is correspondingly rarer.

Source: Generalisation of Montmort's problème des rencontres to repeated ranks, treated via rook polynomials in Riordan, An Introduction to Combinatorial Analysis. Statement written for AxiomIQ.