Who Wins A Very Boring Basketball Game?

Illustration by Guillaume Kurkdjian
Welcome to The Riddler. Every week, I offer up problems related to the things we hold dear around here: math, logic and probability. Two puzzles are presented each week: the Riddler Express for those of you who want something bite-size and the Riddler Classic for those of you in the slow-puzzle movement. Submit a correct answer for either,1 and you may get a shoutout in the next column. Please wait until Monday to publicly share your answers! If you need a hint or have a favorite puzzle collecting dust in your attic, find me on Twitter.
Riddler Express
There are many fractions with a numerator of 1 whose decimal expansions don’t go on to infinitely many decimal places. For example, 1/4 is equivalent to the decimal 0.25, and 1/500 is equivalent to 0.002. However, the decimal expansion of 1/3 is 0.33333 …, a decimal that never terminates.
If you were to add up all these numbers — fractions with a numerator of 1 whose decimal expansions don’t go on forever — what would be the sum? (Note: Before you ask, let’s include the fraction 1/1 in this group.)
The solution to this Riddler Express can be found in the following column.
Riddler Classic
Just in time for the NBA playoffs comes a basketball matchup between two relatively unmotivated teams:
The New York Nicks are facing off against the Brooklyn Naughts. Throughout the entire game, the two teams alternate possession, starting with the Nicks, until both teams have had exactly 100 possessions. For simplicity, assume that each team scores either 0 points or 2 points with each possession. (So don’t worry about 3-pointers, fouls, etc.)
Whenever the game is tied, the team that currently has possession has a 50 percent chance of scoring 2 points. When the game is not tied, the team that is in the lead takes it easy and the team that is behind is more motivated to score. In this case, assume that the team that is behind has a 50+x percent chance of scoring, while the team that is ahead has a 50−x percent chance of scoring. Here, x is a positive number that is greater than 0 and less than 50.
In preparation for the game, the official scorekeeper (who knows the value of x) crunched the numbers and realized the game has a 50 percent chance of being tied at the end of regulation.
In the event that the game is not tied at the end of regulation, what is the probability that each team wins?
The solution to this Riddler Classic can be found in the following column.
Solution to last week’s Riddler Express
Congratulations to 👏 Will Murray 👏 of London, England, winner of last week’s Riddler Express.
Last week, the Flash challenged Usain Bolt to a 100-meter race. Bolt ran at an average speed of 10 meters per second. To make it interesting, the Flash decided he would pick a random speed between 5 meters per second and 16 meters per second, with each speed in between being equally likely. (Note that fractional and decimal speeds were included here, rather than just whole numbers.)
On average, how often would you have expected the Flash to win? What would be his average margin of victory?
The first question was pretty straightforward. If the Flash ran anywhere between 10 and 16 meters per second, he would win the race. But if he ran between 5 and 10 meters per second, he would lose. For every six times he won, he lost five times. So his chances of winning were 6/11, or about 55 percent. The Flash was definitely the favorite to beat Bolt.
But things got a little trickier with the second question, where I asked for the Flash’s average margin of victory. Many readers interpreted the question as asking for this margin assuming the Flash won the race. Let’s address that interpretation first.
No matter what, Bolt ran the 100 meters in 10 seconds. But what about the Flash? If we look only at the cases in which the Flash won the race, then his speed was randomly chosen between 10 meters per second (in which case he also finished in 10 seconds) and 16 meters per second (in which case he finished in a blazing 6.25 seconds). To find his average finishing time, some readers were tempted to average these two values, for a time of 8.125 seconds. Other readers averaged the extremes in speed (10 and 16 meters per second), finding that with a speed of 13 meters per second the Flash would finish in about 7.692 seconds.
But neither of these times represented his average. To precisely calculate the average of a function — like the function f(v) = 100/v, which tells you the Flash’s finishing time as a function of his speed v — solvers Paige Kester and Rohan Lewis noted that you have to integrate it over an interval and divide by the width of that interval. (It’s a good thing the Flash knows calculus!) For our function f(v), the average over the range between 10 and 16 meters per second was about 7.833 seconds. So when he won, the Flash won by an average margin of about 2.167 seconds.
The more inclusive interpretation of “margin of victory” also allowed for negative margins — that is, when the Flash lost the race. So if we account for every race, then we integrate the function f(v) over the range between 5 (rather than 10) and 16 meters per second. This calculation revealed that, on average, the Flash finished the race in about 10.574 seconds, and his average margin of victory was -0.574 seconds.
Putting these results together, the Flash won the race most of the time, but his average time was slower than Bolt’s! How was this apparent contradiction possible? As pointed out by solver Max Scialabba, when the Flash lost the race, he lost by big margins. And when he won, it was by relatively smaller margins. So even though he won more than he lost, his average time was slower.
So if you had to bet on a single race, you’d pick the Flash to win. But if multiple Usain Bolt clones were in a relay race against multiple Flashes, the smart money would have been on the Bolt clones.
Solution to last week’s Riddler Classic
Congratulations to 👏 Mikey Mike 👏 of Madison, Wisconsin, winner of last week’s Riddler Classic.
In the hit online game World of Riddlecraft, players could level up their armor. Armor levels ranged from 0 to 5. Now, attempting to level up your armor required a cerulean gem, which was destroyed in the process. If the attempt was successful, your armor’s level went up by one; if not, it went down by one.
Fortunately, it was impossible to fail when attempting to upgrade your armor from level 0 to level 1. However, the likelihood of success went down the higher the armor was before the upgrade. More specifically:
- Upgrading from level 0 to level 1 had a 100 percent chance of success.
- Upgrading from level 1 to level 2 had an 80 percent chance of success.
- Upgrading from level 2 to level 3 had a 60 percent chance of success.
- Upgrading from level 3 to level 4 had a 40 percent chance of success.
- Upgrading from level 4 to level 5 had a 20 percent chance of success.
On average, how many cerulean gems could you have expected to use up in order to upgrade your armor from level 0 to level 5?
There were a few different ways to solve this, including running simulations on a computer to get a good estimate as well as using Markov chains. But for this column, I’ll highlight an algebraic solution.
Suppose the average number of gems needed to upgrade from level L to level 5 was gL. Right off the bat, you knew that g5 was equal to zero, since no more gems were required to reach level 5. Meanwhile, the answer to the riddle was the value of g0.
But to better understand the remaining values of gL, let’s take a closer look at g1 (i.e., starting from level 1). You knew that 80 percent of the time, you would successfully upgrade to level 2, at which point you needed an average of g2 gems. The remaining 20 percent of the time, you returned to level 0 and needed an average of g0 gems. As an equation, this meant that g1 was equal to 0.8g2, plus 0.2g0, plus another one — the gem you used up in going from level 1 to either level 2 or level 0.
Extending this thinking to all the levels, you could derive the following system of equations:
- g0 = g1 + 1
- g1 = 0.8g2 + 0.2g0 + 1
- g2 = 0.6g3 + 0.4g1 + 1
- g3 = 0.4g4 + 0.6g2 + 1
- g4 = 0.8g3 + 1
Good news! This system of equations consists of five equations and five unknowns, so it is quite solvable. After a bunch more algebra, solver Glenn Horton-Smith found that g4 was 31, g3 was 75/2, g2 was 241/6, g1 was 125/3 and g0 was 128/3. In other words, it took about 42.67 gems to max out your armor.
A few readers missed the detail that failing to level up your armor resulted in your level decreasing by one. If you assume the level stayed the same during a failure (rather than going down), then you only needed about 11.42 gems on average. That small detail wound up having a major effect on the number gems required.
Solver Tom Keith went a step further, generating a histogram for the number of gems required:

Despite the distribution’s long tail (where your armor was stuck in mid-level purgatory), the average was indeed about 42.67.
Finally, I think it’s worth noting a neat reformulation of this puzzle, courtesy of solver Emma Knight. Suppose you have a string of 5 bits, all of which are initially zero. Every step, you pick a bit at random and flip it. On average, how many flips will it take until every bit is a one? In this case, the current number of bits that are one perfectly correlates with the level of the armor, and the probabilities of transitioning between levels is also consistent. So once again, the answer is it takes about 42.67 flips on average.
Now, with that level-5 armor, go slay some more riddles!
Want more puzzles?
Well, aren’t you lucky? There’s a whole book full of the best puzzles from this column and some never-before-seen head-scratchers. It’s called “The Riddler,” and it’s in stores now!
Want to submit a riddle?
Email Zach Wissner-Gross at riddlercolumn@gmail.com.