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

These days I always have a pack of latex gloves nearby. But itâ€™s notoriously difficult to pull exactly two gloves out of the box at a time. Sometimes Iâ€™ll pull out two gloves, other times three, and yet other times four. Somehow, I never pull out any other number of gloves at a time.

This morning, I noticed that there are 10 gloves left in the box. How many distinct ways are there for me to remove all 10 gloves from the box? Note that the order matters here â€” for example, pulling out two gloves, then four gloves and then another four gloves is distinct from pulling out four gloves, another four gloves and then two gloves.

## Riddler Classic

From Chris Nho comes a question of rolling (and re-rolling) a die:

You start with a fair 6-sided die and roll it six times, recording the results of each roll. You then write these numbers on the six faces of *another*, unlabeled fair die. For example, if your six rolls were 3, 5, 3, 6, 1 and 2, then your second die wouldnâ€™t have a 4 on it; instead, it would have two 3s.

Next, you roll this second die six times. You take those six numbers and write them on the faces of *yet another* fair die, and you continue this process of generating a new die from the previous one.

Eventually, youâ€™ll have a die with the same number on all six faces. What is the average number of rolls it will take to reach this state?

*Extra credit:* Instead of a standard 6-sided die, suppose you have an *N*-sided die, whose sides are numbered from 1 to *N*. What is the average number of rolls it would take until all *N* sides show the same number?

## Solution to last weekâ€™s Riddler Express

Congratulations to đź‘Ź Lloyd Kvam đź‘Ź of Lebanon, New Hampshire, winner of last weekâ€™s Riddler Express.

Last week, a manager instructed his team to hold a sale on their widgets every morning, reducing the price by 10 percent. Every afternoon, he had them increase the price by 10 percent from the sale price, with the (incorrect) idea that it would return it to the original price.

After *N* days, the manager walked through the store in the evening, horrified to see that the widgets had been marked more than 50 percent off of their original price. What was the smallest possible value of *N*?

Reducing the price by 10 percent was the same as multiplying it by 9/10, while increasing the price by 10 percent was the same as multiplying it by 11/10. So if the starting price on a given day was *x*, then the sale price was 0.9*x*, while the final price was 1.1(0.9*x*), or 0.99*x*. In other words, the price was in fact *decreasing* by 1 percent every day. Also, recall that the manager had seen that dayâ€™s final price from the afternoon, rather than the sale price in the morning.

So the question was essentially asking how many incremental 1 percent decreases resulted in an overall 50 percent decrease â€” that is, whatâ€™s the smallest value of *N* for which 0.99^{N} is less than 0.5?

Some solvers, like Jake Russo, listed or graphed the various prices over time. Meanwhile, solver Sarry Al-Turk took a more direct approach. You wanted to find *N* such that 0.99^{N} < 0.5. Taking the logarithm of both sides gives the inequality log(0.99^{N}) = *N*log(0.99) < log(0.5). Dividing both sides by log(0.99) â€” a negative number, which means we have to flip our inequality â€” gives* N* > log(0.5)/log(0.99), which is approximately 68.97. The smallest *N* was therefore **69**.

A few solvers gave the correct answer to a slightly different question: What was the first time the price *ever* dipped below 50 percent of the original price? This happened on the morning of the 60^{th} day of the sale, when the sale price was 0.9(0.99)^{59}, or about 0.497, times the original value.

Anyway, if the manager had better number sense, he would have asked his team to lower the price by 10 percent each morning, and then raise it by 11.11â€¦ percent each afternoon. On the bright side, at least he was able to purchase widgets half-off.

## Solution to last weekâ€™s Riddler Classic

Congratulations to đź‘Ź Eric Widdison đź‘Ź of Kaysville, Utah, winner of last weekâ€™s Riddler Classic.

Last weekâ€™s Riddler Classic was all about the game SET.

In SET, there are 81 total cards, and each card has four attributes:

*Number:*Each card has one, two or three shapes on it.*Shape:*Each shape on a card is identical, and can be oval, diamond or â€śsquiggle.â€ť*Color:*Each shape on a card is identical in color, which can be red, green or purple.*Shading:*Each shape on a card is identical in shading, which can be solid, shaded or outlined.

Importantly, a â€śsetâ€ť (not to be confused with the gameâ€™s title) of cards consists of three cards that are either all alike or all different in each attribute; if two of the cards have a common attribute that is not shared by the third, they cannot be a set.

Before we get to the specific questions from last week, itâ€™s worth pointing out that SET* is a very popular game*, and, as a result, these questions have been asked (and answered) before. In particular, Iâ€™d like to send a shoutout to Gary Gordon and Liz McMahon, who not only submitted correct solutions but also literally wrote the book on SETâ€™s deeper math puzzles with their daughters.

In solving this puzzle, it was also helpful to first think about the total number of sets there were in a deck of 81 cards. The key here was to realize that, given any two cards in the deck, there was always exactly one card that would complete a set. For any attributes the first two cards shared, the third card in the set would have to be the same, and for any attributes the first two cards didnâ€™t share, the third would have to be different from both. So knowing any two cards in the set told you what the third card had to be.

So to count up all the sets, you could choose any two cards, and there were 81Â·80/2, or 3,240 ways to do this. However, for any given trio of cards, there were three ways to pick two, meaning we triple counted each set. The grand total number of sets in a deck was 3,240/3, or 1,080 sets.

Thatâ€™s a lot of sets! Here they are, visualized:

Each of the 81 points represents a card in the deck, and the 1,080 randomly colored triangles connecting the points are the sets.

Solver Laurent Lessard wrote some code to efficiently scour the 81 cards and 1,080 sets, ultimately building up a maximal board of **20 cards** with zero sets among them. There were many ways to pick these 20 cards, and hereâ€™s one of them, courtesy of Laurent:

Laurent also found a board of 12 cards with the maximal number of **14 sets**:

Can you find them all?

To find the probability of having at least one set among a random board of 12 cards, most solvers again turned to their computers. Steve Loomis kindly shared his code, finding that this probability was approximately **96.8 percent.**

Without the aid of a computer, this was indeed a very challenging Riddler Classic. For example, proving that the maximum number of cards with no sets (also known as the largest â€ścap setâ€ť) was 20 was only done in 1971, and it involved rather advanced algebraic theory. For more on these relatively recent developments, I suggest checking out this 2016 article from Quanta Magazine, which describes a new upper bound on the size of cap sets.

## 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 Zach Wissner-Gross at riddlercolumn@gmail.com.