Skip to main content
ABC News
Can You Find A Matching Pair Of Socks?

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. Or in this case, two weeks — Happy Holidays! If you need a hint or have a favorite puzzle collecting dust in your attic, find me on Twitter.

Riddler Express

From Mark Hannan comes a holiday party stumper:

You’re new at your job, and your office is voting on a theme for its holiday party. It’s fallen on you to record the percent of your coworkers (including yourself) who voted for each one. Well, since you’re in a hurry, you just write down everything in the percentage that comes before the decimal point. So for example, 35.0 percent, 35.17 percent and 35.92 percent would all be written simply as “35 percent.”

After the votes are tallied, you found that the winner received 73 percent of the vote (at least, that’s what you wrote down), while second place had 58 percent, and third place had 32 percent. Your first realization is that you work with a bunch of cheaters who voted more than once. But your second thought is that you might be able to use this information to figure out how many people work in your office. (As I said, you’re new, and this isn’t something you know off the top of your head.)

Based on these percentages, what’s the minimum number of people who could work in your office?

Extra credit: Your office could be filled with many possible numbers of people. Based on the percentages given in the problem, what’s the greatest number of people your office can’t have?

Submit your answer

Riddler Classic

From Kathy Bischoping comes a question we’ve all asked ourselves at one time or another:

I have 10 pairs of socks in a drawer. Each pair is distinct from another and consists of two matching socks. Alas, I’m negligent when it comes to folding my laundry, and so the socks are not folded into pairs. This morning, fumbling around in the dark, I pull the socks out of the drawer, randomly and one at a time, until I have a matching pair of socks among the ones I’ve removed from the drawer.

On average, how many socks will I pull out of the drawer in order to get my first matching pair?

(Note: This is different from asking how many socks I must pull out of the drawer to guarantee that I have a matching pair. The answer to that question, by the pigeonhole principle, is 11 socks. This question is instead asking about the average.)

Extra credit: Instead of 10 pairs of socks, what if I have some large number N pairs of socks?

Submit your answer

Solution to last week’s Riddler Express

Congratulations to 👏 Carl Ollivier-Gooch 👏 of Vancouver, Canada, winner of last week’s Riddler Express.

Last week’s puzzle concerned a historic chess battle — the infamous 1984 World Chess Championship match between Anatoly Karpov and 21-year-old Garry Kasparov. The match was supposed to have been played until one of them had won six games. Instead, it lasted 48 games, of which Karpov won five and Kasparov won three, with the remaining 40 games ending in a draw. Alas, the match was controversially terminated without a winner.

If we assume Karpov’s chances of winning each game were 5/48, Kasparov’s chances were 3/48, and the chances of a draw were 40/48, what would have been Kasparov’s chances of eventually winning the match?

Many solvers broke the problem up into countless cases, depending on how many more games Karpov and Kasparov played until one of them had won six games — an approach that would indeed get you the right answer (eventually). But as Carl noted, the draws were actually “red herrings” that we needn’t worry about. They’d extend the match another game but had no effect on the overall winner. All that mattered were the games won by Karpov or Kasparov. Based on the given probabilities, Karpov was expected to win five games for every three won by Kasparov. In other words, in games with a winner, Karpov’s chances of winning were 5/8, and Kasparov’s chances were 3/8.

Now to figure out Kasparov’s chances of winning, we only wanted to know what happened in the next three games that had a winner. Those three games could have been the next three that were played, or they could have come after hundreds or even thousands of draws — it didn’t matter because the draws didn’t matter. At some point down the road, there would have to have been three games with a winner, since the probability that they’d continue to draw forever was zero.

Because Kasparov was down five games to three, and the winner was the first to have won six games, Kasparov needed to win all three of these games that had a winner. If he were to lose just one of them, Karpov would have reached six victories and won overall. We can find Kasparov’s chances of winning these three games by multiplying the independent probabilities: 3/8 × 3/8 × 3/8 = 27/512, or about 5.3 percent. Not the best odds for Kasparov.

Some readers interpreted the question as asking for Kasparov’s chances of victory if the match had started over, with each player having won zero games apiece and the same probabilities of winning and drawing. Solvers Luca Alessi and Nick Charchut both found that Kasparov’s chances of winning from a clean slate would have been about 19 percent. Better for Kasparov, but still not great.

Nevertheless, when Karpov and Kasparov resumed play in the 1985 World Chess Championship, Kasparov emerged victorious!

Solution to last week’s Riddler Classic

Congratulations to 👏 Jimmy Wilkinson 👏 of Bethesda, Maryland, winner of last week’s Riddler Classic.

Last week, you were asked to find as many rectangular prisms (also known as cuboids) as you could whose volume (in cubic units) was the same as their surface area (in square units). You were also given a head start: A cuboid that’s 6 × 6 × 6 is one such solution, with a volume of 216 cubic units and a surface area of 216 square units. But what other cuboids satisfied this requirement?

Many solvers turned to their computers for help. For example, Ken Chambers wrote some code that tested cuboids whose dimensions were anywhere from 1 to 1,000. From all those possible combinations, there were only 10 whose volumes matched their areas:

Cuboids with matching volume and surface area
Length Width Depth Volume (cubic units) Surface Area (square units)
3 7 42 882 882
3 8 24 576 576
3 9 18 486 486
3 10 15 450 450
3 12 12 432 432
4 5 20 400 400
4 6 12 288 288
4 8 8 256 256
5 5 10 250 250
6 6 6 216 216

Despite having tested some very large cuboids, each of these 10 that Ken found is pretty small in the grand scheme of things. The largest side length in this list is only 42 (of course). Surely there are other, larger solutions that our pitiful computers just weren’t powerful enough to find, right?

You might think so, but as solver Laurent Lessard showed, these were the only 10 solutions. We’re looking for whole number side lengths a, b, and c such that abc (the volume) equals 2ab + 2bc + 2ac (the surface area). That is, abc = 2ab + 2bc + 2ac. It’s safe to assume — “without loss of generality,” as mathematicians would say — that abc. In other words, whichever of the three dimensions is longest, we’ll call that one a (and we’ll call the shortest one c and the middle one b).

Since a and b are the longest two sides, ab is at least as large as bc and ac. That means 2ab + 2bc + 2ac is at most 2ab + 2ab + 2ab, or 6ab. Putting our original equation and this inequality together, we have abc ≤ 6ab. Finally, dividing both sides by ab shows us that c ≤ 6. In other words, the shortest side of our cuboid must have length 1, 2, 3, 4, 5 or 6 — but not longer than 6! At this point, Laurent explored each of these six possible values for c on a case-by-case basis, finding the possible whole number values for a and b. (He does this rather elegantly by rearranging the equations as factor pairs.) Sure enough, there were 10 solutions.2

Looking back at the 10 cuboids in the table above, solver Austin Shapiro further noticed that none of these cuboids will fit inside of another. I admit, neither of us quite understands the significance of this fact, but it is an interesting observation nonetheless.

Anyway, it turned out there were exactly two rectangles with matching area and perimeter: 3 × 6 and 4 × 4. And there were 10 rectangular prisms (i.e., three-dimensional rectangles) with matching volume and surface area. Some readers asked, “What about higher dimensions?” Sure enough, there’s a sequence for that! There are 108 four-dimensional cuboids with matching “surface area” and “volume” (of the four-dimensional variety, that is). There are also 2,892 five-dimensional cuboids with this property and 270,332 six-dimensional cuboids. However, no one knows precisely how many there are in seven or more dimensions.

Once again, we have come to the edge of human knowledge. Perhaps a clever and resolute member of Riddler Nation will be up to this seven-dimensional challenge …

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


  1. Important small print: Please wait until Monday to publicly share your answers. In order to 👏 win 👏, I need to receive your correct answer before 11:59 p.m. Eastern time on Monday. Have a great weekend!

  2. Since one of the 10 solutions (6 × 6 × 6) was given in the original problem statement, I also accepted responses that said there were nine other cuboids.

Zach Wissner-Gross leads development of math curriculum at Amplify Education and is FiveThirtyEight’s Riddler editor.