# Special 64 card 2 player game. Who has the advantage?

Two people (call them E and F), decide to play a special card game. They use a special deck of playing cards which is a standard $52$ card deck, but with $12$ extra cards added in. You can think of them as $3$ extra ranks, each having $4$ suits. So the new ranks (in ascending order) are $123456789TJQKABC$ (T = ten). Ranks $2$ thru $A$ are the normal ranks found in a standard deck of cards. $A$ is considered the rank just above king and never the same as $1$ for this game. We added a new low $1$ rank which comes before $2$, and we added $2$ new high ranks ($B$ and $C$) after the $A$ (Ace). So for each hand, we shuffle well and then deal out only half ($32$ out of $64$) of the cards. They are community cards shared between E and F. That is, both E and F use the same $32$ dealt cards to determine winners. Both E and F can win in the same hand multiple times.

E gets a win for each occurrence of a quad dealt in order, including multiple wins per hand such as $77772439999$ which would count as $2$ wins for E. Best case for E would be something like $11112222333344445555666677778888$ which would be $8$ wins.

F gets a win if any $5$ card straight is dealt in order (such as $23456$). Wraparound straights such as $ABC12$ are not a win for F. Only ascending straights are wins for F. For something like $234567$, that counts as a double win for F since there are $2$ overlapping straights ($23456$ and $34567$). Best case for F then would be $24$ wins in a single hand ($123456789TJQKABC123456789TJQKABC$). To make it even easier for F to win, we will assign a point multiplier. Each win (as described above) will have points awarded. E gets $8$ points for each win but F gets $15$ points for each win.

So best case for E would be $64$ points in a single hand but F can get up to $360$ points in a single hand.

If there is no winner in a hand, the cards are simply returned to the deck, reshuffled well, and a new hand is dealt.

So who has the point advantage long term and by how much?

• With a small sample of $10^7$ games I got that E got $57528$ points and F got $57390$ points. @David I was calculating multiple wins for both players per hand (but the code didn't record how often that happened). – Ian Miller Aug 27 '16 at 14:35
• Using techniques like in the first answer to this I get $9648226241311964275300295224260000000\approx10^{37}$ possible draws of 32 cards out of the deck. – Ian Miller Aug 27 '16 at 15:12
• @Ian Miller - I am not even sure if that answer is right. The suits are not important for either player. Just the arrangement of the ranks. – David Aug 27 '16 at 15:15
• @IanMiller How are you counting? The technique you linked to advises us to take the coefficient of $x^{32}$ from $(1+x+x^2/2+x^3/6+x^4/24)^{16}$ which is $86320499673449/165112971264$ and multiply with $32!$, giving $137563906395290913582482779401060000000\approx 10^{38}$ possible ways to deal 32 cards from the special deck. – Christian Sievers Sep 18 '16 at 12:37
• Looking back at my code/calculations I took the coefficient of $x^{31}$ and multiplied it by $31!$ by mistake. – Ian Miller Sep 18 '16 at 15:24

Let's start with E. We number the cards in the hand from 1 to 32. Let $$X_i = \begin{cases} 1 &\text{if there are four of a kind starting at card i}\\ 0 &\text{otherwise} \end{cases}$$ for $i = 1,2, \dots ,29$. Then $$\Pr(X_i = 1) = \frac{3}{63} \cdot \frac{2}{62} \cdot \frac{1}{61}$$ and the expected number of "wins" per hand for E is $$E(\sum_{i=1}^{29} X_i) = \sum_{i=1}^{29} E(X_i) = 29 \cdot \frac{3}{63} \cdot \frac{2}{62} \cdot \frac{1}{61} \approx 0.0007303$$ So E's expected score is about $8 \times 0.0007303 \approx 0.005842$.
Now for F. Let $$Y_i = \begin{cases} 1 &\text{if there is a 5-card straight starting at card i} \\ 0 &\text{otherwise} \end{cases}$$ for $i = 1, 2, \dots ,28$. First, the card at i must be in the range from 1 to 12 in order for a straight to be possible; then the next 4 cards must line up appropriately. So $$\Pr(Y_i = 1) = \frac{12}{16} \cdot \frac{4}{63} \cdot \frac{4}{62} \cdot \frac{4}{61} \cdot \frac{4}{60}$$ and the expected number of "wins" per hand for F is $$E(\sum_{i=1}^{28} Y_i) = \sum_{i=1}^{28} E(Y_i) = 28 \cdot \frac{12}{16} \cdot \frac{4}{63} \cdot \frac{4}{62} \cdot \frac{4}{61} \cdot \frac{4}{60} \approx 0.0003760$$ So F's expected score is about $15 \times 0.0003760 \approx 0.005641$.
• Out of 100 million simulate hands I got $583,600$ points for E and $565,410$ points for F. Seems very close to the answer by @awkward. – David Aug 28 '16 at 15:06
• @David, in answer to your questions about the analysis for F, cases like 234567 are handled correctly, i.e. as two wins. For example, if the 2 is in position 1, then we would have $Y_1 = 1$ and $Y_2 = 1$, which contributes 2 toward the total. The theorem that makes all this work is that E(X+Y) = E(X) + E(Y) even if X and Y are not independent. – awkward Aug 28 '16 at 16:05