Discover more from Fiddler on the Proof
How Long Would It Take to Pick a Speaker at Random?
This week, there was more chaos in the House of Representatives. But instead of chaos, what if there had been pure randomness?
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
The Fiddlerian government is in crisis. In particular, the Elephant Party, which possesses a majority of seats in the House (one of the two congressional chambers), can’t seem to select a new Speaker. At the moment, there are three candidates who want the job.
So here’s their new plan to select a Speaker. All 221 members of the Elephant Party will get in a room and vote for one of the three candidates. Now, the party is known for its chaotic behavior, and sure enough, each voter will pick randomly from among the candidates—even if they themselves are one of the candidates!
If one candidate earns the majority of the votes, they become the next Speaker! Otherwise, the candidate with the fewest votes is eliminated and they repeat the process with one less candidate. If two or more candidates receive the same smallest number of votes, then exactly one of them is eliminated at random.
They might be able to select their speaker in the first round of voting. After a second round, if it occurs, they would definitely have a Speaker. That means the average number of rounds needed is somewhere between one and two. What is this average?
Uh-oh, a few more candidates have suddenly entered the race! It now appears that there are 10 candidates running for speaker. On average, now how many rounds are needed until one candidate secures a majority of the 221 votes?
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’m sharing a visual puzzle from Matt Enlow that bothered me, then bothered me again—both times in a good way, of course.
In words, the puzzle goes something like this: You have an infinite supply of hemispherical shells of any radius you want but a maximum radius R. If you stack these shells on top of each other, what’s the tallest tower you can make?
Feel free to make whatever assumptions you want, but I chose to assume that the shells had thickness zero and that all shells had to be facing “up,” meaning each hemisphere’s great circle was resting on the hemisphere below it in the tower.
Last Week’s Fiddler
Congratulations to the (randomly selected) winner from last week: 🎻 Greg Tanner 🎻, from Moorhead, Minnesota. I received 53 timely submissions, of which 26 were correct—a 49 percent solve rate that ranks third-lowest among all Fiddlers.
Last week, you found yourself engaged in a car chase, in which both you and your pursuer were mindful to stop at any and all red lights.
You were trying to make it to the city limit, but you were currently one block ahead of your pursuer, both waiting at red lights. These lights turned green at the same time, at which point both cars began moving east at a speed of one block per minute.
Every time you came to an intersection, there was a 50 percent chance the light was green, in which case you coasted right on through. But there was also a 50 percent chance the light was red, in which case it took exactly one minute for the light to turn green again. These same probabilities governed your pursuer—at each intersection, they had a 50 percent chance of encountering a green light and a 50 percent chance of encountering a red light and having to wait one minute, entirely independent of whatever you might have encountered at that same intersection.
Including the light at which you were now stopped, there were five traffic lights between you and the city limit, as illustrated below. That meant there were six lights for your pursuer.
How likely was it that you’d make it past the city limit without being caught?
Boy, was there a variety of approaches to solving this one. In reading through the solutions, I encountered Markov chains, attempts at solving the “harder” problem of starting N lights away from the city limit with an initial lead of L lights, dynamic programming, binary code … the list goes on.
One way to solve this puzzle was to look at how many red lights you had encountered (excluding the starting light) after one, two, three, and four traffic lights, and compare that to how many red lights your pursuer had encountered after one, two, three, and four traffic lights. If, after any number of these lights, you hit more reds than your pursuer had up to that corresponding number of lights, then you’d be caught. (What’s subtle but important here is that I’m talking about the number of lights rather than the number of minutes that have passed, which would have made things more complicated.)
At this point, let’s define the function D(N) as the number of red lights your pursuer has encountered among their first N lights minus the number of red lights you have encountered among your first N lights. Initially, you had D(0) = 0. If any of D(1), D(2), D(3) or D(4) was negative, then you’d get caught.
So how did D evolve as N increased? It behaved like a random walk! When your and your pursuer’s Nth lights were both green upon being encountered, or when they were both red, which together happened 50 percent of the time, D didn’t change. When your Nth light was green but your opponent’s Nth light was red, which happened 25 percent of the time, D increased by 1. But when your Nth light was red and your opponent’s Nth light was green, D decreased by 1. Here’s a diagram showing all the ways D could have evolved:
All the diagonal arrows (shown in red and blue) had probabilities of 25 percent, while the vertical arrows had probabilities of 50 percent. By inspection, there were eight distinct paths down this tree that landed you in the dreaded D = -1 position. Here they were, along with the probabilities of each step in the path:
To find the probability of each path, you had to multiply the probabilities of the independent steps. These products came out to 1/4, 1/8, 1/16, 1/64, 1/32, 1/128, 1/128, and 1/128. Because these eight cases were mutually exclusive, the probability of being caught was the sum of these eight respective probabilities, which was 65/128. That meant the probability of escape was one minus that sum, or 63/128 (about 49.2 percent). At the end of the day, escape was just an inch shy of a coin flip.
Quite a few solvers submitted answers of 838/2,187, or about 38.3 percent. I believe this would have been the answer if each light was randomly red or green after each minute. The wrinkle here was that whenever you encountered a red light, it was guaranteed to be green after one minute, and could not remain red.
Last Week’s Extra Credit
Congratulations to the (randomly selected) winner from last week: 🎻 Jake Conway 🎻, from Grand Rapids, Michigan. I received 31 timely submissions, of which 29 were correct—good for a very solid 94 percent solve rate.
For Extra Credit, you now supposed that Fiddler City was infinitely large. Once again, you found yourself stopped at a red light, heading due east, with your pursuer one block behind you. Both your light and your pursuer’s light turned green the same instant, and all the other details (i.e., speeds, probabilities, and timings) were the same as before.
On average, how many minutes did it take for you to be caught?
While your pursuer inevitably caught you (i.e., with a probability that approached 1 asymptotically over time), the average time to capture was infinite. While paradoxical, this was indeed possible.
Several solvers, including Laurent Lessard and Josh Silverman, showed this using approximations of Catalan numbers. Meanwhile, David Kravitz and Tom Keith demonstrated the absurdity at play using a recursive argument (the latter did so rather comically via a warning in computer code).
Let’s define E(D) as the expected number of lights both you and your pursuer will have to encounter until you have seen more reds than they have, assuming the current difference (i.e., their red lights minus your red lights) is D. Again, our units here are the number of traffic lights, not the number of minutes that have passed. (In the end, this won’t be a problem for us, since the number of minutes for you will always be at least the number of lights encountered.)
In general, E(D) = 1 + 1/4·E(D−1) + 1/2 E(D) + 1/4·E(D+1), with each term corresponding to the probabilities of red vs. green lights outlined above. With a little algebra and a hint of mathematical induction, we can show that E(D) = 2·(D+1) + (D+1)/(D+2)·E(D+1). And with just a little more work, we can show that E(0) = 2·D + 1/(D+1)·E(D). For very large D, E(D) is of course positive, while 2·D grows with D. All this is to say that E(0) diverges.
The bad news? You’re going to get caught. The good news? On average, it will take you infinitely many minutes to get caught. (Want more bad news? The median time to getting caught is still finite. Sorry.)
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.
Thanks for reading Fiddler on the Proof! Subscribe for free to receive new posts and support my work.