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 bitesize and Riddler Classic for those of you in the slowpuzzle movement. Submit a correct answer for either, and you may get a shoutout in next week’s column. If you need a hint or have a favorite puzzle collecting dust in your attic, find me on Twitter.
Riddler Express
From Ben Pyle, how about a nice game of Nim?:
You challenge your friend to a friendly game: You will each take turns taking matchsticks from the arrangement shown below. You alternate taking sticks, and the person who picks up the last stick loses. On your turn, you can pick up as many sticks from any single row as you want, but you must pick up at least one stick. You go first.

  
    
      
Do you win? If so, what was your strategy? (Ben also created an applet where you can practice this game against the computer.)
Riddler Classic
From Brian Sun, an amphibious enigma:
A frog needs to jump across 20 lily pads. He starts on the shore (Number 0) and ends precisely on the last lily pad (Number 20). He can jump one or two lily pads at a time. How many different ways can he reach his destination?
What if he can jump one, two or three at a time? Or four? Five? Six? Etc.
Solution to last week’s Riddler Express
Congratulations to 👏 Valerie Kim 👏 of Toronto, winner of last week’s Express puzzle!
Last week you, a very wealthy aristocrat, owned 25 horses. You were bored one day (you’re bored every day) and decided to amuse yourself by identifying the three fastest horses in your stable. However, your personal racetrack was severely lacking in capacity, and you could only race five horses at a time. What is the minimum number of races you needed to organize to identify your three fastest horses?
You needed to organize seven races.
Here’s how to organize them. First, run five full races so that each horse races once. Keep the top three from each race in contention and eliminate the bottom two. (You can’t be the thirdfastest overall if you finish in fourth or fifth.) That leaves 15 horses after five races.
Second, race the five winners from the first step. The winner of this race is sure to be your fastest horse, so you can cement one of your top three and send that fastest horse back to the stable. The second and thirdplace horses from this race are still in contention. You can eliminate the bottom two. That leaves 12 horses vying for two spots.
But some of these 12 don’t even need to race again. You can eliminate all the horses that finished behind the second heat’s bottom three the first time around, since they can’t be one of the three fastest horses. That’s a total of six horses you hadn’t already eliminated. And there’s one more horse to rule out: the one that raced with the second heat’s secondplace finisher, but finished in third in that first heat. That’s because there are at least three horses we know for sure are faster than that horse. That leaves you with five horses vying for two spots after six races.
Finally, race those five remaining horses. The top two are your second and thirdfastest horses. And you’re done! You can now relax and sip champagne and eat caviar on the deck of your yacht, dreaming of all the veryfast galloping you have ahead of you.
Solution to last week’s Riddler Classic
Congratulations to 👏 Roberts Veics 👏 of Riga, Latvia, winner of last week’s Classic puzzle!
On the game show “The Price Is Right,” there is a segment called the Showcase Showdown. Three players step up, one at a time, to spin an enormous wheel. The wheel has 20 segments at which it can stop, labeled from 5¢ up to $1, in increments of 5¢. Each player can spin the wheel either one or two times. The goal is for the sum of a player’s spins to get closer to $1 than the other players’ sums, without going over. (Any sum over $1 loses. Ties are broken by a single spin of the wheel, where the highest number triumphs.) For what amounts should the first spinner stop after just one spin, assuming the other two players will play optimally?
The first player should stop with 70¢ or higher. She should spin again with 65¢ or lower.
We can get there by working backward, starting with the strategy of the third player to spin the wheel. Call the value of the third player’s first spin
Player 3 spins the wheel and it lands on
So now that we know what Player 3 will do, we move backward: Player 2 spins the wheel and it lands on
Moving backward one last time: Player 1 spins the wheel and it lands on
You can find an exhaustive treatment of this “The Price Is Right” problem, including an empirical analysis and the complications introduced by the show’s bonuses, in this paper by Rafael Tenorio and Timothy Cason. It turns out that actual players “show a clear bias for failing to spin again when it is optimal to do so, as opposed to spinning again when it is not optimal to do so.”
Want to submit a riddle?
Email me at oliver.roeder@fivethirtyeight.com.
Important small print: For you to be eligible, I need to receive your correct answer before 11:59 p.m. EST on Sunday. Have a great weekend!
Important small print: For you to be eligible, I need to receive your correct answer before 11:59 p.m. EST on Sunday. Have a great weekend!
The diagram shows four rows of matchsticks. Row 1 has one matchstick, Row 2 has three, Row 3 has five, and Row 4 has seven.