A group of children are standing outside a room. Each wears a hat that’s either red or blue, and each child can see the other children’s hats but not her own. At a signal they enter the room one by one and arrange themselves in a line partitioned by hat color. How do they manage this without communicating?
|
SelectClick for Answer> |
The first child stands in the center of the room, and the second stands at her side. Thereafter each entering child follows a rule: If she sees that the line of children are all wearing hats of the same color, then she stands at one end of the line. If they’re wearing both red and blue hats, then she inserts herself at the break between the two colors.
(Thanks, Matan.)
|