# Pairs of cards in a deal

There is a Chinese childrens card game that works as below.

I take one card out of the pack and then dealing the remaining cards between the players.
Each player can then discard any pairs.

The players then take in turns to take a card from the next player and discard if they have a pair. The ultimate loser is the last person left with the odd card which matches with the first removed card.

Then' not really any skill to the game but there's a lot of potential questions from this.

For example if there are two players, one player will start with 26 cards and the other will have 25 cards. Theoretically the 26 cards might all be pairs and so they will win immediately. On the other hand it's extremely unlikely.

My question is how to calculate the probability after discarding pairs that the players end up with different numbers of cards in their hand. ie. How could I calculate the number of ways that Player 1 has 10 cards, players 2 has 11 cards for instance? Or if there are n players?

• The game is essentially Old Maid – Henry Nov 10 '14 at 7:27
• Thanks for the info Henry. I'll read up on what's been posted about "Old Maid". – Cliff Nov 10 '14 at 11:18

I'm assuming you are asking the question for a 2-player came, where player I dealt $k+1$ cards and player II dealt $k$ cards (for a standard deck of cards, $k$ will be $25$).

A first observation is that the final numbers of cards in each hand are completely determined by the total number $d$ of pairs discarded, and that the pairs are evenly
divided if $d$ is even, or player I discards one extra pair if $d$ is odd. Thus if there are $d$ pairs discarded, player I ends up with $k+1-2\left\lfloor\frac{d+1}{2}\right\rfloor$ cards, and player II ends up with $k-2\left\lfloor\frac{d}{2}\right\rfloor$ cards. Also, the location of the unmatchable card is fully determinined by the parity of $d$.

Now let's look at a simpler version of the problem. Say that a "pair" consists of two red cards or two black cards of equal rank, so that each card (other than the odd Queen with no pairing) has a unique pairing partner. Then there are $k$ paired ranks and we can distribute the cards such that $d$ pairs are discarded, by:

Choosing which $d$ out of $k$ ranks are the discarded ranks;

Choosing which $\left\lfloor\frac{d+1}{2}\right\rfloor$ of those $d$ pairs were dealt to the hand of player I. (For example, to discard just one pair with $k=4$, that pair had to be dealt to player I.)

Choosing, for each of the $k-d$ remaining ranks, which player was dealt which of the two cards in that rank.

The answer is that the number of possibilities is $$N(d; k) = \binom{k}{d} \binom{d}{\frac{d+1}{2}} 2^{k-d}$$ and the probability is obtained by dividing by $\binom{51}{26}$. The probabilities of varies hand sizes for player I are: $$\begin{array}{cc} 26 & 1.3 \cdot 10^{-7} \\ 24 & 2.2 \cdot 10^{5} \\ 22 & 7.6 \cdot 10^{-4} \\ 20 & .010 \\ 18 & .058 \\ 16 & .177\\ 14 & .295 \\ 12 & .274 \\ 10 & .141 \\ 8 & .039 \\ 6 & 5.4 \cdot 10^{-3} \\ 4 & 3.4\cdot 10^{-4} \\ 2 & 7.1 \cdot 10^{-6} \\ 0 & 2.1 \cdot 10^{-8} \\ \end{array}$$

The problem is much tougher using 4 cards of each rank. In particular, we have to account for $q$ ranks with both pairs discarded and $p$ ranks with just one pair discarded. In the end we will need to sum over ways that a total of $d = 2q+p$ pairs will have been discarded.