# Gnomes with hats - logic puzzle

Four smart gnomes are standing in line with all faces pointed in the
same direction. They all carry a hat, but they do not know their color. They only know that there are two red and two green hats. The first gnome stands behind a wall and does not see the others. The second gnome is able to see the hats of the third and the fourth.
The third only sees the hat of the fourth, and the fourth gnome does not see any hat at all.
The gnomes would like to know which hat they wear without checking their own. When a gnome has figured out which hat he carries, he will immediately tell the others. Suppose that the first gnome wears a red hat, the second a green one, the third a red one and the fourth a green one. Which gnome will be the first to figure out? |