Is Your Friend Full Of It?

Welcome to The Riddler. Every week, I offer up problems related to the things we hold dear around here: math, logic and probability. There are two types: Riddler Express for those of you who want something bite-size and 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 if you have a favorite puzzle collecting dust in your attic, find me on Twitter.

## Riddler Express

From Shaun Raviv, a tall tale on the basketball court:

You’re hanging out with some friends, shooting the breeze and talking sports. One of them brags to the group that he once made 17 free throws in a row after years of not having touched a basketball. You think the claim sounds unlikely, but plausible. Another friend scoffs, thinking it completely impossible. Let’s give your bragging friend the benefit of the doubt and say he’s a 70-percent free-throw shooter.

So, who’s right? What is the number of free throws that a 70-percent shooter would be expected to take before having a streak of 17 makes in a row? And what if his accuracy was a bit worse?

## Riddler Classic

From Jared Bronski: Come on down, you’re the next contestant on Guess Your Hat!

You and six friends are on a hit game show that works as follows: Each of you is randomly given a hat to wear that is either black or white. Each of you can see the colors of the hats that your friends are wearing but cannot see your own hat. Each of you has a decision to make. You can either attempt to guess your own hat color or pass. If at least one of you guesses correctly and none of you guess incorrectly then you win a fabulous, all-expenses-paid trip to see the next eclipse. If anyone guesses incorrectly or everyone passes, you all lose. No communication is possible during the game — you make your guesses or passes in separate soundproof rooms — but you are allowed to confer beforehand to develop a strategy.

Extra credit: What if instead of seven of you there are $$2^N-1$$?

## Solution to last week’s Riddler Express

Congratulations to 👏 Daniel Hadley 👏 of Salt Lake City, winner of last week’s Express puzzle!

You take half of a vitamin every morning. The vitamins are sold in a bottle of 100 (whole) tablets, so at first you have to cut the tablets in half. Every day you randomly pull one thing from the bottle — if it’s a whole tablet, you cut it in half and put the leftover half back in the bottle. If it’s a half-tablet, you take the vitamin. You just bought a fresh bottle. How many days, on average, will it be before you pull a half-tablet out of the bottle?

Including the day you get the half-tablet, it will take about 13.2 days on average.

Let’s get our bearings, and start day by day. On the first day, there are 100 whole tablets and zero half-tablets, giving you no chance of pulling your first half-tablet. On the second day, there are 99 wholes and 1 half, giving you a 1/100 chance of pulling out your half-tablet. On the third day there are two halves and 98 wholes, giving you a (99/100)*(2/100) chance of pulling a half. (The 99/100 is the probability you didn’t pull your first half the day before.) On the fourth day there are three halves and 97 wholes, giving you a (99/100)*(98/100)*(3/100) chance of pulling a half. On the fifth day it’s (99/100)*(98/100)*(97/100)*(4/100). And so on.

The pattern becomes clear, but now the trick is writing that all down mathematically into a single expression we can evaluate. (Alternatively, you could turn to Excel or a programming language.) What we need is an expression that, for each day, multiplies the number of the day by the probability that we draw our first half-tablet that day. After a bit of finagling to get all the terms in the right place, one option is the following:

\begin{equation*}\sum_{n=2}^{100} \frac{99!}{(99-(n-2))!}\cdot \frac{n(n-1)}{100^{n-1}} \approx 13.2\end{equation*}

It looks a little messy, but if we start plugging in increasing values for n, we can begin to see how it works, and how it matches up with our description of the days above. For n=2 (the first day we have any chance of drawing a half) the expression equals 2*(1/100), which is the second day times the 1/100 probability discussed above. For n=3 the expression equals 3*(99/100)*(2/100), which is the third day times the (99/100)*(2/100) probability discussed above. And so on. We’ve got an expression for the answer!

Simplifying that expression is probably best done with a calculator, unless your vitamins are far more effective than mine.

## Solution to last week’s Riddler Classic

Congratulations to 👏 John S. Adair 👏 of Austin, Texas, winner of last week’s Classic puzzle!

In the Riddler gift shop, we sell interesting geometric shapes of all sizes at very fair prices. We want to create a new gift for fall, and we have a lot of spheres, of radius 1, left over from last year’s fidget sphere craze, and we’d like to sell them in sets of four. We also have a lot of extra tetrahedral packaging from last month’s Pyramid Fest. What’s the smallest tetrahedron into which we can pack four spheres?

The smallest such tetrahedron has sides of length $$2\sqrt{6}+2$$ or about 6.9 times the radius of one of the four spheres inside. This tetrahedron has a volume of about 38.7, whereas our four spheres have a combined volume of about 16.8. Our “packing density” is only about 43.3 percent. Let this be a lesson to the Riddler gift shop proprietor: Don’t pack spheres in tetrahedra!

But I digress. How do we get to that solution? Solver Hector Pefo provided a lovely, tidy solution that I’ll adapt here. It begins with his illustration, showing one of the four spheres in place:

Draw a line from one corner of the tetrahedron (point A) to the point on a face where the closest sphere touches (point P). Draw another line down from point P to a new point (point Q) such that the segment PQ is perpendicular to the segment AB. The length of the tetrahedron edge (the length of AB, and also our answer) is therefore two of our spheres’ radii (which is 2) plus two of the lengths of AQ.

So what’s the length of AQ? First notice that APQ is a 30-60-90 right triangle. Therefore, we know that AQ is $$\sqrt{3}$$ times the length of PQ. The angle PQS, where S is the center of the pictured sphere, is half of the dihedral angle of a tetrahedron (that’s the angle between its faces, which cropped up in a Riddler column a few weeks ago). That angle is the arccosine of 1/3, and its sine is $$1/\sqrt{3}$$ and its tangent is $$1/\sqrt{2}$$. Therefore, the length of PQ is $$\sqrt{2}$$ and the length of AQ is $$\sqrt{6}$$. So on side of our tetrahedron, AB, is $$2\sqrt{6}+2$$.

Solver Laurent Lessard, who took a different approach to the problem, created this illustration of the final product:

It may not be efficient, but it sure is cool looking. Get ’em while they’re hot!

## Want to submit a riddle?

Email me at oliver.roeder@fivethirtyeight.com.

## Footnotes

1. Important small print: For you to be eligible, I need to receive your correct answer before 11:59 p.m. EDT on Sunday. Have a great weekend!

Oliver Roeder was a senior writer for FiveThirtyEight.