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

Inspired by Catriona Shearer (if you don’t know who she is, seriously, check out her puzzles), this week’s Riddler Express is a geometric conundrum:

The picture above shows two semicircles. The lighter region (inside the larger semicircle but outside the smaller one) has an area of 7. What’s the area of the darker region?

## Riddler Classic

From Ricky Jacobson comes a puzzle of seeing how low you can roll:

You are given a fair, unweighted 10-sided die with sides labeled 0 to 9 and a sheet of paper to record your score. (If the very notion of a fair 10-sided die bothers you, and you *need* to know what sort of three-dimensional solid it is, then forget it — you have a random number generator that gives you an integer value from 0 to 9 with equal probability. Your loss — the die was a collector’s item.)

To start the game, you roll the die. Your current “score” is the number shown, divided by 10. For example, if you were to roll a 7, then your score would be 0.7. Then, you keep rolling the die over and over again. Each time you roll, if the digit shown by the die is less than or equal to the last digit of your score, then that roll becomes the *new* last digit of your score. Otherwise you just go ahead and roll again. The game ends when you roll a zero.

For example, suppose you roll the following: 6, 2, 5, 1, 8, 1, 0. After your first roll, your score would be 0.6, After the second, it’s 0.62. You ignore the third roll, since 5 is greater than the current last digit, 2. After the fourth roll, your score is 0.621. You ignore the fifth roll, since 8 is greater than the current last digit, 1. After the sixth roll, your score is 0.6211. And after the seventh roll, the game is over — 0.6211 is your final score.

What will be your *average* final score in this game?

## Solution to last week’s Riddler Express

Congratulations to 👏 Harry Elworthy 👏 of San Francisco, California, winner of last week’s Riddler Express.

Last week, you had to generate the largest number your could using exactly four threes. Specifically, you were allowed to add, subtract, multiply, divide, exponentiate or write them side-by-side. For example, if you had three nines instead of four threes, the biggest number you could make is 9^{99}, which equals 9^{387,420,489}.

Many solvers submitted a similar answer — 3^{333}. Remember, when you’re evaluating exponents, order of operations (PEMDAS, anyone?) dictates that you start from the topmost exponent and work your way back down. So 3^{333} equals 3^{327}, or 3^{7,625,597,484,987}. That’s a big number!

But solver Erin Seligsohn looked closer at the expression 3^{327}. Sure, that’s big, but it could be made *even bigger* if that topmost exponent, 27, were replaced by 33. Then you’d have **3 ^{333}**, which equals 3

^{5,559,060,566,555,523}. Sure enough, that’s the largest number you can make with four threes and the operations you were allowed to use. As solver Kyle Pekosh points out, this number “…has 2,652,345,952,577,569 (about 2.65 quadrillion) digits. If you were to write one digit of that number every second, a decade wouldn’t quite cut it.”

I was delighted by how much of Riddler Nation went *beyond* the list of allowed operations stated in the problem. Many proposed solutions included factorials, while others divided by zero (e.g., 33/(3−3)), which … don’t get me started.

Solver Josiah Kollmeyer went so far as to invoke an operation known as tetration. What is tetration? I thought you’d never ask. Just as multiplication is repeated addition, and exponentiation is repeated multiplication, tetration is repeated exponentiation. For example, 2↑↑5 (where the ‘↑↑’ is the sign for tetration) is 2^{2222}, an exponential stack of five twos. And so 3↑↑3 equals 3↑↑3↑↑3, which is only about 8 trillion (something you can at least type into your calculator). But what about 3↑↑(3↑↑3)? That’s 3^{3...}, with a total of 3^{3}, or 27, threes in the stack. That’s an *unconscionably *large number — and that was *just* 3↑↑(3↑↑3). If you were to evaluate 3↑↑(3↑↑(3↑↑3)) … your head, and calculator, would just explode. Fortunately for your head, tetration was not in the approved list of operations for this puzzle.

## Solution to last week’s Riddler Classic

Congratulations to 👏 Dave Paschal 👏 of Reno, Nevada, winner of last week’s Riddler Classic.

Last week, you were in a store with three kinds of candy were being sold: Almond Soys, Butterflingers and Candy Kernels. You wanted to buy at least one candy and at most 100, but you didn’t care precisely how many you got of each or how many you got overall. So you might have bought one of each, or you might have bought 30 Almond Soys, six Butterflingers and 64 Candy Kernels. As long as you had somewhere between one and 100 candies, you left the store happy. But as a member of Riddler Nation, you couldn’t help but wonder: How many distinct ways were there for you to make your candy purchase?

There are too many ways to write them all out. But there is an elegant approach that requires us to think beyond the candies. Suppose you want to buy exactly 100 candies, and instead of using a bag to hold them, you line them up on the counter one at a time. Oh, and suppose you also happen to have two dividers in your pocket.

You start by purchasing Almond Soys and lining them up, until you put your first divider down on the counter. Then you buy Butterflingers, one at a time, until you put the second divider down. Finally, you buy Candy Kernels until you have 100 candies in total.

By changing the positions of the two dividers relative to the rest of the candy, you can specify how many of each type you’re buying. So in order to compute how many ways we can buy 100 candies, we need to know how many ways we can position two dividers within a sequence of 102 objects (the 100 candies plus the two dividers). This can be done using combinatorics, a branch of discrete mathematics.

Now that’s just for the case of 100 candies, whereas the problem said you bought at most 100 candies — you could have purchased, 99, 98, 97, and so on, all the way down to one, for a grand total of 100 different cases. Indeed, many solvers broke the problem down into these 100 cases. They solved each case and and tallied up all the ways to buy candy with the aid of a computer, like the team of Ben Finkel, Cullen McAndrews, Zack Smith and Matt Thachet. Solver Aditya Radhakrishnan, meanwhile, impressively found a way to do this using one line of code in the programming language R: sum(unlist(lapply(seq(1, 100), function (x) { factorial(x + 2)/factorial(2)/factorial(x) }))).

Solver Gareth McCaughan took the idea of dividers one step further, imagining that there was a *fourth* candy that you could purchase, which, in an apparent reference to Douglas Adams, he named “Dingo’s Kidneys.” In Gareth’s approach, if you were to ever buy any fewer than 100 candies, then the difference would be made up of these Dingo’s Kidneys. For example, if you bought 30 Almond Soys, 30 Butterflingers and 30 Candy Kernels, then you’d imagine having bought 10 Dingo’s Kidneys, so that the total number of candies remains 100.

Then, imagine you have *three* dividers and exactly 100 candies (as opposed to anywhere from one to 100 candies). All we have to do is choose where the three dividers will be in a sequence of 103 objects (100 candy slots and three dividers). Again, we can use combinatorics to calculate the answer in a single shot — it’s 103 choose 3, or (103·102·101)/(3·2·1). That equals 176,851, which was **not** the answer.

Huh? Oh right, the original riddle said you had to buy at least one candy. Out of our 176,851 scenarios, one of them was the purchase of zero real candies and 100 Dingo’s Kidneys. Excluding that one case reveals the correct answer to be **176,850**.

Dingo’s Kidneys do sound vile … but I’m sure they’re mostly harmless.

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