Coolest variation of this: If the prisoners have a spy (like a friendly warden) who is allowed to enter the room first and swap the contents of just two boxes, the prisoners' survival probability jumps from 31% to 100%.
By swapping two items, the spy can break any cycle longer than 50 into two smaller cycles. Since every prisoner is then guaranteed to be on a loop of length 50 or less, everyone is mathematically certain to find their number.
michaelashley29•1h ago
By swapping two items, the spy can break any cycle longer than 50 into two smaller cycles. Since every prisoner is then guaranteed to be on a loop of length 50 or less, everyone is mathematically certain to find their number.