Ah, the genius of Lab readers. Lots of you correctly solved the Puzzle of the 3 Hats. (Schin provided an especially clear explanation.) And now we have a clever puzzle involving even more hats and higher stakes — death! It was submitted by Terence Gaffney, a mathematics professor at Northeastern University. He told me he’s found that puzzles are a great way to interest non-mathematicians in math, and he wishes more math courses involved this sort of problem-solving.

“Currently our teaching more closely resembles a karate school with its endless repetition of forms,” Dr. Gaffney said. “Some of that is certainly necessary, but if that’s all there is, it kills folks’ interest in the subject. I hope someday to be able to tell people I’m a math professor and have them volunteer their favorite problem, instead of telling me how much they hated the subject or how bad they were at it.”

Dr. Gaffney wins the contest prize, a copy of Marcel Danesi’s puzzle book, “The Total Brain Workout,” for suggesting a classic brain-twister he came across a few years ago and has been using in his classes. Here’s the Puzzle of 100 Hats:

One hundred persons will be lined up single file, facing north. Each person will be assigned either a red hat or a blue hat. No one can see the color of his or her own hat. However, each person is able to see the color of the hat worn by every person in front of him or her. That is, for example, the last person in line can see the color of the hat on 99 persons in front of him or her; and the first person, who is at the front of the line, cannot see the color of any hat. Beginning with the last person in line, and then moving to the 99th person, the 98th, etc., each will be asked to name the color of his or her own hat. If the color is correctly named, the person lives; if incorrectly named, the person is shot dead on the spot. Everyone in line is able to hear every response as well as hear the gunshot; also, everyone in line is able to remember all that needs to be remembered and is able to compute all that needs to be computed. Before being lined up, the 100 persons are allowed to discuss strategy, with an eye toward developing a plan that will allow as many of them as possible to name the correct color of his or her own hat (and thus survive). They know all of the preceding information in this problem. Once lined up, each person is allowed only to say “Red” or “Blue” when his or her turn arrives, beginning with the last person in line. Your assignment: Develop a plan that allows as many people as possible to live. (Do not waste time attempting to evade the stated bounds of the problem — there’s no trick to the answer.)

You’re already got enough information to solve the puzzle. But if you’d like an extra hint, you can find it here.

Feel free to post answers here, and to submit more puzzles, either in a comment here or in an email to tierneylab@nytimes.com. (Please indicate whether your puzzle submission is original or not, and please send a solution to tierneylab@nytimes.com.) Thanks for all the answers and puzzles that were submitted previously (including a 20-hat puzzle from Assapopoulos that was received later than Dr. Gaffney’s.) There’ll be another puzzle to solve here at the Lab next Monday.

UPDATE: Some readers have suggested clever ways for people to send signals by varying the speed or the volume of their “Red” or “Blue” responses. But while that might work, it might well prompt the executioner to start chopping off heads because he’d consider that tactic a violation of the spirit of the rules (or he might at least force people to start answering in a rigid format). Plus it’s a bit cumbersome. There’s a neater solution, and many readers came up with it. The first to do was Shihao Koh. Others have given fuller explanations.