It seems impossible, but it’s actually not.

Have you ever heard of the 100 Prisoners Riddle? First proposed by the Danish computer scientist Peter Bro Miltersen in 2003, it’s a mathematical problem in probability theory and combinatorics that seems completely impossible to solve. Here is how the riddle goes:

“Say there are 100 prisoners numbered 1 to 100. Slips of paper containing each of their numbers are randomly placed in 100 boxes in a sealed room. One at a time, each prisoner is allowed to enter the room and open any 50 of the 100 boxes, searching for their number. And afterwards, they must leave the room exactly as they found it, and they can’t communicate in any way with the other prisoners. If all 100 prisoners find their own number during their turn in the room, they will all be freed. But if even one of them fails to find their number, they will all be executed. The prisoners are allowed to strategize before any of them goes into the room. So what is their best strategy?”

In this video, popular science channel *Veritasium*‘s Derek Muller explains the riddle by putting the probability into perspective and dives deeper to make sure the viewers can understand it fully. If you’re curious to see the answer, make sure you watch the video embedded above, and as always, enjoy.