Posted to tcl by miguel at Fri Jun 20 15:59:32 GMT 2008view raw

  1. Gnomes agree that the first one will say "white" if he sees an even number of whites,
  2. "black" if he sees an odd number. He has 50% chance of survival.
  3.  
  4. The second knows that his hat is black if he sees the same parity as the first, white if the
  5. parity changed: survives with 100%. All others update the "current parity" to take this info
  6. into account.
  7.  
  8. So: every gnome but the first knows the parity of white hats
  9. (a) including his, by having updated the initial info with every answer
  10. (b) excluding his, by looking