Solution to April's Puzzle: Naming an Heir
A mighty king had three sons and wanted to declare the
wisest of them as his heir. He decided to give them a logic
puzzle to test their wisdom. He placed the sons in a triangular room, each in a different corner, and placed a hat on
each son's head. The king said, "You need to determine the
color of your hat. You can't take your hat off to look at it,
and you can't communicate in any way. The hat on your
head is either green or red. At least one of you is wearing a
green hat. I'll be waiting outside the door and will ring a bell
every five minutes. You can't leave the room until you know
the color of your hat. If you know the answer, you must
wait for the next bell ring, then come tell me the answer."
At the third bell ring, one of the sons opened the door and
told the king the answer. The king said, "You're correct, and
I'm naming you my heir. However, I'm disappointed in you.
You have still much to learn." What was that son's answer,
and why was the king disappointed?
That son's answer was green, based on the following
logical deduction:
- If there were two red hats and one green hat, the son
with the green hat would have realized it immediately
(by seeing both his brothers wearing red hats) and
approached the king at the first bell ring. Because this
didn't happen, there's—at most—one red hat among
the sons.
- If there was one red hat and two green hats, each of
the two sons wearing green hats should have seen his
brothers wearing one red and one green hat; therefore, both these brothers could have deduced that they
were wearing green hats (since no one approached
the king after the first bell ring, and there's at most
one red hat in such a case) and thus approached the
king at the second bell ring.
- The son that ultimately figured out the answer reasoned that his brothers weren't stupid, so if no one
approached the king at the second bell ring, they must all be wearing green hats. Of course, this tells
you that he saw both his brothers wearing green hats.
So, he approached the king at the third bell ring to
say that he was wearing a green hat.
Why was the king disappointed in his son? The answer
involves true wisdom. The son should have reasoned that
any setting in which (at minimum) one of the hats is green
and not all of them are green is an unfair contest. If at least
one hat is green, and not all hats are green, different sons can
figure out their own hat color at different points in time.
For example, if two of the hats are red, the son that
wears a green hat can figure out the answer immediately
and approach the king at the first bell ring, while the other
two must wait to see whether someone approaches the
king at the first bell ring (in which case it will be too late
for them). Similarly, if one of the hats is red, the two sons
wearing green hats can know the answer after the first bell
ring and approach the king at the second bell ring, while
the son with the red hat must wait to see whether someone
approaches the king at the second bell ring (in which case
it's too late for him).
If the king had favored one of the sons, he would have
named that son his heir without a contest. Because he
wanted to put their wisdom to test, you would expect the
contest to be fair. The only way for the contest to be fair
while having a minimum of one green hat is to have three
green hats. The king expected one of his sons to approach
him at the first bell ring with this logic.
May's Puzzle: The Next element in a Series
I got this nice puzzle from Adi Dafni. Given the following
series of elements, can you determine the next element?
1, 11, 21, 1211, 111221, 312211, ?