Can You Play ‘The Price Is Right’ Continuously?
Let’s take a trip down memory lane and revisit a Riddler Classic from 2017. But where there were once a few discrete outcomes, there is now an infinitude imposed by continuity.
Welcome to Fiddler on the Proof! The Fiddler is the spiritual successor to FiveThirtyEight’s The Riddler column, which ran for eight years under the stewardship of myself and Ollie Roeder.
Each week, I present mathematical puzzles intended to both challenge and delight you. Beyond these, I also hope to share occasional writings about the broader mathematical and puzzle communities.
Puzzles come out Friday mornings (8 a.m. Eastern time). Most can be solved with careful thought, pencil and paper, and the aid of a calculator. Many include “extra credit,” where the analysis gets particularly hairy or where you might turn to a computer for assistance.
I’ll also give a shoutout to 🎻 one lucky winner 🎻 of the previous week’s puzzle, chosen randomly from among those who submit their solution before 11:59 p.m. the Monday after that puzzle was released. I’ll do my best to read through all the submissions and give additional shoutouts to creative approaches or awesome visualizations, the latter of which could receive 🎬 Best Picture Awards 🎬.
This Week’s Fiddler
From Michael Montuori comes an extension of a puzzle that first ran seven years ago!
Way back in 2017, The Riddler featured a puzzle about Showcase Showdown from the game show, “The Price Is Right.” Players spin a giant wheel, which has 20 segments labeled in 5-cent intervals from 5 cents up to 100 cents. This week, Michael is posing the continuous version of this problem.
Suppose you have two players: A and B. Player A is the first to spin a giant wheel, which spits out a real number chosen randomly and uniformly between 0 and 1. All spins are independent of each other. After spinning, A can either stick with the number they just got or spin the wheel one more time. If they spin again, their assigned number is the sum of the two spins, as long as that sum is less than or equal to 1. If the sum exceeds 1, A is immediately declared the loser.
After A is done spinning (whether once or twice), B steps up to the wheel. Like A, they can choose to spin once or twice. If they spin twice and the sum exceeds 1, they are similarly declared the loser.
After both players are done, whoever has the greater value (that does not exceed 1) is declared the winner.
Assuming both players play the game optimally, what are Player A’s chances of winning?
Extra Credit
The original riddle from seven years ago had three players rather than two. Let’s try the same here, with the continuous wheel instead!
So now you have three players: A, B, and C. Each player spins the same giant wheel once or twice. As before, spins generate numbers that are randomly, uniformly, and independently chosen between 0 and 1.
If a player spins once, they are assigned the resulting number. If they spin twice, they are assigned the sum of the spins. But if that sum exceeds 1, that player is immediately declared a loser.
Player A goes first, then Player B, and finally Player C. After all three players are done, whoever has the greatest value (that does not exceed 1) is declared the winner.
Assuming all three players play the game optimally, what are Player A’s chances of winning?
(By the way, if you happen to explore variants of this puzzle with four or more players, let me know in your submission!)
Making the Rounds
There’s so much more puzzling goodness out there, I’d be remiss if I didn’t share some of it here. This week, I got wind that Team USA emerged victorious at the 13th European Girls’ Mathematical Olympiad (EGMO), and that each of the four Americans earned an individual gold medal. One of the Americans—who happens to be the daughter of my former camp counselor, no less—had the highest overall score among all 212 participants!
Here’s a link to the six problems and solutions from the 2024 olympiad. They range in difficulty (from hard to extremely hard) so I figured I’d just share Problem 1 here:
Two different integers u and v are written on a board. We perform a sequence of steps. At each step we do one of the following two operations:
If a and b are different integers on the board, then we can write a + b on the board, if it is not already there.
If a, b, and c are three different integers on the board, and if an integer x satisfies ax2 + bx + c = 0, then we can write x on the board, if it is not already there.
Determine all pairs of starting numbers (u, v) from which any integer can eventually be written on the board after a finite sequence of steps.
If you’re already writing some code to figure this out, remember that computers (not to mention calculators) are not allowed in the olympiad.
Want to Submit a Puzzle Idea?
Then do it! Your puzzle could be the highlight of everyone’s weekend. If you have a puzzle idea, shoot me an email. I love it when ideas also come with solutions, but that’s not a requirement.
Last Week’s Fiddler
Congratulations to the (randomly selected) winner from last week: 🎻 Andrew Ford 🎻 from Madison, Wisconsin. I received 52 timely submissions (how appropriate, considering the puzzle involved decks of cards!), of which 43 were correct—good for an 83 percent solve rate.
As I predicted, a number of readers were already familiar with last week’s puzzle, but that didn’t stop me from running it.
You and a friend each had a standard deck with 52 cards. You thoroughly shuffled your deck, while your friend thoroughly shuffled theirs. Then, you both drew cards one at a time. If the first card you drew was the same as the first card your friend drew, you both lost! Otherwise, you both drew again. If the next card you drew was the same as the next card your friend drew, you both lost! Otherwise … and so on.
If the two of you made it through your entire decks without ever drawing the same card at the same time, you both won. Otherwise, you both lost.
What was the probability that you and your friend would win this collaborative game?
First off, several readers pointed out that it made no difference whether you and your friend both shuffled your respective decks, or if only one of you did. Either way, the probability any given pair of simultaneously drawn cards were the same was 1/52.
Before tackling decks with 52 cards, it was simpler to work with smaller decks and look for some sort of pattern or intuition, so let’s start there. If each deck had one card (i.e., the same one card), then you were guaranteed to lose. If each deck had two cards, things got a little more interesting. Suppose (without loss of generality) that your cards were ordered 1-2. There was a 50 percent chance your friend had the same order (1-2), in which case you lost. But there was also a 50 percent chance your friend had the opposite order (2-1), in which case you won. So your chances of winning were 50 percent.
Next, suppose each deck had three cards, and that yours was ordered 1-2-3. Your friend’s deck had 3!, or six, possible permutations, two of which resulted in victory: 2-3-1 and 3-1-2. All other permutations resulted in either one or three pairs of drawn cards matching. So when there were three cards to a deck, you had a one-in-three chance of winning.
Let’s look at one final smaller case before we move on: decks with four cards. Suppose once again that your deck was ordered 1-2-3-4. This time, your friend’s deck had 4!, or 24, possible permutations. Among these, nine resulted in victory: 2-1-4-3, 2-3-4-1, 2-4-1-3, 3-1-4-2, 3-4-1-2, 3-4-2-1, 4-1-2-3, 4-3-1-2, and 4-3-2-1. So when there were four cards in a deck, your probability of winning was 9/24, which simplified to 3/8, or 37.5 percent.
When the number of cards N in a deck increased from one to four, your probability of winning went from 0 percent to 50 percent to 33.3 percent to 37.5 percent. At this point, if you weren’t getting a whiff of a sequence that converged to 30-something percent, then you needed to get your nose checked!
Your remaining challenges were figuring out just what this sequence was and then determining what value it resulted in when N was 52. A handful of readers figured your chances of winning were the probability that the first pair of drawn cards didn’t match (51/52) times the probability the second pair of drawn cards didn’t match (again, 51/52) times the probability the third pair of drawn cards didn’t match (yawn, 51/52), and so on. So your probability of winning was (51/52)52, or about 36.43 percent. That’s 30-something percent, so it must be right. Right?
Wrong. When each deck had N cards, this line of reasoning suggested your probability of winning was (1−1/N)N. But this formula didn’t return the correct values when N was two (25 percent vs. 50 percent), three (29.6 percent vs. 33.3 percent), or four (31.6 percent vs. 37.5 percent)—cases we just worked out by hand. The deeper explanation here was that getting mismatched cards technically weren’t independent events. For example, in the case of two cards per deck, if you had a matching first pair, that meant you were guaranteed to have a matching second pair. And in the case of three cards per deck, if you started with matching and non-matching pairs, then your third and final pair had to be non-matching.
While (1−1/N)N wasn’t the correct general formula, it turned out to be awfully close. In fact, it had the same limiting behavior. Just as (1+1/N)N approaches e, (1−1/N)N approaches 1/e, or about 36.788 percent. For an infinitely large deck, this turned out to be your probability of winning.
That was all well and good, but we still didn’t have an exact answer for N = 52. So let’s get to it.
Suppose you wanted to count up the number of ways N cards could be ordered such that every card had changed position. As I suggested in the puzzle statement, this is a well-studied problem, and these sorts of permutations even have a special name—they’re called “derangements,” and the number of derangements for N cards is commonly written as !N (as opposed to factorials, which have the exclamation point after the number or variable). We already computed that !1 = 0, !2 = 1, !3 = 2, and !4 = 9. Meanwhile, the answer to this Fiddler could be written concisely as !52/52!.
To compute !52, you could take advantage of the recursive relationship exhibited by the counting of derangements. Suppose you already computed !N and !(N−1). Could you use these to somehow find an expression for !(N+1)? It helped to think about specific ways you could keep the cards deranged when adding the last card:
You could derange the first N cards, and then swap card N+1 with any of those deranged N cards. This was guaranteed to produce a derangement for N+1 cards. There were !N such derangements for N cards, and N locations for swapping in card N+1, so there were N·!N such derangements for N+1 cards.
Alternatively, you could have precisely one of the N cards in its original position, meaning the other N−1 were deranged. Then, you could swap card N+1 with that one card, again resulting in a derangement for N+1 cards. There were N cards to choose from and !(N−1) derangements for each card, resulting in a total of N·!(N−1) derangements for N+1 cards.
Putting these cases together gave the recursive relationship !(N+1) = N·(!N+!(N−1)). From this, you could compute that !5 = 44, !6 = 265, !7 = 1854, and so on. The number of derangements formed a rather famous sequence, the 166th documented sequence on OEIS.
This sequence grows exponentially, much like the factorials. An interesting relationship between them is that !N/N! = 1/0! − 1/1! + 1/2! − 1/3! + 1/4! − 1/5! + … ± 1/N!. (Side note: This very same series can be found directly by the inclusion-exclusion principle, but I won’t be going into that in this write-up.) As N goes off to infinity, this series becomes the Maclaurin series for ex, evaluated at x = -1. In other words, it approaches 1/e.
Moreover, the series alternates overshooting (when N is even) and undershooting (when N is odd) 1/e, which was evident from the first few values we calculated above. In the case of N = 52, the sum overshot 1/e, and equaled the following fraction (which was included in the submissions of Sanandan Swaminathan, Q P Liu, Benjamin Dickman, Michael Schubmehl, and Emily B Zhang):
193937806586896328746924473226467394949530139620339174273819171217 / 527177615496365219422618541545122659969212453861982208000000000000
Suffice it to say, that was pretty dang close to 1/e. As last week’s winner, Andrew Ford, observed, the overshot was less than 1/53!.
As long as your answer was sufficiently close to 1/e, I counted it as correct. And for those of you who happened to submit the probability that you lost rather than won the card game (i.e., approximately 1−1/e), I still counted it as correct. (To arrive at that incorrect value, you still had to do all the clever figuring the problem demanded.)
Maybe this was intuitive for some of you, but I still find it remarkable that the probability of having no matching cards among very large decks approaches any specific value other than 0 or 1. I guess, since it does approach something, it only makes sense for that something to relate to e, given the combinatorics and factorials at play.
Last Week’s Extra Credit
Congratulations to the (randomly selected) winner from last week: 🎻 Matt Carlton 🎻 from Los Osos, California. I received 33 timely submissions, of which 27 were correct—good for an 82 percent solve rate.
Once again, you and your friend both had standard decks of 52 cards. This time, you first combined them into a single deck with 104 cards, and you thoroughly shuffled it. Then, you randomly split this back into two decks with 52 cards each—one for you and one for your friend.
At this point, you continued as before (i.e., in last week’s Fiddler), with each of you drawing one card at a time. If the two of you made it through your entire decks without ever drawing the same card at the same time, you both won. Otherwise, you both lost.
What was the probability that you and your friend would win this collaborative game?
Keep reading with a 7-day free trial
Subscribe to Fiddler on the Proof to keep reading this post and get 7 days of free access to the full post archives.