Boxing Day

Death row is overcrowded, so the warden proposes a radical solution. He places 100 boxes in a sealed room. Each contains a slip of paper bearing the name of one of the 100 prisoners on the row.

Each prisoner will enter the room by one door, open 50 boxes, and exit by another door. Unless every prisoner can discover his own name, all 100 will be executed.

The prisoners will be supervised by a guard. They cannot communicate with one another, and they must leave the room as they found it (i.e., they can't leave boxes open or move them), but the group can prepare a plan in advance and post it on the wall of the room.

From Futility Closet (with solution).