Escuro

The Riddle That Seems Impossible Even If You Know The Answer

Veritasium
Inscrever-se
Visualizações 6 925 506
100% 270 000 0

The 100 Prisoners Riddle feels completely impossible even once you know the answer. This video is sponsored by Brilliant. The first 200 people to sign up via brilliant.org/veritasium get 20% off a yearly subscription.

Special thanks to Destin of Smarter Every Day ( ve42.co/SED ) , Toby of Tibees ( ve42.co/Tibees ) , and Jabril of Jabrils ( ve42.co/Jabrils ) for taking the time to think about this mind bending riddle.

Huge thanks to Luke West for building plots and for his help with the math.
Huge thanks to Dr. Eugene Curtin and Dr. Max Warshauer for their great article on the problem and taking the time to help us understand it: ve42.co/CurtinWarshauer
Thanks to Dr. John Baez for his help with finding alternate ways to do the calculations.
Thanks to Simon Pampena for his input and analysis.

Other 100 Prisoners Riddle videos:
minutephysics: www.youtube.com/watch?v=C5-I0...
Vsauce2: www.youtube.com/watch?v=kOnEE...
Stand-up Maths: www.youtube.com/watch?v=a1DUU...
TED-Ed: www.youtube.com/watch?v=vIdSt...

▀▀▀
References:
Original paper: Gál, A., & Miltersen, P.B. (2003). The Cell Probe Complexity of Succinct Data Structures. BRICS, Department of Computer Science, University of Aarhus. All rights reserved. - ve42.co/GalMiltersen
Winkler, P. (2006). Seven Puzzles You Think You Must Not Have Heard Correctly. - ve42.co/Winkler2006
The 100 Prisoners Problem - ve42.co/100PWiki
Golomb, S. & Gaal, P. (1998). On the Number of Permutations on n Objects with Greatest Cycle Length k. Advances in Applied Mathematics, 20(1), 98-107. - ve42.co/Golomb1998
Lamb, E. (2012). Puzzling Prisoners Presented to Promote North America's Only Museum of Math. Observations, Scientific American. - ve42.co/Lamb2012
Permutations - ve42.co/PermutationsWiki
Probability that a random permutation of n elements has a cycle of length k greater than n/2, Math SE. - ve42.co/BaezProbSE
Counting Cycle Structures in Sn, Math SE. - ve42.co/CountCyclesSE
What is the distribution of cycle lengths in derangements? In particular, expected longest cycle, Math SE. - ve42.co/JorikiSE
The Manim Community Developers. (2021). Manim - Mathematical Animation Framework (Version v0.13.1). - www.manim.community/

▀▀▀
Special thanks to Patreon supporters: RayJ Johnson, Brian Busbee, Jerome Barakos M.D., Amadeo Bee, Julian Lee, Inconcision, TTST, Balkrishna Heroor, Chris LaClair, Avi Yashchin, John H. Austin, Jr., OnlineBookClub.org, Matthew Gonzalez, Eric Sexton, john kiehl, Diffbot, Gnare, Dave Kircher, Burt Humburg, Blake Byers, Dumky, Evgeny Skvortsov, Meekay, Bill Linder, Paul Peijzel, Josh Hibschman, Timothy O’Brien, Mac Malkawi, Michael Schneider, jim buckmaster, Juan Benet, Ruslan Khroma, Robert Blum, Richard Sundvall, Lee Redden, Vincent, Stephen Wilcox, Marinus Kuivenhoven, Michael Krugman, Cy 'kkm' K'Nelson, Sam Lutfi, Ron Neal

▀▀▀
Written by Derek Muller and Emily Zhang
Filmed by Derek Muller and Petr Lebedev
Animation by Ivy Tello and Jesús Rascón
Edited by Trenton Oliver
Additional video/photos supplied by Getty Images
Music from Epidemic Sound and Jonny Hyman
Produced by Derek Muller, Petr Lebedev, and Emily Zhang

Publicado em

 

29 Jun 2022

Compartilhar:

Compartilhar:

Baixar vídeos:

Carregando o link.....

Adicionar a:

