Line of Hats

Obviously, since nobody can see the back person’s hat, its colour cannot be determined.  The nine members who answer correctly must therefore be all except the one at the back.

The back person says “green” if he can see an odd number of green hats in front of him, otherwise he says “purple”.  The second person can then use this information to determine the colour of her hat.  (For example, if the back person answered “green”, then there is an odd number of green hats among the front nine.  If the second person sees an even number of green hats, she deduces that her own hat is green.)  Subsequent members therefore know how many green hats are behind them (other than the back person) as well as in front, and can deduce their colours by the same logic.  (Put simply, it’s green if the number of green hats in front plus the number of times “green” has been said already is an odd number; otherwise it is purple.)

Another possible strategy is to use a code, such as the tone of voice or the length of pause before answering, for each person to indicate the hat colour of the one in front.