Skip to content

#59 Hats of Two Colors #28

@ZeroToNaruto

Description

@ZeroToNaruto

There are 12 very smart prisoners in a jail. To get rid of them, the warden
comes up with the following test. He will put a hat, either black or white,
on the head of each of these prisoners. There will be at least one hat of each
color, and the prisoners will be informed about this fact. They will be able
to see everyone else’s hat but their own; there will be no communications
of any kind among the prisoners. The warden will line up the prisoners
every 5 minutes starting at 12:05 pm and ending at 12:55 pm. To pass the
test, all the prisoners with a black hat and only those prisoners will have to
step forward during the same line up. If they do, all the prisoners will be
freed, otherwise they will be executed. How can the prisoners pass the test?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions