About two years ago, Veritasium posted The Riddle That Seems Impossible Even If You Know The Answer on Youtube. Today i was rewatching that video, because after seeing it initially i had some doubts, and it was a bit of an itch i finally decided to scratch.
The basic riddle goes something like this (watch the video for a much more coherent explanation AND the solution):
- You have 100 prisoners, each with a number.
- There is a room with 100 (numbered) boxes, and every prisoner number is in one random box.
- Prisoners enter the room one by one
- Each prisoner can open 50 boxes and search for their prisoner number.
- Each prisoner has to leave the room exactly as he found it.
- If ALL prisoners find their own number, everyone goes free.
- If even a single prisoner fails to finds his number, everyone stays in jail.
- Prisoners can decide on a tactic BEFORE the event, but can't communicate in any way DURIN the event.
If prisoners just do random sampling, their chances are 0.5**100 = 0.0000000000000000000000000000008.
Is there a better tactic? (Rest of the post in spoiler tags if you want to have a go on the problem yourself).
Frankly, even having programmed a full simulation of the solution myself, it still absolutely boggles my mind that this actually works at all. Maths is weird.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
|
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.