Minha playlist
Assista mais tarde
Comentários 28 405
pyguy
pyguy Mês atrás
Something seems wrong at 9:00 What is the probability of a loop of length 1? (Can't be 1/1) Length 2?
Pierre Chardaire
Pierre Chardaire 9 horas atrás
To find the probability that a loop of length p for a fixed p with p > n/2 you proceed like this: Select p values out of n, n chose p = n!(p!(n-p)!) ways to do so, then create a cycle of length p, (p-1)! ways to do so, then arrange the n-p values remaining, (n-p)! ways. So in total: n!/(p!(n-p)!)(p-1)!(p-p)! (call this A) to create a configuration with a cycle of length p. Divide A by n! to find probability to get 1/p. This work because we did not overcount configurations in calculating A If p is less than n/2, formula A would count several times any configuration that has more than one cycle of length p, of which there would be more and more as p decreases. So to get the actual probability of a cycle of length p (where p Note also that 1/(n+1)+1/(n+2)+....+1/(2n) converges to ln(2) = 0.69314718056. So whatever the value of n there is a probability of at least 30.6% that the convicts will be freed.
tejesh dahat
tejesh dahat 6 dias atrás
@John Smith you will always find your own number if you start with your number box since there are no duplicate number boxes and no duplicate numbers
tejesh dahat
tejesh dahat 6 dias atrás
@Arturas Liutkus since there are no duplicate numbers 1 number can only point to 1 box so if you start with your number box you will always be on the right loop
HassanAbshir
HassanAbshir 10 dias atrás
9:00 is sus
Kelon Waters
Kelon Waters 11 dias atrás
I think you’re confusing probability with possibly
Dr. DJ X
Dr. DJ X Mês atrás
As somebody that's tried tracking down a CD left in the wrong CD case, I can attest that the loop strategy does indeed work 31% of the time. (The other 69% of the time it turns up weeks later on the kitchen table.)
Tyler Grant
Tyler Grant 5 dias atrás
@Mcroostr I have no idea what comment you’re replying to, but there’s no way I said that lol re-read whatever you thought I said
Mariana
Mariana 5 dias atrás
@alveolate hermeneutist also works for game cartridges and boxes.
Mcroostr
Mcroostr 7 dias atrás
@Tyler Grant so all humans can only use what their generation uses for music? I’m too old for Spotify?
Parth S
Parth S 7 dias atrás
Lol😂😂
drsquirrel00
drsquirrel00 7 dias atrás
You assume its left in a case.
Charlie Horse
Charlie Horse 11 dias atrás
If you think the riddle is hard, imagine trying to convince 99 fellow prisoners to follow the plan to the letter.
David James
David James Dia atrás
No letters, just numbers, ha ha.
senni bgon
senni bgon 4 dias atrás
each box points to the next
herlocksholmes1888
herlocksholmes1888 2 dias atrás
My Chemistry teacher was OBSESSED with this channel in his high school years (he's pretty young, yeah), and I just had to check it out for myself. I've always had a bad relationship with Math because most of my teachers were douchebags, but these videos are helping me see it through a new perspective. It's still frustrating and confusing at times, but it's oddly cool nowadays. It gets less tiresome to calculate stuff now. Thanks awfully, dude! 😄
grys
grys 12 dias atrás
I paused at 3:44 to try this method out using Python code. I ran the code 100 times, of which 32 runs were successful (every prisoner was able to complete the task under the given conditions). In other words, it achieved a probability of 0.32. Very close!
David James
David James 41 minuto atrás
@Servo I can by the end of the week after I look it over more and see if I can get it to run any quicker.
Servo
Servo Hora atrás
@David James Can you paste your code here? I wrote mine in python and its pretty slow. I'd like to see it written properly, in a low level language.
David James
David James Dia atrás
@Shimanshu Yadav Does it work? How long does it take to run?
Shimanshu Yadav
Shimanshu Yadav Dia atrás
@zwitter689 here is my js code for this problem. // prision problem from the array lets see whats the outcome function shuffled_array(length) { let box = []; for (let i = 1; i
David James
David James Dia atrás
@justsomeatom It didn't actually say "done compiling", but the "Compiling" message just disappears. I added timing code (profling code) to my simulation code, and it appears to take about 1.5 seconds per 1 million group escape simulations.
Kinglink Reviews
Kinglink Reviews 13 dias atrás
I've seen this riddle so many times, but this is one of the most efficient way to explain "Why" rather than just an optimal solution. This is why I love this channel
yuitr loing
yuitr loing 10 dias atrás
strategy is a way to synchronize the wins and fails
Bismuth
Bismuth Mês atrás
6:35 I like that Derek's "random" numbers were all odd numbers. We have a bias towards perceiving odd numbers as more random than even numbers. Even more so, of the 9 digits in these numbers, only a single one was even.
strawberrteas
strawberrteas 9 dias atrás
this is a random thing but i notice usually when asked for a random number, if they do use an even number people usually say something in its sixties
Crispy Barns
Crispy Barns 12 dias atrás
My guy didn’t even say the boxes were labeled in the text screen.
Saquib Akhtar
Saquib Akhtar 17 dias atrás
Wow..! mind blown again.
Szymon L
Szymon L Mês atrás
@Chance yeah thats what I also thought about
Szymon L
Szymon L Mês atrás
@Jynx 2.8% for total randomness, but for people its not like this. Derek could not even see that, but his mind for some reason picked them all odd. Also I think thats just because odd numbers seem more random to our brains.
Do Things That Matter
Do Things That Matter 12 dias atrás
This is why I have such a deep appreciation for those who are great at math. I have no idea how this was figured out and I don't need to because we have people like this! Thank God!
Ngô Trần Hoành Sơn
can someone explain to me at 8:35 I dont understand that much, the unique loops of 100, and total permutations relate to the possibility of getting 100 numbered loops
annag cocl
annag cocl 11 dias atrás
randomly, what is the expected time until one population makes it through? Is there a meta-scheme of renumbering which raises your probability of success even more?
Marco Sarli
Marco Sarli 52 minutos atrás
My dad actually asked me this question about a month ago when I was with a couple of friends that particularly like riddles. I somehow got the answer right after a lot of guessing and yet I still only kind of understand it. Funny how complicated simple things can get if you dive deep enough!
Steven Hansen
Steven Hansen 5 dias atrás
Okay I was really confused about the part that says your number is guaranteed to be in the loop but now I get it. If your number is say, 43, then the loop will be open until you open the box that takes you back to 43, the first you opened. There's no such thing as closing the loop, without opening the box that leads you to the first box you opened. Hope that makes sense.
Jiehong Stanley
Jiehong Stanley 14 horas atrás
"your number is guaranteed to be in the loop" by definition. A loop is formed only when the number slip pointing to the starting position/box is found.
Callie Myers Buchanan
Where people are getting confused is in language. You ARE guaranteed to be in your number's loop. You are NOT guaranteed to find your number in the loop within 50 searches,. That's where the probability factor comes in is in the limited times you are aloud to search. The more boxes you are aloud to search, the longer the completable loops can be. If your number is in a loop 67 boxes long and you can only search 66 boxes you won't find it in time but if you were aloud to search 67 boxes you'd find it! The only way to win is if NO loops are longer than the number of aloud searches. Which is apparently 31% of random permutations of number placements.
Jeremy Berven
Jeremy Berven 2 dias atrás
An easier way to get the point across is that you can't short circuit the loop by closing it early because the same number can't be in 2 boxes... 1, 7, 55, 18, 7 is not allowed because then 7 would be in 2 boxes...
Kees den Heijer
Kees den Heijer 3 dias atrás
Yes it does make sense, sometimes you have to open all of the available boxes to come back at your starting point, but the loop always closes. Also: A loop cannot end in the wilderness nor can it short circuit itself somewhere halfway.
Evan Guthrie
Evan Guthrie 12 dias atrás
I think the tricky part of finding the answer to this is realizing that even with this strategy it is more than likely they will not win. It's hard to consider different strategies because any one you think of will not be a "good" strategy and will not stand out to you.
fallen neberu
fallen neberu 7 dias atrás
a fair puzzle would be to allow prisoners to open as many as such that the probability converges to 50%. The answer is 60.65. So, prisoners should be allowed to open 60 boxes.
Nadarith
Nadarith 10 dias atrás
@Zara Bisho Explain how they're nonsense
Zara Bisho
Zara Bisho 10 dias atrás
all these strategies are complete nonsense, everything shows time
Yeeetttttttttt
Yeeetttttttttt 11 dias atrás
That’s why I would just cheat 🤷‍♂️ And if that fails then RIP me
WetBadger
WetBadger Mês atrás
When you factor in the odds of one nerd convincing 99 other convicts to go with this strategy, your chances quickly fall back to zero.
Jan Taljaard
Jan Taljaard Dia atrás
Lol
Chain Jail
Chain Jail Dia atrás
Not really.
Ihkeset eeietos
Ihkeset eeietos 2 dias atrás
True. I keep thinking if I was a prisoner there's no way I can convince them all. Average humans are too stupid.
David Nelson
David Nelson 3 dias atrás
ROFL
Matt Stokes
Matt Stokes 7 dias atrás
Even if you could convince them, someone will mess up somewhere or forget what to do.
StealthGuide
StealthGuide 5 dias atrás
I love problems like this and so I built a model in Excel with VBA to generate a random order of slips in boxes and then measured each prisoners attempts to uncover their slip by starting with their own numbered box. What I then did is kept track of all the times the prisoners survived and how many times they all died. I have run the model 31,000 times so far and it totally supports the method in this video. No. of times Prisoners freed = 9,652 No. of times Prisoners died = 21,348 Which is 31.1354839% What I also did was to keep a count of the number of loops in each of the successful runs to see what the results would be: 1 Loop 5 times 0.1% 2 Loops 22 times 0.2% 3 Loops 337 times 3.5% 4 Loops 1,582 times 16.4% 5 Loops 2,802 times 29.0% 6 Loops 2,782 times 28.8% 7 Loops 1,483 times 15.4% 8 Loops 525 times 5.4% 9 Loops 102 times 1.1% 10 Loops 11 times 0.1% 11 Loops 1 time So the overwhelming number of Loops for a successful run is either 5 or 6. Next I totalled up the number of boxes in each of those successful Loops just out of curiosity and here’s what I found: 100 occurred 4,753 times 49.9% 99 occurred 1,231 times 12.9% 98 occurred 867 times 9.1% 97 occurred 444 times 4.7% 96 occurred 401 times 4.2% 95 occurred 234 times 2.5% 94 occurred 207 times 2.2% 93 occurred 127 times 1.3% 92 occurred 123 times 1.3% 91 occurred 108 times 1.1% 90 occurred 91 times 1.0% And so on down to 49, 48, 44 and 41 times which all occurred once only. There where no occurrences where to total sum of the loops equalled 47, 46, 45, 43, 42 or less than 41.
Cosima Riemer
Cosima Riemer 18 horas atrás
@Milosz Forman The percentages are for the successful loops. 4753 are about half of the total number of successful loops, so 49.9%. But I cannot figure out what he is counting in the first place... It can't be the loop-length, because for a successful run, a loop of over 50 can never occur, and the numbers wouldn't add up anyway. It can't be the total number of loops either, because 100 loops (each slip is just in the box with the same number) is incredibly unlikely, but it is the highest stat here. What else is there to count? Each box gets opened on a successful run. Each number is present in every run. It can't be the number of loops or the length of the loops, which are the only variables I can think of that can change with each run. Does anyone else have the answer?
Milosz Forman
Milosz Forman 5 dias atrás
_"Next I totalled up the number of boxes in each of those successful Loops just out of curiosity and here’s what I found:"_ _"100 occurred 4,753 times 49.9%"_ _"99 occurred 1,231 times 12.9%"_ I don't understand what you are "totalling up" there. 49.9%? Percent of what?
Tyler Peacock
Tyler Peacock 4 dias atrás
To me, the neatest thing about this is that by definition, getting on the loop with your own number will ensure that unless you are on a loop of 100 numbers, there are going to be boxes that you never have to open because they aren’t on your loop. It doesn’t tell you by how much your odds increase, but you necessarily make you own pool of options smaller unless all are on one loop.
Robin
Robin 3 dias atrás
I think there's a mistake when he explains the malicious warden counter strategy. It's true you can make new loops by adding +5 to all the boxes, but then you're no longer guaranteed to be on a loop containing your own number, right?
Entropie -
Entropie - 3 dias atrás
No, you just have to make sure that you start with the box that has your number with respect to the new numbering scheme.
Ben Wright
Ben Wright 8 dias atrás
As soon as I was presented with this puzzle, my first thought was to find a way to make the individual prisoners' chances of success correlate with each other (didn't actually find the trick by myself, though). Once you break independence between the guesses, you start making gains in overall success. It'd be interesting to see how the limit changes as you alter the proportion of the boxes each prisoner is allowed to open.
Entropie -
Entropie - 6 dias atrás
@Bradbury If we solve the equation 0.5 = 1 - log(1/x) for x we get x = 1/sqrt(e) which would be about x = 60.65%, so it checks out.
Bradbury
Bradbury 6 dias atrás
This was something I was curious about myself. I can't do the math, but I ran some simulations. After 40k iterations, I found that the longest loop was
Arizona Anime-Fan
Arizona Anime-Fan 7 dias atrás
yep, the solution is similar to the "lets make a deal" door solution. you're playing non-intuitive games with chance, to maximize your chance of winning.
Entropie -
Entropie - 8 dias atrás
If the proportion is some x between 0.5 and 1 the logic still works basically the same and you should get 1 - log(1/x) success probability in the limit. If the proportion is some x < 0.5 it seems to get more complicated. I don't know whether there is a nice expression for it in that case.
Greg Squires
Greg Squires Mês atrás
I think the chance of convincing 99 other prisoners that this strategy is their best chance of survival is much lower than 31%.
Luis Ferreira
Luis Ferreira 3 dias atrás
At least it cannot be worse.
L3ik 0
L3ik 0 5 dias atrás
@SmellMyKKPP The chance of the other 99 would still be the same 31%, but since all have to succeed to win you have to multiply it with the 1/2 chance of the rogue prisoner. So with one going rogue, it's around 15.5%, with two it's 7.75% and so on.
ciaopizzabella
ciaopizzabella 8 dias atrás
I find it discriminatory towards prisoners that they always get used for these kind of math problems. They have rights too.
Ilse Caraffi - ten Cate
@Urukosh ! unfortunately though, the alternative to escaping was being executed..
tibor29
tibor29 12 dias atrás
@tsv I think he meant that 50% is the overall chance of the strategy being successful and the whole group being released from prison. The outcome of the strategy depends completely on the first person finding their number which is a 50/50 chance. Of course, if the first person finds their number then all the other inmates are 100% guaranteed to find their numbers, but the overall chance of success with this strategy is still just 50% because if the 1st person doesn't find their number (50% chance), the whole group is doomed.
Niinja Slayer
Niinja Slayer Dia atrás
I love this video, it eliminates the “chance” grouping it in a loop, you’re predetermined to fail or succeed.
Simon Gault
Simon Gault 11 dias atrás
For anyone confused thinking the loop could fizzle by going back on itself somewhere other than the starting number (I was)... remember that no box mid loop will reveal another box already opened, other than the starting number, because that box was previously revealed and so cannot be in a future box. 10 to 11 to 12, 12 cannot have 11 because 10 already did.
Simon Gault
Simon Gault 8 dias atrás
@Leo Jacksom That would be a 1 box loop. Which is an option. If you mean what if you got to box n and it had n inside, it would not since the box leading you to box n had n inside it.
Leo Jacksom
Leo Jacksom 8 dias atrás
But what if box n has slip n in it
Mortzow
Mortzow 8 dias atrás
Thank you! That was exactly my question
Le sommet
Le sommet 10 dias atrás
@FenixxTheGhost i am stupid 😅
FenixxTheGhost
FenixxTheGhost 10 dias atrás
​@Le sommet I may assume that after 32-10 you wanted to type 10-88, in this case: You can't have two 88's. 88 cannot point to 88 since 88 is already defined in 10. If you meant to type 10 back 1 - then you have two independent loops, that consists of 5(1,5,7,32,10) and 1(88) iterations.
DIY techie
DIY techie Dia atrás
Loved this. Brain candy. And brilliantly explained.
iamkeiju
iamkeiju 3 dias atrás
to come up with this solution you'd really have to think outside the box. on behalf of all the other prisoners' lives - be sure not to slip up edit: all jokes aside, this is a really fascinating problem. i actually found it extremely logical. it really made sense - admittedly it's very surprising how big that probability is at first.
N Z
N Z Mês atrás
This is actually, in my opinion, the least controversial thing he has posted in a while. Good work. This makes alot of sense to me, I would never have thought of it but it works
hülye ló
hülye ló 24 dias atrás
@ILYES The Monty Hall problem is just maths and is pretty controversial too. I remember everyone going crazy in the comments after that Numberphile video
Froglet
Froglet 27 dias atrás
@ILYES spoken like someone who knows nothing about math
Gianluca G.
Gianluca G. Mês atrás
Correct! The beauty of math is that there cannot be controversial things. Math and logic are the final judges, deciding which is right and which is wrong. If you read carefully the comments, no one is questioning the strategy, they simply complain they cannot understand it.
ophello
ophello Mês atrás
@magica that’s a pessimistic view.
ophello
ophello Mês atrás
A lot. Two separate words.
a2pha
a2pha 6 horas atrás
1:27 OK Already I'm seeing a problem. If they pick a random box that has ALSO a random number that must match their own, isn't that percentage chance of them finding their number less than 50% at that point ?
David James
David James Dia atrás
One thing really interesting about this problem to me is that there are 100! = about 10^158 unique arrangements of the 100 slips in the 100 boxes. No single computer can check all of those in any reasonable amount of time, however we don't have to. The beauty of Monte Carlo simulation is for something with fairly high probability like this (over 30% in this case but even something small like 0.03% would work too), we only need to take a tiny random sample to get a good approximation of the correct (exact) mathematical answer. Even as few as 100,000 = 10^5 is enough to get an approximation of about 31% for this prisoner riddle as stated. My simulation program takes about 0.15 seconds runtime to simulate 100,000 outcomes/decisions and about 1.5 seconds to simulate 1 million outcomes/decisions. The problem with Monte Carlo simulation comes when the expected probability of what we are trying to simulate is super tiny. For example, if we simulated 100,000 outcomes and got 0 "winners", what conclusion can we draw? What if we re-ran the simulation and then got 1 "winner"? Our results would still be inconclusive. This is why math and computers are both useful to solve these types of counting problems because they help complement each others weaknesses / limitations. Not all people know how to solve counting problems mathematically.
Arsène Ferrière
Arsène Ferrière 11 dias atrás
An interesting thing to note, that makes things less counter intuitive is that on average as many people find their numbers with both strategies. It's easy to see with the naive strategy 50% find their number. With the loop strategy. The only ones that don't find their numbers are the ones in the biggest loop if it's bigger longer than 51. So in 1 case in 100, 100 dont find it, 1 case in 99, 99 don't find it. So on average 100*1/100+99*1/99+...+51*1/51 = 50 persons don't find it. So on average 50% don't find their number. This strategy is a way to synchronize the wins and fails
Mystogan
Mystogan 8 dias atrás
You would be a good teacher, your explanations are very straight forward and easy to learn.
Aaron S
Aaron S Mês atrás
Interesting corollary: If prisoner #1 (or any other prisoner) finds that his own loop has a length of exactly 50, he immediately knows there's a 100% chance of success.
Mavi Sormani
Mavi Sormani 22 horas atrás
True!!!
David Miller
David Miller 9 dias atrás
Here's an interesting experiment - set the room so it contains exactly 2 loops of 50 cards, then see if you can convince the prisoners to use this method with a 100% success rate...
Chelsea Fan
Chelsea Fan 11 dias atrás
@Ath Athanasius o wow thats cool!
Joe Sessions
Joe Sessions 13 dias atrás
And at least 50% of them would be FREAKING OUT opening their last chance of survival on box 50!
Glenn Clark
Glenn Clark 14 dias atrás
And if it's more than 50 he knows everyone is dead anyway.
Robert Dimbleby
Robert Dimbleby 5 horas atrás
6:53 "For the first box I have 100 different boxes I could choose from". Correct me if I'm wrong, but to me it seems there are only 99 different boxes to choose from; you can choose any box other than this box itself. If you chose this box itself, you'd have a loop of length 1 so it would be impossible to create a loop of length 100 after this. Therefore there are 99 choices for box 1, 98 for box 2 etc. This leads to 99! ways of having a loop of length 100. Furthermore, if we are counting the number of ways to put 100 numbers into boxes labelled 1-100, rather than counting loops, this means that the total number of configurations is actually 100! (not 100!/100). Simply because we have 100 choices for the number in box 1, 99 for box 2, 98 for box 3 and so on. All 100! of these give rise to a unique sequence of numbers in the boxes of 1 to 100. So there is no need to divide by 100. For instance, consider the sequences 2, 3, 4, 5, 6, ... , 100, 1 and 3, 4, 5, ..., 100, 1, 2. Although these are cyclic permutations of the sequence of each other, they come from 2 genuinely different configurations out of the total 100! configurations. The first sequence has a 2 in position 1 (i.e. a 2 in box 1), a 3 in box 2, and so on up to a 1 in box 100. The second sequence has a 3 in box 1, 4 in box 2, and so on up to a 2 in box 100. Overall, the probability of getting a loop of length 100 is 99!/100! = 1/100, so it leads to the same answer in the end. I think essentially this method of counting takes into account the pre-fixed numbers on each box, whereas the counting method in the video counts the loops, almost thinking of the numbers of the boxes as being moveable.
Benjamin Adcock
Benjamin Adcock 11 dias atrás
So all it is is a 31% chance that all the loops are 50 or less as long as every one follows the same process. Seems pretty straight forward to me. You could use the exact same strategy if they only got to open 30 boxes(or whatever the number could be) , its just that you would hope that the loops are all 30 or less. It made cense once he explained the loop right at the beginning.
Bảo Khanh Huỳnh
Bảo Khanh Huỳnh 10 dias atrás
🐕 is 31% chance.
Tran Phuoc Loc
Tran Phuoc Loc 7 dias atrás
Your explanation is definitely clearer and easier to understand. Thank you so much, now I can have a peaceful sleep.
tango dman
tango dman 2 dias atrás
This is magic of maths and probability. Great video and analysis of this problem.
Nemanja Ignjatović
Nemanja Ignjatović 29 dias atrás
As someone that went to prison, I can tell you with 100% confidence, that they got more chances to win by randomly picking boxes (one in 8*1^32), than 100 of them to agree to ANY strategy.
David James
David James 2 dias atrás
That is one in 8 which is 12.5%.
walkwithme
walkwithme 9 dias atrás
@Aaron I only found this video because I'm trying to understand how Michael knew how to save us all that day. I'm so glad he wasn't shanked with a sharpened toothbrush that one time he took two servings on cous cous Friday, leaving none for one-eyed Emine.
Nemanja Ignjatović
Nemanja Ignjatović 11 dias atrás
​@Aaron Kerrigan Yeah, I acknowledged the somewhere in the comments. But I'm necer editing my comments - an old prison habit. 😛 Trust me, even if the leader orders them to do something, many of them would do the opposite if the leader has no way to know that they disobeyed. And he wouldn't have a way to know.
cgabrielac
cgabrielac 11 dias atrás
@WCW 31% ??
Aaron Kerrigan
Aaron Kerrigan 12 dias atrás
I think you meant 1 in 8*10^32, not 1 in 8*1^32 because those odds wouldn't be so bad. Also, you know you just gotta convince each gang leader and the lackeys will follow. So maybe 1 in 5 chance. 😂
Shane Carr
Shane Carr 6 dias atrás
I'm convinced of the 31% for the stated solution, but how do we know that this is actually the best solution? Ideally, if there's a way to couple the probabilities even more, we could approach a 50% success rate.
Milosz Forman
Milosz Forman 6 dias atrás
Warshauer and Curtin ("The Locker Puzzle") have pointed out that it is indeed the best method. Suppose the rules are slightly altered, meaning that the boxes opened by any P. are left open. If another P. enters the room and sees his number in an already opened box, he has nothing to do and leaves immediately. If he does not see his number, he continues to open boxes until he finds his number. Now this would be a strictly random game, no strategy whatsoever could improve the chances. And it is equivalent to the standard game when loop strategy is used. Any strategy improving the chances of the standard game would also improve the chances of the altered game, which is not possible.
potato4dawin
potato4dawin 9 horas atrás
2:43 in, trying to solve on my own. so my first thought is that the first prisoner's odds of success are 50% no matter the strategy which means the 2nd prisoner's odds of success must be much greater if this is the case then I'd argue some strategy like arranging the slips in the boxes in sequential order and having the successive prisoners estimate the location of their slip based on that before using the rest of their box checks to rearrange most of the other half, or in the event that their slip is not in the first half, to search most of the other half to find it. This way if a random 50% are in the first half then prisoner 2 should be able to check the 1st and 2nd boxes and know based on that whether his number is in the first 50 or last 50, and then still has 48 or 49 checks left. or if prisoner 1 checks box 1 and finds a slip with a different number then he checks the box corresponding to that number and continues for 50 boxes then moves each slip to its proper box, starting over with some other box if he completes a loop Then prisoner 2 comes in, checks box 2, and if he finds his number proceeds to check successive boxes until he finds a box with the wrong slip and follows the procedure prisoner 1 did or if he doesn't find his slip then follows the procedure prisoner 1 did until he does.
potato4dawin
potato4dawin 8 horas atrás
dang, I was wrong. I guess my solution counts as breaking the rules of not leaving the room the way it was when you entered but at least I was on the right track that the loops had to be part of the solution. I just didn't think about it until he mentioned the loop sizes that no rearrangement was necessary to get odds so close to 1/3rd and my assumption that the 2nd prisoner's odds of success are higher was wrong since it's not that they're higher but rather that they're very likely shared
Blind Spot
Blind Spot 4 dias atrás
Another way to break independence between guesses would be to let each prisoner start with their number and work their way up to the box with the next number.. looping around at box 100 to box 1. This doesn't change the outcome, but their attempts are still linked.. Hmm. So, the trick is not to link them, but to link them in a way that changes the game. The strange thing is, their extra restriction is not arbitrary, they could still link by adding or subtracting from the number, but not by multiplying and taking the modulus of 100. They could still link by rembering any different order or assigning letters the symbols don't matter. the uniqueness of the symbols does. This makes the chance of each box linking to any other box the same. So why is linking unlinked data in this way a legal move? And is it always? What are the limitations of this technique? For instance, if the prisoner subtracted the number of the box from the number found inside and went one number up or one number down according to negative or positive result? That would create another looping system in which short loops are more probable, but would include duplicates of numbers. So that changes nothing or makes things worse. I get how it works, it isn't really counterintuitive, but it all seems so oddly specific. since there are so many ways you could link things that wouldn't matter, how did they arrive at this problem/solution combination? what real world scenario are we modeling here?
TheLlywelyn
TheLlywelyn 3 dias atrás
That's what I came up with. Every box has 50 people, and using the birthday paradox should increase odds. Just can't figure out the maths to compare it.
WhackyCast
WhackyCast 13 dias atrás
Has this been tested in real life? Would be cool to see an actual representation of this.
snow49032
snow49032 Dia atrás
New Mr. Beast video incoming
Shimanshu Yadav
Shimanshu Yadav Dia atrás
checkout this javascript code // prision problem from the array lets see whats the outcome function shuffled_array(length) { let box = []; for (let i = 1; i
Kieley Evatt
Kieley Evatt 8 dias atrás
Sounds like a job for Vsauce
Ali
Ali 11 dias atrás
@Brokkrep the execution of the strategy right? ......... RIGHT?
Giorgio Terreni
Giorgio Terreni 11 dias atrás
That's not what testing means
TheJulez
TheJulez Dia atrás
What people don't seem to get is, that you choose the box with your number, so you can only come back to it by finding your number on a letter. If you start the loop on your number, it can only end on your number.
Jimmyn19
Jimmyn19 2 dias atrás
If the prisoners were smart enough to figure out this strategy by themselves, and given that they’re prisoners, as in, committed a crime, maybe they shouldn’t be set free lol.
Swords to Plowshares
Swords to Plowshares 11 dias atrás
What is the probability that all 100 prisoners understand and follow the instructions? The calculation assumes 100%, but if we ran trials with random participants, it would not be nearly that high no matter what the incentive or how well it is explained to them because people are bad at following instructions. If I were in this group and we had unlimited time to strategize, I'd be drilling every person to make certain they knew the strategy and how to properly execute it.
strollas
strollas 2 dias atrás
the group basically accepts a predetermined 63 percent chance of losing by using a method of following a number line, instead of choosing randomly. they bet on a chance of an ideal arrangement, not pure luck.
James Buchanan
James Buchanan Mês atrás
Imagine being the prisoner trying to sell this plan: "Now we still have a 70% chance of failure, and it's much to difficult to explain, but you all need to follow my instructions exactly for us to have any chance." Then every dissenter lowers your chance by half agian. At this point, I'm starting to think this time would be better spent coordinating a riot.
AnduinX BYM
AnduinX BYM 14 dias atrás
If possible, I would try to not even discuss the probability of failure. I would try to sell it to them by saying something like _"this strategy improves our chance of survival many times over"._ Chances are none of the prisoners would call you on the 71%, because none of them would be able to calculate the odds, and if one of them was intelligent enough to do so, that one should also be intelligent enough to know to keep their mouth shut. For those who press you on the details, you could discuss loop chains with them and throw out impressive-sounding statements like _"by linking our probabilities together in a loop, our probability of success is tethered to the probability of there being a loop of a certain size, as opposed to repeated coin flips."_ If pressed for the odds of success, it may be appropriate to straight up lie to them and give them a high number. Again, if any of them were capable of calculating the odds, they should also be intelligent enough to keep their mouths shut. I think we'd still be screwed because there's always the ones who either can't or won't follow simple instructions.
Dark Ale
Dark Ale 18 dias atrás
Hopefully it would be easy to convince them: 1. Their individual chance is not any worse, it's still 50%. Except now they have a clear strategy to follow. 2. If they don't follow the strategy, they have no chance. (1/2)^100 is basically zero. 3. The strategy itself doesn't require any math to explain. Just "start with your number and follow the chain."
tatri2
tatri2 Mês atrás
Doesn't just one person that follows the plan increase the odds? since you + the one guy would have a 25% chance to find both of your numbers randomly, which is already lower than the 31%. Then every dissenter lowers it by 50% again but (0.31)*(0.50)^98 > (0.50)^100. Thus it's always worth trying to get at least some people to believe. edit: (0.50)*100 to (0.50)^100, oof typo
James Buchanan
James Buchanan Mês atrás
@Michael Moran I agree with the point, but you are mistaking Ben for the original commenter, me.
Pariniti Verma
Pariniti Verma Mês atrás
@Benjamin Ronlund Doesn't look like you've had a very nice group of friends for you to think this way.
STEPHENDANERD
STEPHENDANERD 12 dias atrás
I've played and watched pokémon evolution rando, (every level, random evolution, the evolution chains are set when the game starts) so the idea of any large group of variables creating loops even without the restriction of only 1 leading to 1, isn't really that big a stretch for me considering how often it happens in evo rando.
Thomas Rosenberger
Thomas Rosenberger 9 dias atrás
I actually think that this is quite intuitive once you hear it. I didn't know it before, but as soon as I heard the following the loop part of it everything made sense.
Kieley Evatt
Kieley Evatt 8 dias atrás
I think where people get confused is not understanding the slip of paper 72 and the box numbered 72 as being a single unit of the loop, so they get confused thinking "well what if I pick the wrong loop". Until that bit fully clicks, it makes no sense. For some of us that part is intuitive once it's told to us but for others it just doesn't. I think him giving the visual helped but still. Math concepts are one of those things where you don't get it until suddenly you do, even if it was explained to you exactly the same every time
Stijn De Vuyst
Stijn De Vuyst 2 dias atrás
Beautiful video. The question that arises is of course: is the proposed loop strategy optimal? In other words, can you be sure there is no other strategy which results in an even higher probability of the prisoners surviving?
Entropie -
Entropie - 2 dias atrás
Yes, it is indeed optimal.
dustin castlen
dustin castlen 10 horas atrás
Math is great if you can understand it. Personally it's not my strong suit, so I would just tell the prisoners to ignore the numbers on the boxes, and check the 1st 50 boxes they get ahold of. Place the numbers in a 10x10 square with their true value so the rest can find them without guessing.
tom gray
tom gray Mês atrás
To be honest, I didn’t struggle with understanding the strategy, or how the loops work. I was confused about the 31%, but after you explained that this all made a lot of sense, and it’s really fun maths.
Magus Perdé
Magus Perdé 12 dias atrás
It's really just about the fact everyone has the same 100 boxes.
Dennzer1
Dennzer1 27 dias atrás
Cool, I was confused by all of it. Still am, but I was, to.
Avana Vana
Avana Vana Mês atrás
@Nimrod - all geeky things oops, totally missed that fact…thanks. So you are saying that if the ratio of total boxes to box choices is above two, it is no longer able to be approximated by the area under the curve 1/x?
Nimrod - all geeky things
@Avana Vana it fails for ln(3) because the integrating function is wrong. The formula of 1/x only applies for half or more, so you would expect any ratio from 1 to 2 works. For anything more than 2, piecewise integration has to be performed and the ratio should not pop out this easily.
Avana Vana
Avana Vana Mês atrás
@Nimrod - all geeky things right, that is obvious, but what I am saying is that doesn’t apply for ratios beyond 2, for example, if 50 prisoners choose 50 out of 150 boxes. 1-ln(3) does not yield a probability that makes sense in the real world. It does hold for the simple case of 50 prisoners and 50 boxes, since 1-ln(1) = 1, ie 100%.
Tech Sam
Tech Sam Dia atrás
I was really hoping you were going to have 100 people try this out in real life at some point in the video
Bovarchy
Bovarchy 10 dias atrás
I think I understand it in a way that makes it simple to explain: Going from slip to box label eliminates any chance of randomly picking a box with a slip the same as the box number. With those out of the way, your chances are higher. Going from slip to slip keeps making your chances better because you know you won't pick two boxes with their slips switched around, and so on and so forth.
adolfo rodolfo
adolfo rodolfo 10 dias atrás
No, it doesn't quite mean that - nearly, but not completely; because you could find your own slip in the first box you open, the one with your own number on the outside. But that's OK, not a problem at all. What you can't do, you're right, is find the same slip and box number together for any of the other prisoners' numbers - which is one of the consequences of the strategy. it makes sure that every box is opened by at least one prisoner and that does, as you say, improve their chance of survival compared with random picking - although that improvement is not additional to the increased survival chance provided by the strategy.
Martin Mochetti
Martin Mochetti 9 horas atrás
Still needs a bit more of explanation on why if you open the box with your slid number you'll still find the box with your number inside. If you draw it, it becomes a lot simpler. The key is that you can't have loops within loops as the numbers within boxes are not repeated. There's only 1 and only 1 box containing your slid number.
Madhu Nuggehalli
Madhu Nuggehalli 6 horas atrás
What would happen if the prisoners started to move the slips into the correct boxes? Would it make the probability of Liberty worse?
Osmond Snurksnor
Osmond Snurksnor Mês atrás
you've got to admire these mathematicians for thinking out of the box
Rizki Pratama
Rizki Pratama 21 dia atrás
POV: YKW
Osmond Snurksnor
Osmond Snurksnor 28 dias atrás
@Pluto : With all do respect for your opinion, my opinion is that gender studies don't solve any problems but rather create new ones. But I won't be posting this on a video about gender studies because it would be rather disrespectful. If you don't enjoy maths, no problem, just don't watch video's on the subject matter.
Osmond Snurksnor
Osmond Snurksnor 28 dias atrás
@Gamina Wulfsdottir Slipping could save your life in some situations though.
Gamina Wulfsdottir
Gamina Wulfsdottir Mês atrás
The danger of thinking outside of the box is that you might slip.
stets uninu
stets uninu Mês atrás
ba dum tss
Terry Lewis
Terry Lewis Dia atrás
I’ll remember this on my next sentence in prison. I have a feeling, though, that explaining it to the inmates will get me beat up (or worse).
William B
William B 8 dias atrás
Best ever! I feel like this is more "fascinating" than it should be regarding the fact that the probability of success converges with an increasing number of prisoners. I'm challenging myself to come up with an intuition-based analogy where this will seem more obvious.
toijg avnnr
toijg avnnr 6 dias atrás
You would be a good teacher, your explanations are very straight forward and easy to learn.
Admiral Spoor
Admiral Spoor 13 dias atrás
11:00 I mean, to be fair if Permutations are considered, or drilled into you in Stats and Analysis, this doesn't seem that unusual, but I suppose that's just because by now you've explained everything well enough for me.
Ngô Trần Hoành Sơn
can someone explain to me at 8:35 I dont understand that much, the unique loops of 100, and total permutations relate to the possibility of getting 100 numbered loops
Claudio Campanella
Claudio Campanella 13 dias atrás
I know a combination of pretty large loops with every single loop to the maximum lengths, except for one condition with a loop of 1. All the prisoners would inevitably experience the longest loop, except one. Incredible.
WiiAndii
WiiAndii Mês atrás
Alternative explanation for why you're guaranteed to be on the same loop as your number: Keep in mind each slip only exists once. If you start at the box labeled with your number and follow the loop, the only way you could NOT eventually find your number is if you come across a slip pointing you to a box you've already opened, which of course leads you on the same path you've already been on, trapping you in an infinite sub-loop. But that is impossible, because that box you would be pointed back to was already pointed to by the slip you found just before that, and you can't find that same slip again. The only way you'll be pointed back to a box you already opened is that it's the box you started with, because you went to that one without having found the slip that points to it yet.
Marc C
Marc C 10 dias atrás
@serhan cinar How Prisoner54 ended up opening box 36 if there's only one box containing slip 36 (box 45)? It's impossible
WiiAndii
WiiAndii 11 dias atrás
@serhan cinar Well, he was supposed to open the box labeled with his own number, 54... That's part of the whole strategy. If he doesn't do that, then yeah, there's no guarantee for him to be on the correct loop.^^'
serhan cinar
serhan cinar 11 dias atrás
Let's say Prisoner54 opens box 36 contains slip 45, then opens container 45 which contains slip 36... Prisoner54 is out of the loop. How come he is guaranteed to be on the loop?
Jyry Halonen
Jyry Halonen 11 dias atrás
ah thank you this made me understand it
Marc C
Marc C 25 dias atrás
you made me understand it
RJ Hikes
RJ Hikes 13 dias atrás
I love how you explained calculus without using the word calculus 🤗❤️
NyoGR
NyoGR Dia atrás
Making a strategy and not communicating with one another is kind of complicated since you can communicate the end result from the strategy that you build. Prisoners can all check Their box (and the rest 49 consecutive boxes, although unnecessary*) and position themselves at the exit on the corresponding position of the number that they found in Their box. For example if in box 1 was the number 99 he would position his body on the exit at a place corresponding to 99. They could also have done this before they get in. After that they all would know in which box their number is in and this will always have a 100% chance of letting them go. *it’s only interesting to check the rest of the 49 boxes so you can position yourself at the right location in the end fix a better formation so it can be read easier at the end. Another idea was for each number to check the next 49 boxes for example prisoner 91 would check 91-41.
Reatile Koketso Molatlhegi
This is quite interesting I'm curious as to how it may apply in a daily-life scenario.. perhaps one 'Game of Chance' 😅
Remus Teezy
Remus Teezy 12 dias atrás
Thanks so much legend !! Literally the only tutorial that actually WORKED!
David Wu
David Wu Mês atrás
"You can only fail hard, or succeed completely" This is the key insight, which actually generalizes to some other probability problems and puzzles beyond just this one! Basically, for every prisoner by themselves, regardless of whether you use the loop strategy or any other strategy, it's only 50%. If every prisoner's 50% is random and independent from everyone else's, then you're doomed. But if you can concentrate their successes and failures together, then you have a shot. You want to pick a strategy where if one prisoner fails, it means that as many other prisoners as possible also fail, and when one prisoner succeeds, as many other prisoners as possible will also succeed. By overlapping their failures together and their successes together, even though no individual prisoner's chance has improved from 50% for their own individual success, they magnify their chance of getting a very extreme outcome collectively, in *either* direction. The loop strategy does this very well. Consider the first prisoner - suppose they go into a room and find their slip after a cycle of length 38. Then they immediately know that 37 other prisoners are going to succeed. Or, suppose that they fail to find their box. Then they immediately know that they are in a cycle of length > 50, so they know for sure that at least 50 other prisoners are also going to fail. Every prisoner's 50% of success or failure are heavily overlapping with many other prisoner's 50% success or failure, so their chance to get an extreme outcome is vastly larger than if they were all independent. The overlap isn't perfect - some prisoners in a long cycle may fail to find their slip while those in a short cycle succeed. Those short-cycle successes on average wastes about 19% of each prisoner's 50% chance of individual success - so ultimately the final success chance that collectively overlaps between all the prisoners is about 31%. To illustrate the point, we can consider a different simpler game - suppose we still have 100 boxes, but this time inside each box is a coin that is randomly 50-50 to be heads or tails. Suppose each prisoner only gets to look at a single box, and they collectively win only if every single one of them finds a box with a heads. Each prisoner's own individual success chance is 50%. If they all independently open different boxes, then as before their overall success chance is 1/2^100. However, if they all coordinate to open the *same* box, then they can overlap their individual successes and failures - either they all see a heads and win, or all see a tails and lose. In this simple game the overlap is perfect - every prisoner's own chance is still only 50% to find a heads, but all prisoners share the *same* 50% and so their collective chance is also 50%, rather than 1/2^100.
Emanuele Giordano
Emanuele Giordano 25 dias atrás
@Lord Talos Gaming At first sight that looks like a good argument, but the loop strategy goes far beyond that. Not only you're not going to waste attempts on boxes which contain a slip with their own number, but you're not going to waste attempts on any box which is not contained on the loop containing your number. On the other hand, you're also guaranteed that you will find your number only as the last element of the loop, so if your loop is longer than 50 you're doomed and have 0% chance of getting your number, while you would still have a chance to find it if you were to pick the boxes randomly. Thus it is not true that, as you suggested, using the loop strategy "makes no difference to individual chances" if there are no boxes with their own number. Note that for a single person the chance of getting his number with the loop strategy is NOT the chance that there are no loops of length greater than 50, but it is the chance that HIS loop is not greater than 50. The latter is of course much larger than 31% (which is the chance of the former). In the way I formulated the question, you could also calculate explicitly the probability of finding your number with the loop strategy and you can find it is 50%, as others already pointed out by euristic arguments. But here we can make actual calculations. Let's say your number is 1 (without loss of generality), so you open box 1 and there's a 1/100 chance that the loop ends here, namely that box 1 contains number 1. In the other 99/100 cases, you will be redirected to another number n different from 1. From this number n you will have 1/99 chances to get the number 1 and thus have your loop be of length 2 (since you know the box n does not contain the number n, which is already contained in box 1), so the overall chance at the second step is 99/100*1/99=1/100. The third step is similar and you will have 1/98 chances to have you loop be of length 3, if you know its length is not 1 or 2, so the overall chance is 99/100*98/99*1/98=1/100. And so on, as one would expect, the length of the loop containing your number is a random variable uniformly distributed from 1 to 100 and the chance that it is 50 or less is just 50%.
Enaronia
Enaronia 26 dias atrás
@Carlos Ortega If the team is going to lose using the loop strategy, most of the players will lose and so you have at least a 51% chance of losing individually. Meaning: When you're losing, you probably know it. So if you individually win, you're probably not!
Lord Talos Gaming
Lord Talos Gaming Mês atrás
@Gamina Wulfsdottir by "fail hard", he means the majority of prisoners fail. There's no scenario where a majority of prisoners would pass with only a minority failing. Even if one prisoner fails, it automatically means the majority of prisoners will also fail. Conversely, if a majority of players pass, all prisoners will consequently pass. There's no scope for close shaves.
Gamina Wulfsdottir
Gamina Wulfsdottir Mês atrás
Except that any prisoner who doesn't find their own number after 50 tries will know that they are all dead. I don't see how "You can only fail hard, or succeed completely" is any kind of a key insight. It's simply another way of saying "pass/fail".
Damian Sarna
Damian Sarna Mês atrás
What you described is actually known as a standard coupling argument from probability theory, widely used in many proofs. Regardless of the strategy, marginal distributions (which encode probability of success of each prisoner individually) remain intact, but we can manipulate the joint distribution (which encodes probability of their joint success) to maximize their chances. We can do that because the choice of a joint distribution is not unique - we just naturally assume they are independent because there is no clear "external" source of information that all prisoners together can use. Loop strategy does provide that external information, expressed in terms of length of the longest loop (by the way, this length is a new random variable and we implicitly switch probability spaces...). With that new strategy, their choices are simply not independent anymore, but correlated in a very favorable way. Wikipedia page on coupling in probability provides a few nice and simple examples of this technique.
David Morgan
David Morgan 10 dias atrás
I feel like a really interesting calculation would be with the hypothetical situation where if a prisoner guesses their number correctly, it removes it from the box and their number from the pool that the next prisoner would pick from.
David James
David James 10 dias atrás
What do you mean if the prisoner guesses their number correctly? How many guesses is each prisoner allowed?
Mr. Mayor
Mr. Mayor 5 horas atrás
You need to do this with a group of 100 people to see if it works. I won’t believe it until I see it. Math is like magic.
The Hypocritics
The Hypocritics Dia atrás
I'm confused about how the Malicious Prison Guard could upset the prisoners chances by rearranging the slips in the boxes. Wouldn't that functionally just be a reset of the experiment since the slips were randomly placed to begin with?
Milosz Forman
Milosz Forman Dia atrás
Renumbering the boxes is equivalent to re-shuffling the cards.
May Be Something
May Be Something 12 dias atrás
This makes sense. It reminds me of two things. Family Christmas gift giving, and an encouragement thing my grade 4 teacher did a few times during the year. I would have never guessed the answer, but it does make sense to me.
yuitr loing
yuitr loing 10 dias atrás
strategy 50% find their number. With the loop strategy. The only ones that don't find their numbers are the ones in the biggest loop if it's bigger longer than 51. So in 1 case in
Corey Smith
Corey Smith Mês atrás
I think the most important thing to note about this is the prisoners' choices are no longer random variables. It's the setup of the boxes that is the random variable. If the prisoners' follow their strategy on a good setup they are guaranteed to succeed and on a bad setup they are guaranteed to fail. So it doesn't seem that surprising that they have a much better shot than if they are randomly choosing boxes.
AuliaAF
AuliaAF Mês atrás
I tried to make the first prisoner take 1-50, the second 2-51, and so on. And it doesn't work just because everything is determined. The chance is still (50%)^100. You still need the right strategy.
Patrik
Patrik Mês atrás
It’s similar to the Monty Hall problem. Avoiding complete randomness increases your chances.
Hans Schwarz
Hans Schwarz Mês atrás
​@Blox117 That wasnt my point, but if you use a deterministic strategy, then that is the case.
DodderingOldMan
DodderingOldMan Mês atrás
Yes! Thank you for putting it that simply, I understand better now.
Blox117
Blox117 Mês atrás
@Hans Schwarz its only random before the boxes are placed. once they are placed everyone's fate is sealed
Kep Spark
Kep Spark 14 horas atrás
Puzzle @2:42 Best strategy: Refuse to participate, don't go into the room, don't attempt in the 1st place. Think about it. If they don't, they will all live! Sure in that life, they might have to lower their expectations but at least the chances of dying is lower. I am not an expert but the probability of them dying seems much below 50%. So basically the doubt is whether to choose to go through the room & take a chance of >>50% dying &
Dracarmen Winterspring
Dracarmen Winterspring 12 dias atrás
This is a really cool strategy to boost the probability up from random chance that much, and I didn't expect the probability to change so little as the number of prisoners in the puzzle increased. My followup question is, is there a way to prove that this is the optimal strategy, or is it possible there's a better one? (Of course, as people pointed out here, if this was a real situation there would also be the issue of convincing everyone to follow the strategy - IIUC even one person deciding to choose at random immediately halves everyone's chances, even though their individual probability doesn't change. So I think this strategy is also pretty good for that because what an individual has to do is pretty simple to explain, even if the reason it works isn't so simple.)
Moritz Fabian
Moritz Fabian Dia atrás
@Flame of the Phoenix you are correct this would work without communication. But it is not possible to combine this with the strategy in the video. It enhances the odds of of picking the right box by 20. Which makes it good compared to random guessing but extremely bad compared to a ~30 percent chance using the loop strategy
Flame of the Phoenix
Flame of the Phoenix 8 dias atrás
@David James They don't need to communicate.
David James
David James 8 dias atrás
@Flame of the Phoenix Communication in ANY way is not allowed according to the rules.
Flame of the Phoenix
Flame of the Phoenix 8 dias atrás
@Kieley Evatt If you spent long enough I'm sure you could find a way to implement this into a strategy.
Flame of the Phoenix
Flame of the Phoenix 8 dias atrás
@David James They don't technically know that he found his slip, but if he didn't there's no point in trying anyway, and so assuming he did not, would be assuming you lost. In other words, yes you do know that he got his slip.
Thor H.
Thor H. 8 dias atrás
I feel like the biggest problem would be trying to convince every other prisoner to follow the strategy.
shani yan
shani yan 8 dias atrás
of next prisoner, he leaves the room after a long time. 5a. Next prisoner searches the same set of boxes as his successor. 5b. Next prisoner searches the other set of boxes.
Canaiden
Canaiden 13 dias atrás
I love this explanation and now this makes total sense to me, but there is one thing that he said that doesn't click. He said a benevolent guard could "guarantee" they all survive by switching two slips, thus breaking any potential 51+ box loops. Although I agree it would increase their chances of survival, isn't there a small chance he could instead accidentally combine two loops to create a 51+ box loop? My question assumes the guard makes the switch at random without knowing the placement of the slips in the boxes, which may not have been Derek's intent.
kevin mcknight
kevin mcknight 10 dias atrás
The idea is that the guard is the person who put all of the slips in the boxes in the first place, so he knows where all of them are. Furthermore, it assumes that he originally placed the slips in boxes at random, as otherwise he could purposefully make whatever arrangement of loops he desires. In other words, if you are a benevelovent guard, you can initially assign all of the slips to boxes at random and then look at the slips in the boxes, change two of them, and guarentee success for the prisoners if they use the video mentioned strategy.
Joe Sessions
Joe Sessions 13 dias atrás
Yeah, walking into the room and "seeing" the loops, and knowing how to break the long chain, seems impossible. I think it's one of the points you'd have to suspend disbelieve on, just like all the freaked-out prisoners would actually follow the algorithm without goofing.
Dustin
Dustin 13 dias atrás
I do think he’s implying that the guard is aware of a loop containing 51+ boxes and strategically swaps two of those slips so that it breaks the loop into two loops that have less than 51 boxes. Otherwise you’d be correct that swapping two random slips without knowing anything about the loops could make the situation worse.
Raphael Schmitz
Raphael Schmitz 13 dias atrás
To me it sounds like the video up until giving the solution "follow the loop that you are on" is about the original problem - but after that it's stuff that's expanding on that. The "benevolent guard" part strikes me more as just a nice visualization of an interesting fact about the structure of the data there. So it's an all-knowing guard, which isn't mentioned, but the whole thing is meant as "look at this neat feature of how the boxes/numbers are set up: 1 change can ensure success!" Interestingly enough, the "malevolent guard" scenario is just "the opposite", but turns out more complex. Either way, as I understand it, those are all "interesting facts", not the original problems.
Andrew Blank
Andrew Blank 13 dias atrás
I believe the guard only has to switch two boxes but has to check more than that.
Wouter Pomp
Wouter Pomp Mês atrás
Imagine coming up with this massively smart idea and still only having 31% chance not to get executed.
Cruel World
Cruel World 15 dias atrás
@Roskal Raskal they are gonna die either way. It's not possible. Their best strategy is to find a way to not even get in this deal. I have had 50% chances and still lose consecutive times. Just do head and tails, do it until you fail. You won't get far even with 50%.
LordoftheFleas
LordoftheFleas 25 dias atrás
@Ducky Momo Exactly. If every prisoner gets to open 99 boxes, then the purely random strategy succeeds with 37%, while the loop strategy succeeds with 99%.
Ducky Momo
Ducky Momo 25 dias atrás
the limit of 50 is arbitrary. if you increase that it goes closer to 1 and if you decrease that, it goes closer to 0
Ojo Oladimeji
Ojo Oladimeji 28 dias atrás
@IHateUniqueUsernames Framing effect. lol
Alister222222
Alister222222 29 dias atrás
@L.F. M. For each person who opens 50 random boxes vs uses the strategy, the chance of succeeding goes down by a half. If one person decides to open randomly, you'll all have a half of 30% chance of success, or 15%. If there are two, then half of that, so about 7%. If 10 I would think 31% * (1/256), or a fraction of one percent. Having a few people be idiots doesn't totally ruin your chances, but much more than 10 and you're better off trying to win the lottery.
Cow Chop Time
Cow Chop Time 13 dias atrás
I'd love to see this in an actual experiment lol
Phil Angeles
Phil Angeles 5 dias atrás
This actually makes me think of running Secret Santa gift giving :)
Reece Drystek
Reece Drystek 6 dias atrás
It is a similar concept to the Monty Hall problem in that everyone views each person as unconnected choices. However, as you have now linked two boxes together by going to the next one with that number you have now shared information between chances and changed the probability. Just like in the Monthy Hall problem, revealing a door provides new information, it is just down to how you use it and in this case it is a cleaver way of using it in these loops.
cnmmd qiuoo
cnmmd qiuoo 4 dias atrás
each box points to the next
Youshisu
Youshisu 12 dias atrás
When you watch some science fun video, and there is question, "Where is the limit?". Opening 1000 boxes is already big task you mad man! :D
Chris Wasia
Chris Wasia Mês atrás
This riddle definitely seems impossible but the brute force approach confirms. Ran a program that played the scenario 50,000 times and yep... 3,450,000 prisoners died. Survival rate was 31% of the time. Nice work and as always, thanks for teaching us something new Derek!
Chris Wasia
Chris Wasia Mês atrás
@Adam Dugas Yeah its pretty basic. I have never felt so old. Just glad I can remember it because I have forgotten all of the other languages I once knew. Probably has to do with being a teenager and what sticks at that age.
Adam Dugas
Adam Dugas Mês atrás
@Chris Wasia Thanks for replying! I haven't read much basic, so it'll take me a while to understand this. lol
Viktor S.
Viktor S. Mês atrás
@Adam Dugas public class IsDerekWrong{ public static void main(String[] args){ double sum=0.0; int index = 100; for( ; sum
Sander Groeneweg
Sander Groeneweg Mês atrás
I just did it on Matlab. I got 31,16%. HIT = 0; for ab = 1:1000000 hit = 0; X = randperm (100); for i = 1:100 k = 0; n = 0; j = i; while k == 0 n = n+1; if n > 50 break end if X(j) == i hit = hit+1; k = 1; else j = X(j); end end end if hit == 100 HIT = HIT+1; end end MyPercentage = 100*HIT/1000000;
HogmanTheIntruder
HogmanTheIntruder Mês atrás
Question is, did the prisoners know they were in a simulation?
Seaweed 99
Seaweed 99 13 dias atrás
Lmao, imagine a 50 length loop giving 50 people a heart attack.
Cromanti Cheer
Cromanti Cheer 2 dias atrás
@Bruce Ricard Imagine every prisoner getting to box 49 and having a heart attack from anxiety.
Bruce Ricard
Bruce Ricard 12 dias atrás
You could have 2 loops of length 50.
A Flailing Duck
A Flailing Duck 12 dias atrás
Oh hey, it's pretty much thinning out a 100 card singleton deck. Experienced TCG players will be quite familiar with this. It's an exclusive pool that decreases via elimination as you draw cards (or in this case numbers), so your pool goes 1/100, 1/99, 1/98 so on and so forth. Or in our world "Where the hell is that one combo piece in my edh/100 card highlander deck".
annag cocl
annag cocl 9 dias atrás
strategy is a way to synchronize the wins and fails
Loutre Acariatre
Loutre Acariatre 12 dias atrás
What i love about mathematitians is, they'v got the brain to turn numbers in every ways possible , finding astonishing strats, yet , they'v got the hardest time explaining why it works... In this cas , the trick is not explained by math , it's explained by how you think about this problem. If they choose the loop strat , prisoners do a bet, they bet there is no loop longer than half their number, in our case 50 for 100 prisoners. Thus if they win their bet , they will all find theyr number. but if it happen to exist even one loop longer, they'r all fucked. the question is no more, "are they able to find their own numbers" but: "is the random assorment of number in the box including an over 50 loop". if your mind continue to think about the first problem it can't seize how the loop strat shifted the problem. first statment, how can they all find the good box second statment , please make it that no 50+ loop has been created in the first place. it's a good exemple on how the riddles work, they focus your ming on one point of view wile the answer is clear if your shift how you lokk over the riddle :)
Terra Incognita Band
Terra Incognita Band 13 dias atrás
Now imagine you being the one mathematical genius among all those 100 prisoners and you have to explain your strategy to Every single one of them and nobody believes you.
Matemática Rio com Prof. Rafael Procopio
Incredible video, as always. 👏🏻👏🏻👏🏻
nijuo joing
nijuo joing Mês atrás
be solved. In the end we get back to where we started. If the cycle contains all pieces we are done memorizing. But most of the time there are more than one cycle...
Shadowriver
Shadowriver 3 dias atrás
Moral is that its is more efficent to do things in some order then random. In general, this avoids same mistakes then others do
adfklfnasgo asfaisgapg
1:46 Imagine it would have been a 1. Then it would have been practically impossible
Gabzsy
Gabzsy 7 dias atrás
This channel is amazing. It reinvigorates my interest and curiosity about rational thinking and mathematics that my father instilled in me decades ago. I didn't really ended up practicing those muscles in my life but they are still there.
Róbert Kovács
Róbert Kovács 7 dias atrás
It makes me miss high school/uni math and I regret I didnt go to math school
toijg avnnr
toijg avnnr 7 dias atrás
I actually think that this is quite intuitive once you hear it. I didn't know it before, but as soon as I heard the following the loop part of it everything made sense.
inter galactic
inter galactic 12 dias atrás
i think i know the answer really : the prisoners will be able to all find their numbers if the ones that made the riddle want them to be free, seeing as this is the highest percentage for finding their number using this particular strategy then this is the strategy the ppl that made the riddle devised, and they planted the numbers accordingly, but if they dont want them to win then they'll prob randomly place the numbers
BigPapaMitchell
BigPapaMitchell Mês atrás
12:20 I have a better intuitive explanation: The only way you could start on a chain and not eventually reach itself is if either that chain forms a line with an endpoint, or that chain loops back on itself in the middle. The first one requires a box to have no number in it, which is impossible, and the second requires that two boxes have the same number, which is impossible, meaning that it must be the case it loops back on itself.
Vompatti
Vompatti Mês atrás
@M I think if you have very high IQ you can come up with it, this has 50 different stages for your brain to remember and think about in a same time to come up with a solution, 20 different stages leading to logic was around 140 IQ which is already genius. Paper might help and time but if you come up with that solution with your head and fast... very few.
M
M Mês atrás
My initial reaction was the same as Destin's, but then it slowly started to dawn on me. It's one of those things that's simultaneously intuitive and nearly obvious, but it just doesn't sound right at all. (And I feel like VERY few people would actually come up with the solution themselves, even if they've encountered an analogue before, I love things like this)
Blox117
Blox117 Mês atrás
it could also happen if the numbers dont actually represent the boxes. box 50 could have number 999 on it, in which case you are screwed
Merthalophor
Merthalophor Mês atrás
Proof by contradiction. Assume it doesn't loop. You'll see very quickly that isn't possible. W e learned it like that at uni :)
reem asraf
reem asraf Mês atrás
a chain cant go back on itself in the middle cause in order to be on the chain the only slip with that number must be on the box previous to that number
Panda Pirate
Panda Pirate 13 dias atrás
I guess it helps that I’m a computer scientist bc I figured this one out pretty quick
florian badertscher
florian badertscher 8 dias atrás
If you think it through, even on a chain with 51 boxes, all prisoners would still be able to find their box. Reason being, even if you have opened 50 boxes and didnt find your number, all prisoners should just point at box 51, hoping thats their number. That strategy only begins to fail with chains of 52 boxes or longer. ... except we have a rule that each prisoner has to see their number, rather than naming the box that contains their number. But it probably wont change much at the overall chances.
TheLlywelyn
TheLlywelyn 3 dias atrás
Complete loops with their number can exist in the loop they didn't finish or in the other 50.
triop
triop 7 dias atrás
That's actually a really good point. One of the rules says "if all 100 prisoners find their number during their turn in the room", so it's unclear whether they have to see their number within the 50 picked boxes or just point at the box they think their number is in.
Isobel Marian
Isobel Marian 2 dias atrás
Is there a time limit on the room? For what I can gather, it you have time to complete the longest loop in there, you also have time to just strategically open every box until you find yours?? Am I going crazy?
Flame of the Phoenix
Flame of the Phoenix 9 dias atrás
Alright I'm putting a wild guess as to the strategy right now before I watch the rest, if the first guy looks in the first half, and finds his number there's a slightly higher chance that the second guys number is in the second half, this is because that means only 49 cards in the first half could be the second guys number where as 50 cards could be his in the second half, and since you know that if his card wasn't in the first half you'd be executed anyway you can go ahead and assume they're in the first half. While I still think I made a good guess, after all you have to assume the previous prisoner got it correct whether he did or not, but I'll admit you made a better method. Having enslaved a computer to calculate the odds it seems like my method though not the most effective is around 20 times better than just guessing.
Aleph_ Zero
Aleph_ Zero Mês atrás
Miltersen: "Hey, i made this riddle. Anyone want to try it?" Everyone: "Dang, it is kinda difficult. What is the answer?" Miltersen: "Idk go figure it out"
haha name go brrr
haha name go brrr Mês atrás
"This problem is left as an exercise to the reader" is just a fancier way of saying "idk lol"
Itismethatguy
Itismethatguy Mês atrás
Haha yeah His name bro is funny, u could have user that
Risto Welling
Risto Welling 12 dias atrás
What happens if prisoners decide to swap 2 boxes (in example 1=100 and 100=1) and then use this string strategy? That would mean 70% time they have a good change to cut the too long string and 30% of time they has small change to cause too long string. For me it seems like they would double their changes to survive.
adolfo rodolfo
adolfo rodolfo 12 dias atrás
Assuming you mean before prisoner one begins it all? because the rules don't allow moving the boxes once the exercise has started. Swapping two of the boxes would make no difference whatsoever; you could swap as many boxes as you like, redistribute the numbers inside, none of it would make any difference at all.
haebel ebby
haebel ebby 7 dias atrás
So, I have a different solution to this problem. Say, you divide the 100 boxes into two sections (A and B) of 50 boxes each. Then give the the first person (x minutes) to open the boxes in section A. He has to find his number and the next person's number. If he finds his and the next person's number, then he waits for one more minute(totally x+1) minutes, but if he doesn't find the next person's number, he knows that that number is in section B, so he waits for two minutes, totally (x+2) minutes. Here time is used as a way of communication. So, the next person finds his number and the third person's number in x+1 or x+2 minutes, and so on. Here the success of this operation entirely depends on whether the first person gets his number or not, which is a 50% probability.
NSW HSC Maths
NSW HSC Maths 7 dias atrás
@haebel ebby If it is possible for a prisoner to learn something that he didn't previously know then information has been passed.
haebel ebby
haebel ebby 7 dias atrás
@NSW HSC Maths you're not technically passing that information. there would someone controlling this thing and when you get called for your turn you can note how long it has been
NSW HSC Maths
NSW HSC Maths 7 dias atrás
Passing on timing information is communication.
ZaiZoe's Clashing
ZaiZoe's Clashing 11 dias atrás
The mathematical graph points to the science of chance. It lines up perfectly
Jackal Coyote
Jackal Coyote 6 dias atrás
I was giving a factorial lesson earlier. This may be a more fun way to show how these work.
Tegzi
Tegzi Mês atrás
Since, like the monty hall problem, this benefits from other ways of explaining, here's another way to think about how every box must form a closed loop: for it to NOT form a closed loop, it'd have to be something like 1 -> 2 -> 3 -> 4 -> 2, where 1 never gets repeated and instead leads to a smaller loop. this, however, indicates 2 slips that point to 2, which isn't possible, since it means no slips point to 1.
Blox117
Blox117 Mês atrás
@Tegzi the game is always rigged from the start
Djejou
Djejou Mês atrás
This helped. I'll try my explanation. If it wasn't a loop it would be either: 1. An endless series or 2. A chain that falls back on itself cutting out the a part at the start (shaped like a 6). (1) isn't an option because there are a finite number of boxes. So worst case you open 99 boxes and then the last slip in that box will have to take you back to the start. (2) isn't possible either because it would imply that two separate boxes contain the same slip. So that isn't an option. you can have box A with slip pointing to box X AND box B with the same slip pointing to box X. Every slip is unique, so you can't have two branches meeting at one point. So that means you can only have a single strand that will eventually go back to where it started. It's length is random as per the maths in the video. It also means that any box can only be part of one single loop. Because you can't have two branches meeting (nor could you have one box pointing to two boxes).
Conoclast
Conoclast Mês atrás
This. This helped it click for me.
Bo Jing
Bo Jing Mês atrás
@Hishaam Maljee because that would be unfair. If the game was played properly, there can only be 1 unique number slip to 1 unique box. If two duplicate numbers were discovered, it would be a horror to the prisoners, because it would mean there are less than a 100 unique numbers. And the next question to ask is, how many duplicate numbers are in unique boxes? Then the game would not be fair at all.
Leonardo
Leonardo Mês atrás
Now i get it, thank you!
TheChgz
TheChgz 12 dias atrás
This made sense to me just because I used to put the wrong dvds/videos in their cases and I would come up with ways to find what I was looking for as quickly as possible.
Ludax2000
Ludax2000 13 dias atrás
What happens if we use the loop strategy but starting with random number(s) ? It feels like you possibly raise your chances of landing on a shorter loop to your number, is it compensated by the risk of "passing" your number or burning your chances on wrong loop(s) ?
adolfo rodolfo
adolfo rodolfo 12 dias atrás
If you use the loop strategy but starting with a random number then there are two big potential problems; (a) you make it less likely that you find your own number, because you are not guaranteed to be in a loop that includes it, (b) you might open a box that has its own number inside, meaning you will be forced to make another random choice (this might happen more than once); any additional random event always reduces the probabilty of you finding your own number compared to adhering to the strategy. The strategy is optimal, given the rules of the exercise; any deviaton from the strategy will only reduce the prisoners' chance of survival.
Entropie -
Entropie - 13 dias atrás
Your designated starting number has exactly the same chance as any other, randomly chosen number to land on a short loop so you would not see any effect in that regard. But you would reduce the coupling between the prisoners and thus the survival probability would drop as a result. The original paper actually proves that you can not do better than with the presented strategy, so most modifications to it will actually be detrimental or at best equivalent.
Pascal Tomasovic
Pascal Tomasovic 13 dias atrás
Good explanation. Why are people still confused after the explanation, though? It's pretty intuitive IMO
S2KPHD
S2KPHD 13 dias atrás
I failed at math, but totally understand this strategy. Age provides wisdom.
Próximo
How Imaginary Numbers Were Invented
23:29
Visualizações 13 000 000
This is why we can't have nice things
17:30
Visualizações 18 000 000
Trolley problems
13:50
Visualizações 415
$10 VS $10,000 MICRO APARTMENTS
18:34
Visualizações 1 062 996
The Absurd Search For Dark Matter
16:32
Visualizações 5 300 000
The Illusion Only Some People Can See
16:57
Visualizações 8 000 000
The 4 things it takes to be an expert
17:59
Visualizações 4 100 000
How Horses Save Humans From Snakebites
16:06
Visualizações 12 000 000
How Electricity Actually Works
24:31
Visualizações 6 300 000
Why this puzzle is impossible
19:37
Visualizações 2 400 000
3 Perplexing Physics Problems
14:00
Visualizações 8 900 000
$10 VS $10,000 MICRO APARTMENTS
18:34
Visualizações 1 062 996