4 ms·
My favorite version of this is the one that shows one prisoner to make a single swap of two drawers' contents in order to improve their chances. Surprisingly, t
by edanm 9y ago
My favorite version of this is the one that shows one prisoner to make a single swap of two drawers' contents in order to improve their chances. Surprisingly, this allows for a 100% success rate.
- joncrane 9y agoYeah this is the cool part. If you have a secret agent, he only has to make one change to guarantee success. (Success may already be guaranteed, but by the time the secret agent leaves the room, all prisoners are guaranteed to be safe).
- gowld 9y agoDoe the "hacker" get to see all the contents? Or only 50 (half?) If the hacker needs to break the longest permutation in half (consider the simple permutation x->(x+1), they could ... swap box 0 with box 50, so box 0 points to 51 (->52 .. -> 99 -> 0) and box 50 points to box 1. That makes 2 cycles of size 50, but requires inspecting 50+1 boxes
- pythonaut_16 9y agoThat's an interesting follow up question. What is the minimum number of boxes the hacker/spy/secret agent needs to see to guarantee success?
- deleted 9y ago[deleted]
- flyGuyOnTheSly 9y agoI didn't understand this example... because it seemed like blatant cheating... The prisoners are risking death... The rules are clear... only 50 boxes per prisoner... Why would somebody take the risk of opening 100 boxes? I suppose it's an interesting thought experiment...
- edanm 9y agoIt's a different riddle, not a different solution to the riddle. It's asked differently: given the same setup, except you have one extra person who's the leader, and he's allowed to go in and look at all the boxes, then make one change.