Wednesday, January 13, 2010

Paired cards

A standard deck of 52 cards is shuffled with uniform probability. A "pair" is defined as two numerically identical cards that are adjacent in the stack. What is the probability that the deck contains no pair?

Challenge: Find the probability that the deck contains exactly $n$ pair for $n=1,2,\cdots,26$.

Solution

First we solve the following problem: given $n$ letters, how many strings of length $4n$ can we form such that there are no two equal adjacent letters and each letter appears exactly 4 times. For example, if $n=3$, then we wish to form a string of length 12 from the letters A,B,C each appearing 4 times such that there are no two equal adjacent letters. Some examples of legal strings are ABCABCABCABC, or ABCBACACBCBA