Can You Deal With These Card Game Puzzles?

Welcome to The Riddler. Every week, I offer up problems related to the things we hold dear around here: math, logic and probability. There are two types: Riddler Express for those of you who want something bite-sized, and Riddler Classic for those of you in the slow-puzzle movement. Submit a correct answer for either,1 and you may get a shoutout (chosen at random) in next week’s column. If you need a hint, you can try asking me nicely on Twitter.

Riddler Express

From Seth Cohen, a lonely card game puzzle:

On snowy afternoons, you like to play a solitaire “game” with a standard, randomly shuffled deck of 52 cards. You start dealing cards face up, one at a time, into a pile. As you deal each card, you also speak aloud, in order, the 13 card faces in a standard deck: ace, two, three, etc. (When you get to king, you start over at ace.) You keep doing this until the rank of the card you deal matches the rank you speak aloud, in which case you lose. You win if you reach the end of the deck without any matches.

Riddler Classic

From Dan Calistrate, a game-theory-focused poker problem:

Baby poker is played by two players, each holding a single die in a cup. The game starts with each player anteing $1. Then both shake their die, roll it, and look at their own die only. Player A can then either “call,” in which case both dice are shown and the player with the higher number wins the $2 on the table, or Player A can “raise,” betting one more dollar. If A raises, then B has the option to either “call” by matching A’s second dollar, after which the higher number wins the $4 on the table, or B can “fold,” in which case A wins but B is out only his original $1. No other plays are made, and if the dice match, a called pot is split equally.

What is the optimal strategy for each player? Under those strategies, how much is a game of baby poker worth to Player A? In other words, how much should A pay B beforehand to make it a fair game?

Solution to last week’s Riddler Express

After seeing “Rogue One,” you’re inspired: You want to build a Death Star of your very own. You learn you can build one 50 meters in diameter, which requires a 1-meter-wide exhaust port. You want something much bigger. But power output scales with the volume, while surface area scales only with the radius-squared of the spherical spacecraft. The biggest you can build a Death Star before its entire surface is required for exhaust is 500 kilometers. OK, fine, I guess that’s kinda big.

Why 500? From the puzzle’s submitter, Po-Shen Loh: In the smaller, 50-meter version of the superweapon, the exhaust port has an area of about \(\pi/4\) square meters (the area of any circle is \(\pi r^2\)) out of a total surface area of \(4\pi\cdot 25^2 = 2500\pi\) square meters. (The surface area of any sphere is \(4 \pi r^2\).) The exhaust port therefore consumes 1/10,000 of its total surface area. Since the power output scales with the cube of the radius and the surface area scales with the square of the radius, we’ll need to use the whole surface area for exhaust once the diameter scales up 10,000 times. That happens at a Death Star diameter of 500 kilometers.

Solution to last week’s Riddler Classic

Nine stormtroopers are storming at you. You and each of the stormtroopers fire your blasters at the same rate. The stormtroopers each hit their target (i.e., you) with a random 0.1 percent of their shots, whereas you hit one of them with a \(K \sqrt{N}/1000\) chance, where N is the number of stormtroopers remaining and K is your accuracy advantage. (Their tight formation increases your odds of hitting one of them when there are many of them remaining.) This is a fair fight right about when K = 27.

Again, an explanation from Po: At first, this looks like an impossibly complex problem, because as the number of stormtroopers decreases, their likelihood of defeating you also decreases. But the times at which the stormtroopers fall are also randomly distributed. So if you try to model this on a shot-by-shot basis, it becomes very complex. The key insight is to take advantage of the low probability of any combatant hitting another and model the battle as a continuous timeline on which different participants have independent probabilities of scoring a hit.

At the beginning, there are nine stormtroopers firing at you, and because the probability of each hit is low, the chance that you hit one of them before any of them hit you is:

That must happen, or else you unfortunately have already lost. Assuming you strike first, there are now eight stormtroopers firing at you. The probability that you hit one of them before any of them hit you is:

You then multiply this by the previous probability, because the shots at this second stage are all independent of the shots at the first stage. Continuing in this way, we want to find the value of K that makes the following product equal to ½ (that is, that makes it a fair fight):