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?

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

## 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 a â‰Ą b â‰Ą c. 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 riddlercolumn@gmail.com.

## Footnotes

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.