# Seven Jack O' Lanterns

by Kevin J. Lin

It looks like you'll have no trouble getting those lanterns out in time.

If you examine the setup carefully, you'll note a number of facts which make the puzzle easier to solve by deduction. First, blowing on a lantern is a commutative property; blowing on lanterns 1, 5, then 3 is the same as blowing on 3, then 1, then 5. No matter what order the lanterns are blown on, if the same lanterns are blown on the same number of times, the final result won't change.

For that reason, blowing on a lantern twice is as good as not blowing on it at all in the end result. And thrice is as good as once. So if the puzzle has a solution, it can be done in seven steps or fewer.

What else can we tell about the solution? Since each operation changes the state of three lanterns, and there are seven lanterns, and each lantern must change its state an odd number of times, its a safe bet there will be an odd number of operations. We can also easily say it cannot be done in three or fewer steps.

So can it be done in five or seven steps? Five steps seems plausible at first. But five can be excluded by a surprisingly quick process of elimination. There are only three different patterns for five which are not symmetrical to other patterns: blowing on five adjacent lanterns, blowing on four adjacent lanterns and one "loner", and blowing on three adjacent lanterns and two a pair of non-adjacent lanterns. None of these three options are a solution, so it cannot be done in five steps.

So that leaves seven, and because of the commutative property, the simplest solution is to blow on all seven in order!

So the Great Pumpkin has really given you a treat, not a trick, and the next morning all seven lanterns are full of candy.

Verily.

*Addendum: Brett Campbell has kindly submitted a small (11k zipped) Visual Basic demo of the Seven Jack O' Lanterns puzzle. You're welcome to try it out. The demo requires Windows 95/NT and an unzipping program. *

Standard Disclaimer: We have tested the program and seen the source code, but cannot make any guarantees about the quality of the software. The Grey Labyrinth assumes no liability if you execute the program and your harddrive bursts into flames, your monitor explodes, warts appear on your skin, or you are visited by seven dark riders throwing eggs and shaving cream.