It has been a pure delight to melt your brains every week, but today’s solution will be the last installment of the Gizmodo Monday Puzzle. Thank you to everyone who commented, emailed, or puzzled along in silence. Since I can’t leave you hanging with nothing to solve, check out some puzzles I made recently for the Morning Brew newsletter:

I also write a series on mathematical curiosities for Scientific American, where I take my favorite mind-blowing ideas and stories from math and present them for a non-math audience. If you enjoyed any of my preambles here, I promise you plenty of intrigue over there.

Keep in touch with me on X @JackPMurtagh as I continue to try to make the Internet scratch its head.

Florida Family Takes NASA to Court Over Home Damaged by Space Trash

Thanks for the fun,
Jack


Solution to Puzzle #48: Hat Trick

Did you survive last week’s dystopian nightmares? Shout-out to bbe for nailing the first puzzle and to Gary Abramson for providing an impressively concise solution to the second puzzle.

1. In the first puzzle, the group can guarantee that all but one person survives. The person in the back has no information about their hat color. So instead, they will use their only guess to communicate enough information so that the remaining nine people will be able to deduce their own hat color for certain.

The person in the back will count up the number of red hats they see. If it’s an odd number, they’ll shout “red,” and if it’s an even number, they’ll shout “blue.” Now, how can the next person in line deduce their own hat color? They see eight hats. Suppose they count an odd number of reds in front of them; they know that the person behind them saw an even number of reds (because that person shouted “blue”). That’s enough information to deduce that their hat must be red to make the total number of reds even. The next person also knows whether the person behind them saw an even or odd number of red hats and can make the same deductions for themselves.

2. For the second puzzle, we’ll present a strategy that guarantees the whole group survives unless all 10 hats happen to be red. The group only needs one person to guess correctly, and one wrong guess automatically kills them all, so once one person guesses a color (declines to pass), then every subsequent person will pass. The goal is for the blue hat closest to the front of the line to guess “blue” and for everybody else to pass. To accomplish this, everybody will pass unless they only see red hats in front of them (or if somebody behind them already guessed).

To see why this works, notice the person in the back of the line will pass unless they see nine red hats, in which case they’ll guess blue. If they say blue, then everybody else passes and the group wins unless all ten hats are red. If the person in back passes, then that means they saw some blue hat ahead of them. If the second-to-last person sees eight reds in front of them, they know they must be the blue hat and so guess blue. Otherwise, they pass. Everybody will pass until some person towards the front of the line only sees red hats in front of them (or no hats in the case of the front of the line). The first person in this situation guesses blue.

The probability that all 10 hats are red is 1/1,024, so the group wins with probability 1,023/1,024.