Given a random permutation of all 52 cards in a standard deck, what is the probability that it contains exactly one pair with the same rank? For example AA counts as one pair whereas AAA counts for two pairs. Cards with the same rank but different suits are considered different.
Say we make a pair from the 5s. We select a 5 and then we are left with a multiset with 3*(remaining cards with rank 5) and four cards for each of the other 12 ranks. Then we are tasked with counting one line permutations of these 51 cards with no adjacent ranks. After that we could choose where the selected 5 forms the pair, this would give all permutations with exactly one pair which is of rank 5.
I was aware that one can use the adjacency matrix for a directed graph to count such one line permutations, but in this case each node has to be visited a fixed (3/4) amount of times.
