## Maverick Poker Solitaire and Combinatorics

I watched an episode of an old TV Western show called “Maverick” recently. The episode was titled “Rope of Cards” (1958). Bret Maverick, played by actor James Garner (1928-2014) is a roguish gambler has all kinds of adventures in the old West. In the episode, Maverick makes a bar bet that from any random 25 playing cards, from a regular deck of 52 cards, he can construct five “pat hands”. A pat hand is a Straight (a sequence like 8 9 T J Q), Flush(all five same suit), Full House (three of a kind and two of a kind), or Four-of-a-Kind.

At first thought this seems nearly impossible because the probability of getting a pat hand in five randomly dealt cards is extremely low — about 1 in 250. So being able to construct five pat hands from 25 randomly dealt cards must be impossible, right? Wrong. In fact, the probability of being able to construct five pat hands from 25 randomly dealt cards is nearly 1 — almost certainty. I have never seen the exact calculation, but I’ve used this as a trick dozens of times and it has worked every single time.

The TV show showed how to perform the trick. First you separate the cards by suit. Because there are 25 cards and four suits, it’s very likely that you’ll get at least three Flushes. Then from the suits where you don’t have five of the same suit, you take cards from the suits that have extras to construct Straights and Full Houses.

Here’s an example I just did on my coffee table a moment ago that is typical. I shuffled and dealt 25 cards. I separated by suit and got:

```Clubs:    A 3 4 5 7 8 T Q
Diamonds: 4 T Q
Spades:   A 2 3 4 6 7 9 Q K
Hearts:   A 4 5 T Q
```

The troublesome suit is Diamonds because there are only three of them. I saw several Queens and Tens so I picked a Queen of clubs and Queen of spades, and a Ten of clubs to make a Full House. I put the Four of diamonds off to the side:

From the excess suits I picked A 2 3 of spades, and the 5 of clubs to make a straight. Done!

What a fascinating problem! The reason this trick works is due to combinatorics. From 25 cards there are a huge number of ways to divide them into five hands: stirling_second(25, 5) = 2,436,684,974,110,751. (See https://jamesmccaffrey.wordpress.com/2020/07/30/computing-a-stirling-number-of-the-second-kind-from-scratch-using-python/)

Almost every scientist I know plays poker. Many others play too.
Left to right: Maleficent, The Evil Queen (Snow White), Cruella de Vil, Ursula.
Clockwise from top: Data, a Cylon Centurion, R2-D2, Servo and Crow, The Tin Man, Twiki, Robbie.

This entry was posted in Miscellaneous. Bookmark the permalink.