# Can You Stack The Deck With Suits?

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 or send me an email.

## Riddler Express

From composer Grant Harville comes a musical mystery:

Grant is writing a musical composition. At one point in the piece, there’s an improvisational passage where musicians are instructed to repeatedly play a sequence of eight notes, which we can label as 1 through 8. The shortest such sequence is 12345678.

However, musicians can also revert to previous notes, replaying certain subsequences for additional flair. More specifically:

- They must always play the next note (i.e., adding 1 to the previous note), unless they revert to a previous note.
- At no point can they play the same note twice in a row.
- Notes 1 and 8 — that is, the first and last notes — can be played only once.
- They can only revert to a given note at most once.
- Once they have reverted to a specific note, they cannot then revert to an earlier note in the sequence.

That’s a whole bunch of rules! To make this clearer, it may be helpful to see some examples. The following are examples of valid sequences:

- 12345678 (This is the shortest sequence.)
- 1234567-234567-34567-4567-567-678 (This is the longest sequence.)
- 1234-234567-678
- 1234567-345-4567-5678
- 123-234567-3456-45678

Meanwhile, here are examples of *invalid* sequences, for various reasons:

- 1245678 (This skips the 3.)
- 12437568 (Some notes are out of order.)
- 12345-34678 (This skips a note within a reversion, even though that note occurs earlier.)
- 1234-3456-345678 (This reverts to the same note twice.)
- 12345-456-2345678 (This reverts to an earlier note after reverting to a later one.)
- 12345-567-678 (This repeats a note twice in a row.)
- 123-1234567-5678 (This repeats note 1.)
- 1234-23456-5678-8 (This repeats note 8.)

How many different sequences of the eight notes are possible under these conditions?

## Riddler Classic

From Brett Humphreys comes a card-counting conundrum:

Brett plays poker with a large group of friends. With so many friends playing at the same time, Brett needs more than the 52 cards in a standard deck. This got Brett and his friends wondering about a deck with more than four suits.

Suppose you have a deck with more than four suits, but still 13 cards per suit. And further suppose that you’re playing a game of five-card stud — that is, each participant is dealt five cards that they can’t trade.

As the number of suits increases, the probability of each hand changes. With four suits, a straight is more likely than a full house (a three-of-a-kind and a different two-of-a-kind in the same hand). How many suits would the deck need so that a straight (not including a straight flush) is *less likely* than a full house?

*Extra credit:* Instead of five-card stud, suppose you’re playing seven-card stud. You are dealt seven cards, among which you pick the best five-card hand. How many suits would the deck need so that a straight (not including a straight flush) is *less likely* than a full house?

## Solution to the last Riddler Express

Congratulations to 👏 Kris Adams 👏 of Bartonville, Illinois, winner of last week’s Riddler Express.

Last week, Bill had four opaque bags, each of which had three marbles inside. Three of the bags contained two white marbles and one red marble, while the last bag contained three white marbles. The bags were otherwise indistinguishable.

Ted watched as Bill randomly selected a bag and reached in without looking to grab two marbles without replacement. It so happened that both marbles were white. Bill was about to reach in and grab the last marble in that bag.

What was the probability that this marble was red?

As with other famous riddles related to conditional probability (like Monty Hall and the two child problem), your intuition could lead you astray here.

Some readers observed that, after removing two white marbles from among the 12 total marbles, Bill was left with three red marbles out of a total of 10. Therefore, the probability the last marble was red should have been 3/10. However, this was *not* the right answer.

Other readers argued that because *all three* bags had two white marbles, drawing two white marbles offered no new information about which bag Bill had selected. Because three of the four bags had a red marble, the probability the last marble was red should have been 3/4. However, this too was *not* the right answer.

To see why, suppose Ted randomly selected two balls from a bag with a red marble. In this case, he had a two-thirds chance of picking one red and one white marble, as well as a one-third chance of picking two white marbles. But for the remaining bag with three white marbles, Bill was *guaranteed* to choose two white marbles.

That meant Bill was three times more likely to pick two white marbles from the bag without a red marble than he was from each bag with a red marble. At the same time, there were three times as many bags with a red marble as there were bags without a red marble. And so the final marble was equally likely to be red or white; the probability that was red was **50 percent**.

If you’re still not convinced, you can simulate this for yourself at home. Set up the four bags, pick a random bag and then draw two marbles. But remember, if you happen to draw one red and one white marble, then you should discard that simulation. Only when you draw two white marbles is there a 50 percent chance that the last marble is white.

## Solution to the last Riddler Classic

Congratulations to 👏Tom Singer 👏 of Melbourne, Florida, winner of last week’s Riddler Classic.

Last week you decided to set up a marble race course. No Teflon was spared, resulting in a track that was effectively frictionless.

The start and end of the track were 1 meter apart, and both positions were 10 centimeters off the floor. It was up to you to design a speedy track. But the track always had to be at floor level or higher.

What was the fastest track you could design, and how long would it have taken the marble to complete the course?

From an introductory physics course, you know that the lower down the marble was, the less potential energy it had and the more kinetic energy it had, and thus the faster it moved. So one track design was to have the marble go straight down, at which point an infinitesimal lip redirected the marble horizontally along the floor. Once it was directly below the finish line, another infinitesimal lip redirected the marble straight up.

How long did it take for the marble to traverse such a course? If the initial descent (and, symmetrically, the final ascent) took *t* seconds, then you knew *h* = *gt*^{2}/2, where *h* was the initial height of the marble (0.1 meters) and *g* was the acceleration due to gravity, approximately 9.8 m/s^{2} at Earth’s surface. Solving this equation gave you *t* = 1/7 s. Meanwhile, the marble’s velocity along the floor was equal to the square root of 2*gh*, or 1.4 m/s. Traversing the floor at this speed took 5/7 s. Adding up all these times meant the marble reached the finish after precisely 1 second. But it was possible to get there *even faster*.

Last week I had said this puzzle was likely to “break your brachistochrone,” with that last word being the operative one. A brachistochrone is a path that takes an object from one place to another in minimal time using the force of gravity. But this exact path remained a mystery until it was solved by several big names in mathematics in the late 17th century. The brachistochrone turned out to be a segment of a cycloid (the path outlined by a single point on a rolling circle). Having the marble travel along a cycloid is faster than the aforementioned straight drop down. While a straight drop gets the marble to its maximum speed faster, the cycloid reduces the overall time by moving the marble closer to its destination as it accelerates.

Of course, this being The Riddler, the optimal path was not merely a cycloid. To travel a distance of 1 meter without any net change in elevation, a cycloid would have to dip 1/𝜋 m, or about 31.83 cm. This was impossible, as the puzzle stated the marble could not pass through the floorboards 10 cm below the starting point.

The solution was therefore to get the marble reasonably far along via a downward cycloid, then travel horizontally at high speed and finally return back up to the finish line along an upward cycloid. As noted by solvers Paige Kester and Laurent Lessard, having half a complete cycloid period (also known as a tautochrone) on either end, as shown below, did the trick. Solver Starvind even animated the marble along the track.

The time to traverse either tautochrone was 𝜋√(0.05/9.8), or about 0.2244 s. Once again, the marble again traveled at a speed of 1.4 m/s along the flat portion of the track, which was now 1−𝜋/10 m long. Adding up the times for the flat portion and the two tautochrones gave a total time of approximately **0.9387 s**, which was indeed faster than the track with the initial straight drop. (Solvers who used different values of *g* got slightly different answers.)

In the end, you literally had to “break your brachistochrone” into two parts — separated by a flat track, of course.

## 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.