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-size 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 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 Gary Anwyl, some Broadway math:

The song “Seasons of Love” from the musical “Rent” states that a year has 525,600 minutes. And, indeed, 365×24×60 = 525,600.

This, naturally, raises an abstract mathematical question: Given any three random integers — X, Y and Z — what are the chances that their product is divisible by 100?

## Riddler Classic

From John Hanna, a different kind of “card” game:

You and I are playing a game. It’s a simple one: Spread out on a table in front of us, face up, are nine index cards with the numbers 1 through 9 on them. We take turns picking up cards and putting them in our hands. There is no discarding.

The game ends in one of two ways. If we run out of cards to pick up, the game is a draw. But if one player has a set of three cards in his or her hand that add up to *exactly 15 *before we run out of cards, that player wins. (For example, if you had 2, 4, 6 and 7, you would win with the 2, 6 and 7. However, if you had 1, 2, 3, 7 and 8, you haven’t won because no set of three cards adds up to 15.)

Let’s say you go first. With perfect play, who wins and why?

## Solution to the last week’s Riddler Express

Congratulations to ÐÐ¯Ð¡Ð Gwen Katz ÐÐ¯Ð¡Ð of Altadena, California, winner of last week’s Riddler Express!

Last week, the pesky enemies of Riddler Nation sent you into a maze. You had to reach the “ÑÐ¨â” to escape. The maze looked like this:

You were, however, allowed to enter the maze anywhere on its perimeter. You could travel in straight lines up, down, left and right, but never diagonally. The letters in the boxes indicated your next move, relative to your direction of travel: “L” meant you turned left, “R” you turned right, “S” you continued straight and “?” you could choose any direction. If you hit an “X” or exited the maze, you lost. Could you reach the “ÑÐ¨â,” and if so, how many moves did it take?

Yes, indeed you could. There was more than one way to solve the maze, but the quickest path took **34 moves**.

Here’s that path, from this week’s winner, Gwen:

Beautiful, isn’t it? Here’s a slightly longer, 42-move path from solver Ken Marley, entering the maze at a different spot.

One useful way to solve the puzzle is to work *backwards*. That way, for example, we know that we’ll need to arrive in the “L” below the smiley face — none of the other squares will work. We also know then that we’ll need to arrive in the “L” below that “L,” and therefore the “S” to the left of that “L,” and so on, eventually leading us to one of the squares around the perimeter.

This navigational puzzle also generated some lovely visualizations. Solver Chris Clements, inspired by his fond memories of the text-based adventure game Hunt the Wumpus, redrew the maze into something a bit more intuitive for us human travelers.

And solver Dan Larremore recast this puzzle as an exercise in network visualization. Each square in the maze is a node in a network, and each node is connected to other nodes as a result of the letter in that square. In this approach, a solution looks like this:

## Solution to last week’s Riddler Classic

Congratulations to ÐÐ¯Ð¡Ð Grant Alpert ÐÐ¯Ð¡Ð of Ann Arbor, Michigan, winner of last week’s Riddler Classic!

Last week, after escaping that maze, you found yourself on the street corner talking to a man who said his name was Three Deck Monte. On a table in front of him were three decks of cards, which you were allowed to inspect.

- Red Deck: four aces, four 9s, four 7s
- Blue Deck: four kings, four jacks, four 6s
- Black Deck: four queens, four 10s, four 8s

Monte offered you a bet: You pick any one of the decks, and he then picks a different one. You both shuffle your decks and compete in a short game similar to War. You each turn over cards one at a time, the one with a higher card wins that turn, and the first to win five turns wins the bet.

Should you take it? What are your chances of winning if you do?

No, you probably shouldn’t take this bet, and not just because his name is Three Deck Monte. Monte will win this game about 70 percent of the time — 1,274/1,815 to be exact.

This game is sort of like rock-paper-scissors in disguise. While it’s true that you can pick any deck you want, Monte will observe your choice, and there will always be a deck that Monte can pick that has the advantage over yours. Just as rock beats scissors beats paper beats rock, so too does the Red Deck have the edge over the Blue Deck, which has the edge over the Black Deck, which has the edge over the Red Deck.

Once we’ve noticed this fact about the game, all that’s left is to calculate our chances of winning given our choices of deck. A little computer program is helpful here. Our winner Grant explained what his program did for each deck matchup:

- Reset the deck and loop 12 times over the following:
- Pick a random number, from one to the number of cards remaining.
- Remove that card from the deck.
- Compare the cards and add to the win total of the winning player.
- Check the win totals for each player; if either is five, go back to Step 1.

Solvers Aaron Rudkin, Ed Tang and Zach Bogart were also kind enough to share their code.

Finally, solver Josh Starkey shared the visual results of his simulations, showing the advantages that accrue with each set of decks.

It’s a trap!

## Want more riddles?

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 me at oliver.roeder@fivethirtyeight.com.