Quoto

Learn / Library / Brainteasers

Chain of honest answers

BrainteasersHard

A bag holds hats: red, white and blue. hats are dealt, one to each of prisoners standing in a line; any colour sequence that can be dealt from the bag is possible. Prisoner is at the back and sees the hats in front of him; prisoner is at the front and sees none. Everyone knows the bag's contents and reasons perfectly. In order from prisoner to prisoner , each says aloud "I know my colour" or "I do not know", meaning that he can or cannot deduce his own hat colour with certainty from what he sees, the bag's contents and all earlier answers. The colours themselves are never said. For how many possible colour sequences are the answers, in order: do not know, know, do not know, know, do not know?

Checking an answer needs JavaScript. The hint and the solution open without it.

A whole number, a decimal, a fraction like 3/8 or a percent.

Hint

Keep the list of colour sequences still possible after each answer, and test each prisoner against that shrinking list.

Solution
  1. The colour sequences that can be dealt number . Prisoner knows his colour only in of them, so the answer "do not know" leaves sequences.
  2. Among those , prisoner knows his colour in , so the answer "know" leaves sequences.
  3. Among those , prisoner does not know in of them, so the answer "do not know" leaves sequences.
  4. In all remaining sequences prisoner knows and prisoner does not, so the count is .

Answer: