Skip to main content
Menu
How Many Cars Are On This Circular Train?

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 Matt Ralph, a little bit of number theory:

What’s the next number in this series?

1111211121212211212221212121…

Submit your answer

Riddler Classic

From Ben Tupper, ‘round and ‘round the railroad:

You find yourself in a train made up of some unknown number of connected train cars that join to form a circle. It’s the ouroboros of transportation. Don’t think too hard about its practical uses.

From the car you’re in, you can walk to a car on either side — and because the train is a circle, if you walk far enough eventually you’ll wind up back where you started. Each car has a single light that you can turn on and off. Each light in the train is initially set on or off at random.

What is the most efficient method for figuring out how many cars are in the train?

(Assume that you can’t mark or otherwise deface a train car, and that each car’s light is only visible from within that car. The doors automatically close behind you, too. There are only two actions you can take: turning on or off a light and walking between cars.)

Submit your answer

Solution to last week’s Riddler Express

Congratulations to 👏 Luke Rice 👏 of Toledo, Ohio, winner of last week’s Riddler Express!

Last week brought you to an enchanted land in which you stumbled upon the maze below.

You also — thankfully — found some instructions alongside it. Your goal was to exit the maze via the “Win!” hex. When moving from one hexagon to another, you had to obey two basic rules: If you came to a hex with a consonant, you had to turn left: either a mild left (60 degrees, or one hex to the left), or a sharp left (120 degrees). If you came to a hex with a vowel (“Y” is a vowel), you had to turn right: either a mild right (60 degrees, or one hex to the right), or a sharp right (120 degrees). Furthermore, you could never proceed straight or back directly up. If you traveled outside of the pictured hexes, or entered the dreaded gray hex, you had to return to the start. And you had to pass through the letter “M” before you were allowed to finish.

How could you navigate to the end? There was more than one path. The maze’s submitter, Tom Hanrahan, plotted a winning — and winding — way out:

Another winning solution spells DAADQANMADQANYCENSEKUEKEESALFI. “Spells.”

“The path means something,” our winner Luke wrote. “Probably involving Area 51.”

Solution to last week’s Riddler Classic

Congratulations to 👏 Ante Spahija 👏 of Zagreb, Croatia, winner of last week’s Riddler Classic!

Last week’s classic brought another navigational challenge, this one involving the lower 48 United States. Each of these states shares at least one border with another state. You were planning a road trip in order to visit as many states as possible, with the only restriction being that you could only cross a border from one state to another one time. You could visit a state any number of times, as long as you did not enter or leave it from a border you have already crossed. How many states could you visit?

You could visit all 48 states!

In fact, there are many different ways to plan such an exhaustive trip. Here’s one order of state visits: Maine, New Hampshire, Vermont, Massachusetts, Rhode Island, Connecticut, New York, New Jersey, Pennsylvania, Ohio, Indiana, Illinois, Iowa, Nebraska, Wyoming, Idaho, Oregon, Washington, Idaho, Montana, North Dakota, South Dakota, Minnesota, Wisconsin, Michigan, Indiana, Kentucky, West Virginia, Maryland, Delaware, Pennsylvania, Maryland, Virginia, Tennessee, Alabama, Georgia, North Carolina, South Carolina, Georgia, Florida, Alabama, Mississippi, Louisiana, Texas, Arkansas, Oklahoma, New Mexico, Arizona, California, Nevada, Utah, Colorado, Kansas, Missouri.

And solver Alex Bush included a picture of another successful trip:

Another helpful way to visualize this problem is to turn the map of the U.S. into a graph, where the vertices are states and the edges are the borders between them. In the parlance of graph theory, the road trip we seek is called a Hamiltonian path. Solver Heather from Cambridge illustrated this abstracted journey through the vertices:

Finally, solver Zach Wissner-Gross went a bit further, and found a path that visited 91 states without crossing any border twice.

Better gas up the car.

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.

Footnotes

  1. Important small print: For you to be eligible, I need to receive your correct answer before 11:59 p.m. Eastern time on Sunday. Have a great weekend!

Oliver Roeder is a senior writer for FiveThirtyEight.

Comments