The Riddle That Seems Impossible Even If You Know The Answer

Поділитися
Вставка
  • Опубліковано 29 чер 2022
  • 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: • Solution to The Imposs...
    Vsauce2: • The 100 Prisoners Puzzle
    Stand-up Maths: • The unbelievable solut...
    TED-Ed: • Can you solve the pris...
    ▀▀▀
    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
    Thumbnail by Ignat Berbeci
    Produced by Derek Muller, Petr Lebedev, and Emily Zhang

КОМЕНТАРІ • 35 тис.

  • @pyguy9915
    @pyguy9915 Рік тому +12348

    Something seems wrong at 9:00
    What is the probability of a loop of length 1? (Can't be 1/1)
    Length 2?

    • @joekemp83
      @joekemp83 Рік тому +1648

      That calculation applies only for n>50.

    • @veritasium
      @veritasium  Рік тому +8758

      Yes it is 1/1 but you have to treat it as an expected value. On average in any arrangement of 100 slips in boxes you should expect one loop of length 1. But sometimes you won’t get one. Sometimes you’ll get two or three etc.
      So if you had 1000 random arrangements of 100 numbers, you’d expect to find
      1000 loops of length 1
      500 loops of length 2
      333 loops of length 3
      etc.
      10 loops of length 100
      In the graph we show something slightly different, the probability that a loop of length L is the longest loop. If L>50 it must be the longest loop so the probability it exists and the probability it’s the longest are the same. If L

    • @_timelapmaker_9755
      @_timelapmaker_9755 Рік тому +421

      @@veritasium Agreed

    • @gc852
      @gc852 Рік тому +202

      @@veritasium I think one should applies a variation of the fixed point theorem here. i.e., a function mapping a domain to itself has a fixed point.

    • @joekemp83
      @joekemp83 Рік тому +236

      @@gc852 Only applies to continuous functions.

  • @wetbadger2174
    @wetbadger2174 Рік тому +18008

    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.

    • @guido3721
      @guido3721 Рік тому +801

      Underrated comment

    • @ashcheung4325
      @ashcheung4325 Рік тому +93

      Yeah

    • @tolep
      @tolep Рік тому +893

      You need a nerd with charisma.

    • @margaretjones5572
      @margaretjones5572 Рік тому +299

      Hmmmm!!!?!
      Where theoretical maths meet the "real world" and provide the opportunity to show that the human species' success is tied to cooperation within the species as well as groups within that species...like family units.
      When we cooperate as a family to follow known solutions to problems we have a 1/3 chance of succeeding. Where as groups who refuse to cooperate towards a goal have an almost zero chance of success!!

    • @MarkoMikulicic
      @MarkoMikulicic Рік тому +202

      That shows your bias. Thanks to UA-cam, Derek and Brilliant, we're heading towards a bright future were all prisoners are going to be nerds. Wait...

  • @magdasg9571
    @magdasg9571 Рік тому +5609

    Memorizing this just in case I'm ever trapped in a prison with a sadistic mathematical prison warden

    • @spyro440
      @spyro440 Рік тому +159

      Well - are you Korean? ;)

    • @94XJ
      @94XJ Рік тому +35

      @@spyro440 you win. 🤣🤣🤣🤣

    • @DarkSideofTheWest
      @DarkSideofTheWest Рік тому +6

      Lmaooooooo

    • @Garvit_M
      @Garvit_M Рік тому

      The only way you're coming out alive foso is you're the only participate , otherwise you're fucked 😂

    • @jackinkc767
      @jackinkc767 Рік тому +5

      Thanks for the suggestion. Also, bring canned fool.

  • @reifrei1170
    @reifrei1170 5 місяців тому +1621

    really sad that these prisoners were so good at math and cooperation, yet still ended up in jail 😢

    • @markgunther2502
      @markgunther2502 4 місяці тому

      White collar criminals no doubt.

    • @shardulthakur7362
      @shardulthakur7362 3 місяці тому +26

      Lmao laughed too hard at this

    • @shardulthakur7362
      @shardulthakur7362 3 місяці тому +59

      May be all are in for stock market manipulation

    • @hollamonm
      @hollamonm 3 місяці тому

      They're all just people who went to jail for maximum time for possession of weed in the US and one of them happens to be a math professor who explains how it works to the other 99.
      (This is literally a thing that occurs in the US and especially among black and latino communities because racism! I'm being sarcastic, but this is true. You're less likely to end up in prison for possession alone if you're white and I hate that that's true still.)

    • @Darker7
      @Darker7 3 місяці тому +12

      Political dissidents: First time being genocided? :Ü™

  • @joseph-fernando-piano
    @joseph-fernando-piano 4 місяці тому +467

    A really incredible feature of the loop strategy is comparing how well it works even against random guessing with more chances to open boxes. For example, if each prisoner were allowed to open 99 of the 100 boxes, instead of 50, to find their own number, the total probability of success by randomly guessing is only 0.99^100, or 36.6%! (Whereas the loop strategy gives a comparable chance of success while only opening 50 boxes, and succeeds 99% of the time if you can open 99 boxes) If you were allowed to open 98 of 100 boxes, the chance of winning via random guessing drops to 13.3%, and to below 5% for 97 boxes!

    • @jakestory8748
      @jakestory8748 4 місяці тому +33

      If this is true thats absolutely awesome. Missed chance to point that out in this video

    • @bloxer9563
      @bloxer9563 3 місяці тому +4

      Maybe

    • @RockyRoad213
      @RockyRoad213 3 місяці тому +11

      if you open 99 of the 100 boxes, then by elimination you can guarantee which box your number is in

    • @justanordinaryguy658
      @justanordinaryguy658 3 місяці тому +38

      ​@@RockyRoad213well yeah but if you don't actually open it you lose

    • @joshjason9460
      @joshjason9460 2 місяці тому +4

      What if the evil warden gave an empty box

  • @DrDJX
    @DrDJX Рік тому +33879

    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.)

    • @albevanhanoy
      @albevanhanoy Рік тому +1320

      Best comment, 10/10

    • @alveolate
      @alveolate Рік тому +1076

      lmaooo what an amazingly real-life example of this!
      unfortunately... CDs are no longer common enough for most people under a certain age to really get this example :(

    • @NZsaltz
      @NZsaltz Рік тому +1504

      To be fair, it should work 100% time if you don't have a warden forcing you to only open half.

    • @R.B.90
      @R.B.90 Рік тому +469

      Omg I forgot about that. Lol I swear we all did this for CDs, DVDs, video games. The loop has been right in front of us all along :)

    • @theglitch312
      @theglitch312 Рік тому +601

      @@NZsaltz Wait? You _don’t_ have somebody execute you if you open more than half of your CD cases?

  • @fixed-point
    @fixed-point Рік тому +5205

    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.

    • @Ryuseigan
      @Ryuseigan Рік тому +56

      Really?

    • @AthAthanasius
      @AthAthanasius Рік тому +930

      @@Ryuseigan Yes, because then the other 49 on that loop will obviously also succeed, and anyone else is on a loop of *at most* 50 (two loops of 50 is all there is), and thus will also succeed.

    • @kjbhappy123
      @kjbhappy123 Рік тому +375

      @@Ryuseigan this would imply that everyone in his loop would get their number (on the 50th shot). The remaining 50 numbers can only form a loop of max length 50 so everyone there also finds their number.

    • @shinichigojir12
      @shinichigojir12 Рік тому +241

      Because then there would be no other loops that can be greater than 50. Any other loops guaranteed to be lower than 50 so its guaranteed win.

    • @deegobooster
      @deegobooster Рік тому +96

      @@Ryuseigan yes really. The largest loop size of the remaining boxes cannot exceed 50, because 50 has already been used in that first loop prisoner #1 found.

  • @cultofmel
    @cultofmel 3 місяці тому +175

    I was really confused at first on how whatever number you start with is guaranteed to be in your loop, but once I started to type out a comment questioning it I totally realized how it works. In order to finish your loop you have to end up back where you start, and since none of the boxes can be empty, you're guaranteed to be in some sort of loop.

    • @TheJakoubecek
      @TheJakoubecek 2 місяці тому +11

      Then you have two boxes which contain “3”… Every number occurs exactly once in all the boxes.
      If box 1 contains “3” then no other box have “3” you are guaranteed at this point that your loop you are on cannot have box which contains the same number (1 has 3, 3 has to have something else ie 5, then 5 has to have somethine else and so on, until you find box pointing you back to 1)

    • @TheJakoubecek
      @TheJakoubecek 2 місяці тому +9

      Try it with something small like 3 or 4 boxes. Whatever you try you will always see only loops. No dead ends. If you find dead end it means there are duplicates and some number is missing (duplicate took its place)

    • @YEC999
      @YEC999 2 місяці тому +3

      @@TheJakoubecek Oh man you are right🤯 i somehow didn't see that Thanks!!

    • @nicolass.5849
      @nicolass.5849 2 місяці тому +5

      In a loop, yes. But why in your loop ? I don't understand it...

    • @cultofmel
      @cultofmel 2 місяці тому +8

      @@nicolass.5849 You have to end up back where you start in a loop. And since in this case you start at your own number, one of the boxes in your loop must also contain your number. If none of them did, you would never be able to finish the loop.

  • @tfdtfdtfd
    @tfdtfdtfd Місяць тому +29

    The main point here is that "failing hard" comes with no harsher penalty than "failing little"....hence, you can redistribute your loss function to take advantage of this. Great video, btw!

  • @gregsquires6201
    @gregsquires6201 Рік тому +12065

    I think the chance of convincing 99 other prisoners that this strategy is their best chance of survival is much lower than 31%.

    • @pokejinwwi
      @pokejinwwi Рік тому +1342

      There’s always that one guy who refuses to listen and wants to be the leader xd

    • @lavarel
      @lavarel Рік тому +612

      @@pokejinwwi one? Out of 100? That's even more impossible.
      We're talking inmates here,

    • @tvao9010
      @tvao9010 Рік тому +717

      Some guy will want to go on his lucky number and a lot of other dumb stuff would happen

    • @pokejinwwi
      @pokejinwwi Рік тому +21

      @@lavarel fair enough

    • @gobbedy
      @gobbedy Рік тому +303

      at least 7 of them will pray to jesus for the which boxes to open

  • @ZamanAristoOrCleon
    @ZamanAristoOrCleon Рік тому +1008

    Imagine being the first inmate and not finding your number. “Oof, we tried”

    • @Andy-lm2zp
      @Andy-lm2zp Рік тому +47

      or the last!

    • @funnygreenguy
      @funnygreenguy Рік тому +147

      @@Andy-lm2zp if you were the last one and you failed, then there should've been MANY others also failing.

    • @ramuroy6088
      @ramuroy6088 Рік тому +13

      @@funnygreenguy only when you follow the strategy mentioned in the video...

    • @funnygreenguy
      @funnygreenguy Рік тому +10

      @@ramuroy6088 yeah, I automatically assumed it from the original comment 😀

    • @Spectre0799
      @Spectre0799 Рік тому +9

      I like to think that the people constructing the test purposely made no loops of >50, so that the prisoners could go free if they are intelligent enough to be worth returning to society (if they figure out the loop method then they will be given 100% chance)

  • @TheDrCN
    @TheDrCN 2 місяці тому +87

    When you first gave the solution, I sketched out on a piece of paper a version of the problem with 4 prisoners, 4 boxes, 2 attempts, and I feel like I understood the entire thing almost instantly with no further explanation required. I think lowering the numbers down to something more manageable makes the problem much more comprehensible. I mean, you could even write out 4! configurations if you wanted and prove that it works for all of them, whereas 100! is so large as to be impossible to visualize.
    I think it would have been helpful to include this simpler example in the video.

    • @suspicioussand
      @suspicioussand 2 місяці тому +9

      I think mathematicians made the number big to appear extra smart

    • @sjenny5891
      @sjenny5891 2 місяці тому +8

      Make it seem more complicated so people over think the answer.

    • @amieres
      @amieres 2 місяці тому +9

      In mathematical problems it is always a good a idea to go to the extremes to test/understand the problem and solutions. Go small AND go big.

    • @sicsempertyrannus226
      @sicsempertyrannus226 Місяць тому +6

      Agreed. It's the inverse of the Monte Hall problem. Take a deck of cards and demonstrate Monte Hall to someone and they'll understand why it works.

    • @shishirrai9878
      @shishirrai9878 18 днів тому

      By keeping it 100 boxes, you can show how big of a probability you skewed. Like my bro said 1mm to the length of observable universe 😉

  • @MikhaeylaKopievsky
    @MikhaeylaKopievsky 2 місяці тому +19

    I feel like there needs to be a 'wow out loud' like 'laugh out loud', because when you said "that's like scaling up a millimetre to the diameter of the observable universe", that's exactly what I did.

    • @jskrabac
      @jskrabac Місяць тому +2

      Yeah, but WOL is just as many letters as WOW 😆

    • @DrunKao
      @DrunKao 19 днів тому

      ​@@jskrabac lol

  • @bscorvin
    @bscorvin Рік тому +1941

    My actual concern if this ever somehow became a situation I got myself into is that someone would decide this is stupid and just pick boxes at random

    • @miloszforman6270
      @miloszforman6270 Рік тому +201

      _"that someone would decide this is stupid and just pick boxes at random"_
      That's frequently a problem in real life. Not so much in the fabricated setup of the video. Persons with a strong determination are usually the ones which make the decisions, and not always they are very smart. Like this example from recent (and many others from less recent) history:
      Smart mind says: "Don't go to war against xxx, IT WILL NOT WORK." Strong will says: "Of course it will, you're a coward and a traitor."
      20 years later, it did not work. Strong will says: "Nobody could have known that, therefore it was the right decision at that time."

    • @szymonl4363
      @szymonl4363 Рік тому

      Exactly. Every idiot deciding to go for random nubers roughly halves the chance of winning.
      Anyway, here is some useless math I spent half an hour on (what am I doing with my life?).
      Theoretically even with googol or googolplex people (assuming that we just don't worry abut time it would take to open half a googolplex boxes gogolpex times) you would have an over 30% chance of winnig, but when talking abut actual people, not idealized beings, this just doesn't work. Even with the googol people case and (10^-48)%, wich is 0.000000000000000000000000000000000000000000000001% people being idiots and choosing randomly, your chance would be(3/2^(10^50))%, wich i think is way under 1/10^10000, or 1/googol^100. When I plugged this into calculators (even the most precise ones I could find), they straight out gave me 0, witch speaks for itself.

    • @Solo_man69
      @Solo_man69 Рік тому +31

      If that happened in real life to you u would have a better chance just starting a jailbreak

    • @Drumaier
      @Drumaier Рік тому +8

      A legit concern.

    • @gerritcasper8730
      @gerritcasper8730 11 місяців тому +11

      You would end up with a 15.35 % of winning, not bad

  • @Bismuth9
    @Bismuth9 Рік тому +3416

    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.

    • @jynx619
      @jynx619 Рік тому +209

      Your observation is not necessarily true. It could just be that Derek randomly picked 5 odd numbers, and this has a probability of 2.8%

    • @johnhunter7244
      @johnhunter7244 Рік тому +298

      They are called *odd* for a reason

    • @HYPERWATER
      @HYPERWATER Рік тому +19

      Raoodnm

    • @josenobi3022
      @josenobi3022 Рік тому +15

      @@jynx619 how did you calculate that probability

    • @janbacer
      @janbacer Рік тому +41

      @@josenobi3022 I'd do 1/2⁵ but that's 3.1% 😕

  • @mattsnyder4754
    @mattsnyder4754 19 днів тому +5

    So, I think there’s an easier explanation for why you’re guaranteed to eventually circle back to your own box.
    For a loop to close, you have to pick a slip of a box you’ve already been to (otherwise you’re just continuing on down the loop).
    But the fact that you’ve already been to a box requires that you’ve already found its slip in a previous box.
    The one exception to that, is the box you started with. Which, in this case, is your own number.

  • @geraldcollins5684
    @geraldcollins5684 Місяць тому +2

    I've seen a variation of this some years ago. Didn't remember the way to solve but it came back quickly when you gave the solution.

  • @charliehorse8686
    @charliehorse8686 Рік тому +1117

    If you think the riddle is hard, imagine trying to convince 99 fellow prisoners to follow the plan to the letter.

    • @davidjames1684
      @davidjames1684 Рік тому +9

      No letters, just numbers, ha ha.

    • @StabbyJoe135
      @StabbyJoe135 Рік тому +41

      @senni bgon you've clearly never been in prison. Or met someone with ADHD.

    • @andrzejbozek
      @andrzejbozek Рік тому +1

      xd

    • @christiankrause1594
      @christiankrause1594 Рік тому +11

      Then i have another riddle for you:
      You are sitting in a restaurant and listening to the neighbors table. You listen to three different woman talking.
      a) One says: I have two childs, Martin, the older child, just got his driver license.
      What is the probability for her other child also being a boy?
      b) Two says: I have two childs, Martin just got his drivers license.
      What is the probability for her other child also being a boy?
      c) Three says: I have two childs, Martin just got his drivers license. He was born on a wednesday.
      What is the probability for her other child also being a boy?
      SOLUTION: a) 1/2, b) 1/3 c) 13/27
      Explanation:
      b) Not possible is the birth of G/G, possible is B/B, G/B (girl older) and B/G (boy older). Each of the three B/B , G/B and B/G are equal with a probability of 1/3, but only on B/B the other child is a boy, so it is 1/3.
      a) As Martin is the older child, the question is simple: What is the probability for a new born child being a boy. What is the probability for your own next child being a boy/girl. It is 1/2.
      The difference is, that Martin is "fixed" in the birthorder being said he is the older one.
      c) This one is really hard: The more you "fix" one of the child in the birthorder with detail information, the more the probability increases from 1/3 to 1/2 being a boy. In this situation we have to draw:
      B/B G/B B/G
      1234567 1234567 1234567
      1oooxooo 1oooxooo 1ooooooo
      2oooxooo 2oooxooo 2ooooooo
      3oooxooo 3oooxooo 3ooooooo
      4xxxxxxx 4oooxooo 4xxxxxxx
      5oooxooo 5oooxooo 5ooooooo
      6oooxooo 6oooxooo 6ooooooo
      7oooxooo 7oooxooo 7ooooooo
      The x marks all wednesdays and the "o" marks all other weekdays the second child could be born. The sum is 4x7 -1 = 27 possible birthdays.
      Only all events in the left diagram (2x7 - 1 = 13) marks the events where the other child is also a boy.

    • @charliehorse8686
      @charliehorse8686 Рік тому +26

      @@christiankrause1594 Obviously we don't have enough information. We don't know if Martin is right handed, and we don't know if he prefers chocolate or strawberry ice cream. We also don't know if he bites his nails or has a birthmark on his left shoulder.

  • @inemanja
    @inemanja Рік тому +1717

    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.

    • @flogzer0
      @flogzer0 Рік тому +368

      I actually had this happen to me in a Turkish prison. I came up with it on the spot and saved us all.

    • @aaron2112
      @aaron2112 Рік тому +57

      @Michael Ritsema sure dude. Whatever.

    • @Houstonruss
      @Houstonruss Рік тому +336

      @@aaron2112 He save hundreds of us! I owe my life to michael for his solution!

    • @Brormable
      @Brormable Рік тому +274

      @@aaron2112 it's true, I was one of the inmates and Michael is a true genius

    • @aspiringdiamond
      @aspiringdiamond Рік тому +235

      @@aaron2112 Michael saved my life in that Turkish prison, he isn't lying

  • @bartoszporzezinski4842
    @bartoszporzezinski4842 21 день тому +1

    Love this! The concept of loops does break the mind slightly, but is very logical once you look at it with a reduced number of boxes. I would never come up with this solution myself, however - eliminating randomness of prisoners' choices in this manner is truly ingenious.

  • @anonymanonym1364
    @anonymanonym1364 Місяць тому +3

    Really mesmerized! Your videos are just awesome...! They are really exciting and lead me to think deeper!

  • @NZ-fo8tp
    @NZ-fo8tp Рік тому +3127

    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

    • @JensPilemandOttesen
      @JensPilemandOttesen Рік тому +15

      Just by the title I thought Parkers video of the same puzzle.😀

    • @ELYESSS
      @ELYESSS Рік тому +219

      It's just maths, it's either right or wrong, it can't be controversial.

    • @flashstar1234
      @flashstar1234 Рік тому +9

      Yeah same makes perfect sense to me

    • @pirojfmifhghek566
      @pirojfmifhghek566 Рік тому +95

      I'm disappointed, honestly. I was looking forward to more angry ElectroBOOM response videos.

    • @CertifiedSlamboy
      @CertifiedSlamboy Рік тому +92

      @@ELYESSS
      Erm. Have you heard of the -1/12th video?

  • @ltmcolen
    @ltmcolen Рік тому +982

    you've got to admire these mathematicians for thinking out of the box

    • @MusicSounds
      @MusicSounds Рік тому +31

      literally this time

    • @-Jethro-
      @-Jethro- Рік тому +48

      I see what you did there!

    • @donc-m4900
      @donc-m4900 Рік тому +17

      But why where they in jail to begin with 😂

    • @abinbaby4044
      @abinbaby4044 Рік тому +6

      Or out of the loop!

    • @alveolate
      @alveolate Рік тому +3

      @@abinbaby4044 actually, into the loop xD

  • @z1ph0n3
    @z1ph0n3 Місяць тому

    Thank you for the "initial" headache! Great explaination.

  • @kaustubhrao5653
    @kaustubhrao5653 2 місяці тому +8

    Love it!! For some reason, linked lists came to my mind and it dawned on me. I didn’t fully workout that the probability for loops >50 would be 1/3

  • @neildmoss
    @neildmoss Рік тому +609

    I feel that "Metersen's colleague" should definitely get at _least_ a name check here! So, hat tip to Sven Skyum, reader emeritus at Department of Computer Science, University of Aarhus.

    • @ApequH
      @ApequH Рік тому +23

      * Tips Hat*

    • @tim40gabby25
      @tim40gabby25 Рік тому +39

      "Skyum's protocol" sounds a bit like a namecheck...

    • @eliaskjrbo8142
      @eliaskjrbo8142 Рік тому +3

      I live in Aarhus!

    • @osiris1102
      @osiris1102 Рік тому +1

      @@ApequH tips fedora m'skyum

    • @neildmoss
      @neildmoss Рік тому +11

      I'd love to know the process by which Skyum arrived at this answer. Years of work in a field where this kind of "loop" structure has been studied already? Flash of inspiration after a night of pizza and cola? Or was it an immediate "well, duh..., isn't it obvious?" savant-level intuitive grasp? That's as fascinating as the original riddle.

  • @wouterpomp5014
    @wouterpomp5014 Рік тому +648

    Imagine coming up with this massively smart idea and still only having 31% chance not to get executed.

    • @kevinz8554
      @kevinz8554 Рік тому +111

      Life do be like that sometimes

    • @aarondavis8943
      @aarondavis8943 Рік тому +75

      Imagine trying to explain probability to a bunch of prisoners. I put the actual real-world chance at something around 0.001%

    • @everstanding400
      @everstanding400 Рік тому +38

      Imagine knowing this for a fact and no one listens 🤣

    • @idiatico
      @idiatico Рік тому +86

      You'd use up your strategy time trying to convince them it's smart and gives a 31% chance at success then someone will speak louder then you saying "all that work for less than the 50% chance we get picking randomly?" And then everyone dies

    • @clover7359
      @clover7359 Рік тому +16

      31% chance of success is a hell of a lot better than effectively 0%.

  • @vpelss
    @vpelss 5 місяців тому +72

    For me the best way to visualize the loops is to start with all the boxes with the same number inside. 100 one box loops (pointing to themselves). Then randomly swap two of the boxes contents. You now have 98 one box loops (pointing to themselves) and one two box loop (the swap). Keep doing this to visualize the small loops getting larger. It is kind of like mixing toffee with the links between the boxes.

  • @simonnguyen692
    @simonnguyen692 Місяць тому +3

    this reminds me of blindsolving a rubik’s cube. if you label the solved state of the cube in an organized way, you can trace the pieces in a sequence when it becomes scrambled, and completing that sequence will return the pieces to their solved position

  • @michaelgove9349
    @michaelgove9349 Рік тому +1073

    As a former professional gambler, the key to understanding this in real-world terms is at 9:48. Every prisoner's individual chance of success is still 50%. The strategy works by making the prisoners' individual chances contingent on each other: linking them together.
    Imagine a related puzzle - the sadistic warden has been told that the median human heart rate is 75 beats per minute.
    He devises a game where he measures the 100 prisoners' heart rates. He has two large bins marked "UNDER 75 BPM" and "75 OR OVER", and he places each prisoner's ID tag in the bin corresponding to their measured heart rate. But there are two catches. Firstly, he has privately flipped a coin before the game to decide which will be the winning bin: the prisoners don't know which is which.
    And secondly, *all 100* prisoners have to win the game for them to be freed.
    So each prisoner's chance of winning is 50%. And with no collective strategy, the chance of everyone winning is 0.5 to the power 100. Tiny.
    But the collective strategy is simple: everyone does extremely vigorous exercise immediately before getting tested.
    Now *everyone's* heart rate is above the median. So although each person's individual chance of winning the game is still 50%, now the collective chance of winning is also 50% - because *everyone is now in the same bin.*
    Basically, that's how to grok the video's strategy for the boxes problem - in a sense it puts everyone "in the same bin" - and the bin is marked *"Are all the loops shorter than 51 ?".*

    • @michaelgove9349
      @michaelgove9349 Рік тому +81

      Notice that the Skyum "loops" strategy works because the room *is the same room for everyone.* And the strategy takes advantage of a particular mathematical property of the way the numbers are sorted into boxes *in that one particular room.*
      If there were 100 *different* rooms, with the numbers in the 100 boxes sorted randomly in each one, then the chances of *everyone* succeeding would again be huge. Because now all of the 100 outcomes would be statistically independent.

    • @yusufahmed2233
      @yusufahmed2233 Рік тому +62

      Ok, that was an AWESOME example! Mind = blown 🤯🤯

    • @balintvarga5146
      @balintvarga5146 Рік тому +26

      Absolutely stunning example.

    • @LiveHappy76
      @LiveHappy76 Рік тому +11

      Did you retire early and because of success in that? One of my brothers learned a roulette betting strategy, something about (a) betting on 1/3 of the numbers each time and (b) setting a predetermined loss limit at which you'll stop betting. You win more often than lose, but do lose. He was kicked out of casinos for using it, even though it breaks no rules.
      I've been tempted for years to try such things but have always resorted to status quo of work a job for a paycheck....

    • @thomasrosebrough9062
      @thomasrosebrough9062 Рік тому +5

      I appreciate this version of the explanation to point out where the "magic number" comes from by reminding us that the criteria for "the bin" is arbitrary

  • @Robert08010
    @Robert08010 Рік тому +335

    I like this warden. He has reasoned out that if he can turn all his prisoners into math wizards or at least willing to work together and trust one another, he can let them out.

    • @KhangNguyen-ij4xh
      @KhangNguyen-ij4xh Рік тому +8

      Then you get something like Vento Aureo. Basically a group of criminal with a prodigy and are willing to work together

    • @Solo_man69
      @Solo_man69 Рік тому +1

      The wardens watching too much saw and squid game

    • @teeemm9456
      @teeemm9456 11 місяців тому

      The missing part of the strategy is, if the first prisoner fails, they implement plan B and break out.

    • @Solo_man69
      @Solo_man69 11 місяців тому

      @Tee Emm
      And now probability has been in creased to 100% cus there’s like 1 warden

  • @calereliya
    @calereliya 13 днів тому +1

    It actually amazes me that anybody could not see why if you start with your own number, you'll eventually find your slip. That was one of the few parts of this that as soon as you said it, I was instantly "well yeah, obviously."
    Fascinating how different minds see different things.

  • @QueenKunniK
    @QueenKunniK 4 дні тому +1

    Wardens: "we've labeled the boxes with shapes instead of numbers"

  • @GuitarGuise
    @GuitarGuise Рік тому +439

    The way I like to think about the solution: you're no longer betting that each individual prisoner will find their number with a pattern that they choose (arbitrary or intentional), but you're betting on the probability that a pattern (a loop exceeding a length of 50) does not exist in the set of boxes. And that's a static property of the set you're betting on, in contrast to rolling the dice every time on 50 different prisoners. So, in a way, you've already succeeded or failed by choosing the loop strategy, whether you know it or not. Random chance no longer has anything to do with the prisoners' choices (unless they mess up the execution of the loop strategy), but entirely on how the box set is arranged and the loop strategy that the prisoners decide to employ at the start.
    Fascinating mathematics! Thanks for sharing this!

    • @quixoticPrancer
      @quixoticPrancer Рік тому +15

      Yeah exactly. For a video that set out to make a complicated thing understandable, there is room for considerable improvement...

    • @brendawilliams8062
      @brendawilliams8062 Рік тому +1

      51 would be set of three boxes. : 5.0999011. Or 352319696. You can’t jump 51

    • @sonkeschmidt2027
      @sonkeschmidt2027 Рік тому +1

      With the implementation of the strategy you change an element of randomness in the problem. The randomness of the prisoners behaviour.
      Just like a conductor changes noise into order with the swing of a wooden stick based on mutual understanding of the symbolism of the stick.
      The power of cooperation, hence the saying a bad plan is better than no plan.

    • @enzzz
      @enzzz Рік тому +1

      @@sonkeschmidt2027
      I mean with this one, it's so much about the magnitude of difference if you notice this behind the hood pattern of loops.
      You could also create a very bad plan where everyone cooperates, like maybe prisoners might think that each should go
      1. 1 - 50.
      2. 2 - 51.
      3. 3 - 52.
      ...
      50. 50-99.
      51. 51-100.
      52. 52-1.
      100. 100-49.
      thinking this is better than completely random. This is for example the first idea I thought to test if it would have any influence at all, what if they increase number one by one. I'm not sure if this actually will increase odds in any meaningful way. Didn't actually test it out, but I knew it definitely won't give near 1/3 odds.
      So I would say it's more about noticing this really obscure but effective strategy rather than cooperation really. You of course need cooperation to carry it out.

    • @sonkeschmidt2027
      @sonkeschmidt2027 Рік тому +1

      @@enzzz what is this obscure strategy going to do without cooperation? How you going to implement it? Or even find it out?
      You would need someone to come up with it and convince everyone to follow a strategy with just 30% chance of winning. That is not a good plan. It might be the best but it's not a good one. To get this to happen requires a shitton of cooperation.

  • @brianrussell463
    @brianrussell463 Рік тому +157

    Destin had my favorite response ever, "teach me!" I love that.

  • @shimassi9961
    @shimassi9961 Місяць тому

    Towards the end you presented two alternatives with a benevolent/malevolent guard. What would happen in the case of a malevolent prisoner (someone trying to intentionally sabotage this). Would he be best served picking at random, picking at random then following the loop or some other strategy (e.g. perhaps start following a loop but stopping and switching to a new one after so many steps)?

  • @ffc1a28c7
    @ffc1a28c7 14 днів тому

    10:32 regarding Dustin's comment, to get onto a self-closed loop from outside the loop would require the same number appearing twice (say the loop you're going into is ab...ca, and you go from d to a, then c and d contain a).

  • @mdtexeira
    @mdtexeira Рік тому +673

    The minute you mentioned loops, it no longer seemed impossible and actually seemed retroactively obvious. Math is so damned cool.

    • @micahturpin8042
      @micahturpin8042 Рік тому +23

      Same here. I had the same question that Destin did, but as soon as I realized that, unless the box you start with contains it's own (and hence your) number, you are guaranteed to be on the proper loop. It's only a question of how long that loop is. As soon as I was able to wrap my head around that, it made perfect sense.

    • @nomoneyball5423
      @nomoneyball5423 Рік тому +10

      I have a different solution that grants greater than a 31% chance.
      It approaches this as if it were a trick question, and still completely satisfies all the rules/requirements.
      "Each must leave the room as they found it."
      They found it with 100 closed boxes. They didn't "find" any boxes open nor did they find any information or clues regarding which numbered slips were in which boxes.
      On that premise, #1 (beforehand tells all of this strategy), and opens 1/50 (a 50% chance). He then takes ALL numbered slips placed in boxes 1-50 and he stuffs all of them in box #1 (just as he had told the rest of the group beforehand that he would do...Mind you; this is a "trick answer," but according to the rules, NOTHING specifies this is not allowed).
      Then, prisoner #2 (who was beforehand told of this overall strategy-and understand/assume the rest were as well for the sake of time), then opens boxes 1 (which now has all numbered slips which were originally placed in boxes 1-50) and he opens boxes 51, 52, 53.... (you get the point) to box 99 (50 boxes).
      As long as HIS number (2) isn't in box 100 (a 1% chance which lowers our overall group chance only to 49%!!!!), everything is still a go. Then, he also places all numbered slips he has now discovered (in boxes 1 & 51-99) all into box 1 (just like the first prisoner did).
      Now, prisoner #3 has a 100% chance now as he just checks boxes 1 and 100 (which have all the numbered slips in them as the remaining boxes are empty) and then he places the numbered slip located in box 100 into box 1 as well! (So now ALL numbered slips are now located in box 1).
      Prisoners #4, 5, 6 and so on only have to check box 1 and their chance is 100%, thus keeping our risk level/chance at 49%!
      All the way to prisoner 100.
      This way completely plays by the rules by the way according to the information/restrictions that was given us.
      As we only talked strategy beforehand, only one entered at a time, we did not communicate during, and we each left the room as we found it; with 100 closed boxes that never got moved. Yes, the SLIPS got moved, but we "left the room as we found it," because prisoner #1 FOUND the room with 100 closed boxes in such order.
      Also matching the approach of a "trick question/trick answer," you could also have prisoners 2-100 arranged tightly around the open doorway as prisoner 1 goes in, and all 2-100 could watch as he opens each box. They could each take notes on what box he opened and what number they witnessed him discover. And so on and so forth. This still allows for them entering 1 at a time as well as not communicating in any way with any of the others.
      Another way is to say ok the room is sealed but with glass walls. Just the way my mind works and another way of looking at it. These answers give me more peace about it than the one discussed in this video. However, the solution discussed in this video is more fascinating and I'm sure true math experts (I am NOT one I'm just someone who greatly enjoys strategy and basic wisdom/philosophy) will prefer it the way it is in the video for the math aspects!

    • @user-bu9xh4sg6v
      @user-bu9xh4sg6v Рік тому +1

      But how will the prisoners know the loops to find their numbers? Like which number to open next to get to their loops?

    • @gavissing5225
      @gavissing5225 Рік тому +1

      @@user-bu9xh4sg6v they open what ever number is in the box then open that box see what number is in that then they go to that number and open that box’s d so on until they find there number

    • @superkilleryt3764
      @superkilleryt3764 Рік тому +1

      @@nomoneyball5423 wait what if the first person cant find his number...

  • @Slinky0205
    @Slinky0205 10 місяців тому +696

    Imagine spending hours to come up with that strategy and the first prisoner doesn't find their number

    • @athletico3548
      @athletico3548 6 місяців тому +11

      the rules are impossible by themselves.
      One of the rules say: "they must leave the room exactly as they found it". Once you enter the room, the room is not the same as it once was. Since prisoners are allowed to open and close the boxes to look for their number, the room can't be exactly as they found it. Which means, the own problem is a fraud.
      Another rule says:
      "If all 100 prisoners find their number "during" their turn in the room, they will all be freed, but if even one fails, they will all be executed."
      Its a paradox. Its impossible to 100 prisoners to find their number "during" their turn, since they are getting inside the room one after another.

    • @SublimeWeasel
      @SublimeWeasel 6 місяців тому +41

      ​​@@athletico3548so with the first rule point you explained; you mean that if a prisoner knows the numbers, the math fails? But the prisoners arent allowed to share info with each other. It's still random for each individual.
      Also, idont really get the second point you made, can you elaborate?

    • @SublimeWeasel
      @SublimeWeasel 6 місяців тому +11

      @@athletico3548 how would you rephrase the rules then? Im having a hard time understanding, i do understand the chess lore and heraclitus' river, i dont understand the second point. Maybe its because my main language is not english, but i dont see it :(
      This is some qualia stuff right here

    • @athletico3548
      @athletico3548 6 місяців тому

      @@SublimeWeasel rephrasing it: "If each of the 100 prisoners find their number during their turn in the room, they will all be freed, but if even one fails, they will all be executed."

    • @pragyanburagohain8751
      @pragyanburagohain8751 6 місяців тому +53

      ​@@athletico3548this just seems like semantic nonsense.
      Also how does leaving the room exactly as they found it not make sense? Open and close boxes simple. They are closed as before.
      Seriously what are you trying to say

  • @plamaoverstrike
    @plamaoverstrike 3 місяці тому +9

    That's easy to understand, loop strategy sets a fixed probability that will never change while random strategy shuffles the odds all the time

  • @DP-zw8sb
    @DP-zw8sb Місяць тому

    Please solve this ,added to solution above video mentioned, if prisoners opens the the 2nd number by doubling the present Box number if not possible, open same numered box and every 3rd box by tripling if not same. So every member escapes same loop happening if a loop is 51 or more.

  • @jamesbuchanan1913
    @jamesbuchanan1913 Рік тому +307

    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.

    • @supersonicgamerguru
      @supersonicgamerguru Рік тому +52

      I was very confused for a minute, until i realized you were trying to say "dissenter". Descent is going down, decent is not a verb, dissent is disagreeing.

    • @BenjaminRonlund
      @BenjaminRonlund Рік тому +2

      Wow you're very smart with a great understanding of spelling and grammar. It's a shame those won't win you any friends or help you communicate effectively with those you manage to piss off.

    • @JD-wu5pf
      @JD-wu5pf Рік тому +63

      @@BenjaminRonlund I'm sure going full roid rage in a UA-cam comment section is the correct way to make friends?

    • @GameFuMaster
      @GameFuMaster Рік тому +10

      @@BenjaminRonlund too bad your misspellings is actually not going help you communicate effectively.

    • @supersonicgamerguru
      @supersonicgamerguru Рік тому +12

      @@BenjaminRonlund yep, the problem is definitely with making literally any corrections to anybody ever, not with the people who go "ur dum that's not a word".
      It's 100% not allowed to comment on spelling or grammar, even when it will help make the original post more clear to future readers and you fully explain what the correct word is and why it's correct.
      Explaining things never helped anybody, especially those learning an extremely difficult language like English, whether it be as a first language or a second.

  • @jenius00
    @jenius00 Рік тому +382

    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.

    • @HeythemMD
      @HeythemMD Рік тому +4

      +

    • @markmuller7962
      @markmuller7962 Рік тому +22

      Yep, in other words the strategy creates a finite system of loops that is predefined as a winning system or a losing system with a 30% - 70% ratio.
      The strength of the strategy is about that the individual actions doesn't really matter, once the strategy is chosen the entire system of loops 4:45 is automatically determine and it's either a winning system or a losing one (30 - 70)

    • @chrishillery
      @chrishillery Рік тому +3

      So it turns it from a game of chance into Candyland.

    • @hansschwarz1338
      @hansschwarz1338 Рік тому +1

      a deterministic aproach doesnt make something more likely, just for being deterministic. It gets more likely, because the probability of the biggest loop being length 50 or less is higher than the random aproach. if every prisoner could only could choose one box to open the aproach wouldnt impact the result. So the deterministic nature doesnt have a part in it, but rather the finite setup and structure of this riddle in combination with the right strategy.

    • @questionedsanity785
      @questionedsanity785 Рік тому +4

      @@hansschwarz1338 This is wrong. It is correct that determinism doesn't matter, but the real reason the loop method is superior is that it coordinates successes among the group. In particular this means it does actually help if you only get to open one box, and in fact this situation makes it clearer why it works. If everyone opens one box they can only succeed if they all choose different boxes, it is therefore clear that you improve your probability of group success as long as you coordinate to never have 2 people open the same box. This means that coordination is the important part, it just happens to be the case that the optimal method of coordination in the many box case is the loop method.

  • @pradyumnachakraborty3262
    @pradyumnachakraborty3262 15 днів тому +1

    This is actually exactly how the turtle and hare algorithm works for arrays .Given an array on N+1 elements with numbers 1 to N, with only 1 element being repeated, you can actually find the repeated element using this concept. Though the algorithm is a little different, the concept is very similar. You can maybe make a video on that. It's a very interesting problem and a beautiful variation of Floyd's algorithm.

    • @miloszforman6270
      @miloszforman6270 14 днів тому

      I wonder how you could find the one duplicate element using Floyd's algorithm. You may find it by chance if you use a random element to start with, but usually it would require to examine the complete loop structure. Or doesn't it?

  • @Rehankhan-us8tv
    @Rehankhan-us8tv 3 місяці тому +19

    Mr beast should do this

    • @harduttsharma7220
      @harduttsharma7220 6 днів тому

      Yea

    • @rykim3107
      @rykim3107 5 днів тому

      I would love to see a guy strategizing this but with that one dumb guy who doesn’t believe this srategy and fucks it all up by going at random😂

  • @billrexhausen4221
    @billrexhausen4221 Рік тому +160

    Writing a research paper and still telling the reader to figure it out for him or herself is peak professor energy.

    • @manstuckinabox3679
      @manstuckinabox3679 Рік тому +1

      T h e p r o o f o f t h i s i s t o o m a g n i f i c e n t f o r t h i s b o o k.

    • @pieriniedoardo5839
      @pieriniedoardo5839 Рік тому +1

      And people still wonder why math graduates tend to hide in the woods sending bombs to people

    • @rinnegone377
      @rinnegone377 Рік тому +4

      Why are the replies gone?

    • @irrelevant_noob
      @irrelevant_noob Рік тому +3

      @@rinnegone377 Happens sometimes. I'm guessing either they were removed individually, or the accounts have been poofed. 🤷‍♂️

    • @MK-fg8hi
      @MK-fg8hi Рік тому

      It would be really awesome to see the original reviews of that paper (from when is was submitted to publication). I bet those reviewers were also beaming with professor energy 😂😂

  • @chriswasia413
    @chriswasia413 Рік тому +369

    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!

    • @ace10414
      @ace10414 Рік тому +13

      I'm writing my own simulation for this, and I'm not getting the same results. Could I see your code please? I'm thinking I'm doing something wrong and looking to learn.

    • @saurabhkumarsingh3986
      @saurabhkumarsingh3986 Рік тому +4

      Yes please a github link would be appreciated. More to learn

    • @muhammadmaazwaseem7452
      @muhammadmaazwaseem7452 Рік тому

      Following

    • @Liberty46
      @Liberty46 Рік тому +8

      @@ace10414 he lied

    • @imranq9241
      @imranq9241 Рік тому +14

      I did a simulation and got about 29% chance. So seems pretty accurate. I'll share my code if anyone wants to see it

  • @rueby2kool
    @rueby2kool 19 днів тому

    STEINER VOICE: When you don't use this strategy your odds drastic go down.
    This is a great video! Very interesting and incredibly well editted

  • @MinecrafterLawl3456
    @MinecrafterLawl3456 Місяць тому

    On checking 50 boxes, the chance goes up to 100% after allowing for communication afterwards so long as each prisoner keep track of their loop number. There can be only one loop larger than 50 so by addjng the remaining loops number up we get a number X. Taking 100-X-50 we get the length of chain remaining in the loop. We shift everyone down the loop by that number and everyone gets out

  • @WiiAndii
    @WiiAndii Рік тому +637

    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.

    • @Vfulncchl
      @Vfulncchl Рік тому +38

      Ah, he should have said that in the video, that is actually a good explanation

    • @Vfulncchl
      @Vfulncchl Рік тому +20

      So in order to get back to the initial box picked, with your number on it, you have to find the right slip. If you find the slip you are good. So your number HAS to be in the loop that also contains the box with your number. Hence, if the longest chain is 50 or less, everyone will find their number. Damn it actually makes sense now

    • @john_hunter_
      @john_hunter_ Рік тому +2

      That's a good way of thinking about it.

    • @filipposchiabel
      @filipposchiabel Рік тому +27

      @Any Body no, it isn't: every prisoner has a *unique* number, so you can't find 2 boxes that bring you to the same box

    • @WiiAndii
      @WiiAndii Рік тому +11

      @Any Body The way the riddle is set up this shouldn't be possible. If each slip exists only once, box 23 can't have slip 54, because that slip was already in box 7.

  • @rashadisayev
    @rashadisayev 11 місяців тому +640

    The best thing about this loop strategy would be if someone finds their number in their last chance of opening a box, they make sure that they will be freed since if one 50 length loop exists, the others can be maximum 50 length

    • @lethalwolf7455
      @lethalwolf7455 10 місяців тому +73

      Friend! None of the other comments or the video itself allowed me to understand this. But your comment just did! Just visualized what you said and now I get it. Sincere thanks!

    • @Ren-fo4lg
      @Ren-fo4lg 10 місяців тому +47

      I’ve read this multiple times and each time I flip flop between understanding and not understanding

    • @rashadisayev
      @rashadisayev 10 місяців тому +9

      @@lethalwolf7455 Happy to have helped you to understand because I, too, hardly understood it after reading some comments

    • @JJforShie1
      @JJforShie1 10 місяців тому +1

      @@Ren-fo4lg lol me too

    • @yourtinerary
      @yourtinerary 10 місяців тому +2

      This comment is 🙌🏻

  • @CimolOk-nz5yj
    @CimolOk-nz5yj 20 днів тому

    🎯 Key Takeaways for quick navigation:
    00:00 *🧩 Introduction to the 100 Prisoners Riddle*
    - Introduction of a counterintuitive riddle that challenges perceptions, even after the solution is known.
    - Mention of widespread confusion and incorrect explanations on the topic.
    - Setup of the riddle involving 100 prisoners and a unique challenge they face.
    02:02 *🤔 The Counterintuitive Solution*
    - Explanation of how a seemingly impossible probability can be significantly improved with the right strategy.
    - Introduction of the concept of mathematical strategy to solve the riddle.
    03:11 *🔄 The Loop Strategy Explained*
    - Detailed explanation of the loop strategy for prisoners to increase their survival odds.
    - Illustration of how this strategy transforms theproblem and its solution.
    05:44 *📊 Probability and Loops*
    - Analysis of how loops determine the success of the strategy.
    - Introduction to the calculation of success probability based on loop lengths.
    09:46 *🤝 Impact of Strategy on Individual Probabilities*
    - Discussion on how the loop strategy affects individual and collective probabilities.
    - Clarification of misconceptions regarding loop participation and success rates.
    12:43 *🛡️ Countermeasures and Adaptations*
    - Exploration of scenarios involving external interference with the strategy, and how prisoners can adapt.
    - Insight into the resilience of the strategy against manipulation.
    14:15 *📈 Scaling the Problem*
    - Examination of the problem's scalability and the consistent success rate across different prisoner numbers.
    - Explanation of the mathematical limit of the strategy's success rate.
    16:44 *💡 Learning from the Riddle*
    - Conclusion highlighting the educational value of the riddle and its implications.
    - Promotion of a platform for further learning and problem-solving skills development.
    Made with HARPA AI

    • @miloszforman6270
      @miloszforman6270 16 днів тому

      Now please let Harpa AI explain how this peculiar 1/n formula works, and where this 31.18% winning chance comes from.

  • @300andDeadStraight
    @300andDeadStraight 4 місяці тому +1

    Describing why the prisoners open the box with their number is the hardest part of this video. Destin asked a valid question "How do I know my number box is on the loop which contains my slip?"
    Once you visualize how it works, that question seems super silly to ask despite the brilliance of said question. It's the natural question to ask despite us all understanding and agreeing to the concept of loops and how they behave in this thought experiment. *The first box opened is the only slip number that's guaranteed to be in that loop.*
    Simply put, because loops are loops. If every slip correlates to the new box, you will inherently open boxes until you open a box that points you back to the initial box. Thus, you will find your slip. Thus, you complete the loop. Derek even says "you are always starting the loop directly after the slip with your number" or something similar.
    If you run the test a couple of times on a loop, you will see the pattern and why it all works.
    *Warning: science below*
    Let's suppose we have a loop of 15 numbers. Using a random number generator (RNG), we get the following 15 numbers:
    8 68 1 27 70 94 76 71 12 84 21 45 97 58 37
    These 15 numbers are both a collective of boxes and slips.
    Let's call the box numbers as they are currently listed:
    8 68 1 27 70 94 76 71 12 84 21 45 97 58 37
    The slip numbers, are exactly the box numbers but with a shift of 1 place.
    68 1 27 70 94 76 71 12 84 21 45 97 58 37 8
    Thus, the "paired loop" that Derek demonstrated with notecards would look like:
    8 68 1 27 70 94 76 71 12 84 21 45 97 58 37 (Box number)
    68 1 27 70 94 76 71 12 84 21 45 97 58 37 8 (Correlating Slip)
    Notice the diagonal correlation.
    The first box opened is the only slip number that's guaranteed to be in that loop but it's always going to be the last slip that is revealed. In this instance, prisoner 8 starts by opening box 8 and finishes when opening box 37 to reveal slip 8. All 15 prisoners who are a part of this loop will open exactly 15 boxes and always find their slip on the 15th box. In theory, the connecting 14 numbers could be anything but we know for certain what the first box number and the last slip number will be (see below)
    8 xx xx xx xx xx xx xx xx xx xx xx xx xx xx (Box number)
    xx xx xx xx xx xx xx xx xx xx xx xx xx xx 8 (Correlating Slip)
    Prisoner 68 would start on box 68 generating the following variation of the same loop:
    68 1 27 70 94 76 71 12 84 21 45 97 58 37 8 (Box number)
    1 27 70 94 76 71 12 84 21 45 97 58 37 8 68 (Correlating Slip)
    Again, the only guaranteed slip to be in this loop is the number 68 slip which we find in the 15th box.
    68 xx xx xx xx xx xx xx xx xx xx xx xx xx xx (Box number)
    xx xx xx xx xx xx xx xx xx xx xx xx xx xx 68 (Correlating Slip)
    Really hope this helps to clarify the question that many of us asked to ourselves while watching.

  • @hunterbroadnix9609
    @hunterbroadnix9609 Рік тому +311

    I work in irrigation and we actually use closed loops like this! If I have zones numbered from 1-10 (for houses 1-10) but the stations do not follow the order of the houses, we just pick the first wire and move it to the correct order (for example: station 5 is house 1; put station 5 wire into station 1 slot, and station 1 into the next assigned order; repeat until finished). I’ve had 2-3 closed loops and always thought it was fascinating, really neat to see a video that carries into the profession!

    • @frogbutts3628
      @frogbutts3628 Рік тому +34

      Do you get executed if you mess it up?

    • @JA-nv4zb
      @JA-nv4zb Рік тому +1

      that is so cool

  • @Campfire_Bandit
    @Campfire_Bandit Рік тому +596

    It's a small thing but I find Destin's response to your claim (5 seconds of deep thought followed by "teach me") is inspirational. He switched gears so fast from peer to student, it's the kind of attitude I want and he makes it look so simple.

    • @-PSJ
      @-PSJ Рік тому +4

      I actually think 5 second of thought is still too short

    • @ericlevy3317
      @ericlevy3317 Рік тому +24

      The best teachers never stop being students.

    • @RJFerret
      @RJFerret Рік тому +6

      Instead of having separate peer/student relationships, perceive every relationship as potential for learning, we can learn from young children, learn from old wisdom, learn from other perspectives, learn from animals, which is why Destin's reaction appears so simple, because he is always seeking to learn, it's not being in a learning mode, it's just a constant way of living/learning. This will sound trite, but instead of being inspired by it/want to do it, instead just do it, seek out what you might learn from any interaction, there's always something!

    • @bruhbutton4520
      @bruhbutton4520 Рік тому +6

      Dudes so honest and genuine. I strive to be like him

    • @yossam6722
      @yossam6722 Рік тому +2

      A true master is an eternal student.

  • @heatherschoppmann9971
    @heatherschoppmann9971 Місяць тому

    This makes total sense! Thanks we loved it

  • @anwinkrishna2849
    @anwinkrishna2849 2 місяці тому

    this guy is the bestttttttt.... we need more content like this .... i love interesting stuff like this

  • @testingreadaboutit
    @testingreadaboutit Рік тому +84

    8:25 - That flip to unexpectedly new stuff on the whiteboard was so smooth. Nice job.

  • @TomasJuocepis
    @TomasJuocepis Рік тому +228

    The puzzle is even more interesting if it's modified to say that the first prisoner is allowed to check all boxes and make one swap. Then telling that there exists a strategy which guarantees success sounds even more incredible.

    • @markmuller7962
      @markmuller7962 Рік тому +2

      I love it
      Still we most hope that the prisoner in question swaps the longer loop instead of a smaller one

    • @TomasJuocepis
      @TomasJuocepis Рік тому +13

      @@markmuller7962 prisoner only needs to check 50 boxes to guarantee they can always swap in a way that ensures no chain is longer than 50 after the swap. The only reason the first prisoner needs to be allowed to check all boxes is so that they themselves are guaranteed to find their own number. The puzzle can also state that all prisoners can check only 50 boxes, but the first one can do a swap, while the rest must find their number.

    • @yosefsl30
      @yosefsl30 Рік тому +5

      it is not 100% guaranteed, still needs to choose the correct loop...

    • @markmuller7962
      @markmuller7962 Рік тому +5

      @@TomasJuocepis I know how the riddle and the riddle solution works.
      Thing is, if the first prisoner swaps a loop of 4 boxes he only creates 2 loops of 2 boxes while the eventual 50+ loop stays intact and it's gonna kill the prisoners.
      The benevolent guard in the video either knows all the numbers inside the boxes or gets "lucky" by swapping the cards of the longest loop

    • @markmuller7962
      @markmuller7962 Рік тому

      @@yosefsl30 Right

  • @scottcincinnatikud9804
    @scottcincinnatikud9804 13 днів тому +1

    Love Riddles. Thanks for the video. I have a flaw on this one. Not sure if you mentioned that no box ever has its own number in it? If not then not all numbers would be part of a loop. So if the second box you go to has its own number what do you do? Maybe missing something.

    • @triganden
      @triganden 10 днів тому

      If the second box you go to has its own slip what made you go to that box from the first box? Presumably a copy of the slip contained in the second box. But there's only one of each slip so this is impossible. However, that's not to say that any box couldn't have it's own slip e.g. @4:15. but each would always be a "first box".

    • @scottcincinnatikud9804
      @scottcincinnatikud9804 9 днів тому

      Good point. Didn't think of that. Knew was missing something. Thsnks.

  • @NickName-jz7mn
    @NickName-jz7mn 5 місяців тому +3

    Even when the prisoners pick at random, their numbers are still on a loop, just not coordinating with others to all start at with different number (not the same as any other prisoner). I think that is what seems so "off" with this.
    I LOVE VERITASSIUM

    • @thetaomegatheta
      @thetaomegatheta 5 місяців тому +8

      'Even when the prisoners pick at random, their numbers are still on a loop'
      Not guaranteed to be on the right loops, and they do not proceed to follow those loops.

    • @kenthomas4668
      @kenthomas4668 5 місяців тому

      @@thetaomegatheta they are always on the right loop, the question is how long is their loop

    • @thetaomegatheta
      @thetaomegatheta 5 місяців тому +3

      @@kenthomas4668
      'they are always on the right loop'
      That's trivial to disprove.
      Consider the situation where all loops are of length 1. Consider now that a prisoner picks a box at random and does not chooses the box with their number. They are now not on a loop with their box, and, therefore, not on a loop with their slip.

  • @mattsnyder4754
    @mattsnyder4754 Рік тому +448

    The real “magic” of this solution is that it ties the probability of success to one single condition (the state of the “loops” in the boxes) instead of a repeated condition (the odds of each prisoner finding the correct number).
    You’ve immediately removed the exponential scaling of the probability. So even if you choose a sub-optimal method. Any method that is based on a single fixed condition is immediately an improvement.

    • @giangtran-to6tb
      @giangtran-to6tb Рік тому +1

      ok

    • @daburnd
      @daburnd Рік тому +6

      That is quite certain indeed. But i think vertasium forgot that not everything will form a loop as a set of boxes can end up with a box that has its own number.

    • @duitakarbhat
      @duitakarbhat Рік тому +35

      @@daburnd lol no he didn't forget that. In fact, you start off with that. Hence, in your scenario, you'd find your number in the first attempt.

    • @daburnd
      @daburnd Рік тому +2

      @@duitakarbhat that is only for the only for the prisoner that has the number of the box containing its own number. But not for the x - amount of boxes leading up to that one in the pointer line-up. For example : Box 1 points to box 2, box 2 points to box 3, box 3 points to itself. Hence, not everything needs to be a loop ( it can be a finite non looping set ), unless u put up the constraint that no box can contain its own number. Just handling this case asif it could only be closed loops therefore seems not logical.

    • @hO_Oman
      @hO_Oman Рік тому +35

      @@daburnd if both boxes 2 and 3 point to box 3, it means they both contain the same number, 3. that's not allowed

  • @wearwolf2500
    @wearwolf2500 Рік тому +213

    I think the key to understanding why you are always in the loop that contains your number is that the slips are all unique. The only number that can complete the loop is your own because that's the only slip that can point back to another box you have already opened. If you open box 3 and find a 5 and then open box 5 to find a 7 you can't open box 7 and find another 5. It will either by 3 to complete the loop or a number you haven't seen already.

    • @cameodamaneo
      @cameodamaneo Рік тому +27

      I think this might be a better explanation than the video

    • @happywhale1786
      @happywhale1786 Рік тому +1

      I think the key to understand is "there are only loops". And loops always go back to your start.
      ---
      My first thoughts viewing his proof are:
      Then why there are always only loops?
      => Or in other words why only loops can fullfill the requirement for a set of 1 to 1 pair to be all contained?
      => OR why the 1to1 and one-direction basic structure can only form a line or a loop?
      oh, this can be easily proven with induction.
      ---
      So we have the basic: there can be only lines and loops.
      ---
      why there are only loops is because the structure can only form lines and loops. Since lines has slip outside of box which is invalid in our scenario, there can only be loops.

    • @Akronox
      @Akronox Рік тому

      For me, it was simpler to consider that the box and the number must be part of the same loop regardless of its length. Any box must be part of a loop that points to itself since all numbers are unique and are just a permutation, the worst case is just having to go through all the boxes. So if you start with the box with your number you know it is part of the correct loop.

    • @paulparker1425
      @paulparker1425 Рік тому +4

      For me, I just tried to break the strategy. How? By imagining that I didn't find my number for the first 99 boxes. That final box MUST complete the loop, there's no possible alternative and that's the WORST case. Every other combination (loop) containing fewer boxes will terminate faster at my number because that's the terminating condition.

    • @Akronox
      @Akronox Рік тому +4

      Actually, it is because of the definition of the loop, all boxes and corresponding numbers must be part of the same loop. Since the number in the box gives you the box that gives the next number and so on and the loop can only end with the original box and the loop has to end.

  • @LotusMouse
    @LotusMouse 2 місяці тому

    I’ve actually seen the Ted Ed version of this with the band members, and I’ve been wondering how accurate the strategy is. So finding this video was a pleasant surprise to come across

  • @chapteronefrog
    @chapteronefrog Місяць тому

    It's basically just opening a box that lights up the next one, the circle just gets bigger as you increase the number of boxes bc you're not changing the percentage of boxes the prisoners can check. If you increased the percentage as the amount got bigger, then it would change the rate if success but bc it's 50% for EVERY amount, the success rate stays relatively the same. The only thing that makes it smaller is the increased number of possible loops

  • @BigPapaMitchell
    @BigPapaMitchell Рік тому +300

    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.

    • @irakyl
      @irakyl Рік тому +35

      I was thinking the same thing, his explanation with the link at 11:25 wasn't very helpful. He should have instead hammered on the point that you could never fail to find your number, you will never have to try again and find a different loop. When Dustin said "I feel like it's possible that you start with the loop but don't end up finding your number", Derek should have said "And what would that look like?" at which point you realise pretty quickly that it's impossible, and thus loop length is the only factor that determines your succes.
      Perhaps Derek could also have spent a little more time analysing the situation before starting his explanation. If the viewers felt like they discovered the properties of the loops themselves it would feel much more intuitive.
      Edit: if you still feel like this is unintuitive, like this is cheating math somehow, that this shouldn't be possible, consider the following: there is only one 'check' to see if the experiment is a succes or a fail, it's right at the beginning, if the starting configuration has a loop of 51 or higher. Imagine if the box configuration was rondomised for each individual prisoner, then the chance of all 100 of them passing would be astronomically low again, and all is right in the world.

    • @MasterHigure
      @MasterHigure Рік тому +8

      @@irakyl Derek should've said "Then how would you manage to loop back to the box you started at?" Assuming we all agree beforehand that these are closed loops, I think that's the easiest argument for why you must be in the correct loop.

    • @godgige
      @godgige Рік тому +3

      @@MasterHigure interestlingly I found that explanation to be perfect for my taste, but it might be that I already understood why is that (the loops) beforehand. Anyways great video!

    • @DanielReyes-pr1rd
      @DanielReyes-pr1rd Рік тому +1

      Your right everyone is on the chain, but not being on the chain is just a death sentence for the other prisoners, not the one who had just found his number. i dont really know what the point of this is besides just being an exercise. although when your sitting in front of a computer all day you start to come up with creative ways of thinking

    • @bumpsy
      @bumpsy Рік тому

      I thought that was kinda obvious as soon as Derek presented the strategy. Obviously there cannot be any dead ends when each number is still in one of the boxes. I.e. no empty boxes and no boxes with no number on them, which is obviously both not possible here

  • @user-hw9xe4lm2s
    @user-hw9xe4lm2s Рік тому +259

    Intuitively, the solution was difficult to grasp. But it makes a lot of sense when he explains the math behind the problem. Sometimes our intuition can only take us so far. This video has made me really appreciate the value of math as a problem solving tool in a way that no traditional math class could.

    • @gorak9000
      @gorak9000 Рік тому

      Your "intuition" definitely leads you down the wrong path in probabilities at least 76% of the time. The human brain is just not wired to deal with probabilities intuitively (and also 95% of statistics are completely made up)

    • @legendgamer204
      @legendgamer204 Рік тому +4

      I thought of a nice way to phrase why the strategy works: the strategy works to reduce the amount of variation between prisoners' sets of guesses. This reduces the amount of things that have to go right for a successful outcome, just like flipping 3 coins instead of 10.

    • @Takin2000
      @Takin2000 Рік тому +10

      It becomes more intuitive when you first find a way to increase your odds _at all_ .
      A simple way to increase your odds is this simple method:
      First prisoner picks boxes 1 - 50.
      Second prisoner picks the boxes 51-100
      If the rest picks at random, your probability of winning is higher than everyone picking at random. Why?
      Well, the first prisoner has a 50% chance of winning. No changes here. However, the second prisoner has a slightly higher chance because:
      if the first prisoner found his number, that means that numbers 51-100 DONT contain the first prisoners number. For the second prisonder, that is one guaranteed failing option removed.
      If the first prisoner did NOT fond his number, then it must be in one of the boxes that the second prisoner is checking.
      _This doesnt matter though because the first prisoner lost already_
      Meaning: *decreasing your odds in the case that someone before you lost doesnt decrease the odds of the whole game* .
      Thats also why the loop strategy works: It trades individual win% to increase collective win% because if one prisoner already lost, then the rest of the prisoners also losing doesnt hurt your odds

    • @thomasmaughan4798
      @thomasmaughan4798 Рік тому

      Figuring out this loop structure does not seem like math. I'm not sure what it is, but it isn't something you can pop into a calculator or slide rule. Math easily finds the odds (the permutations) and it is a really big number. Your calculator will probably choke on 100 factorial.

  • @MissShaneice
    @MissShaneice 5 місяців тому

    the board that snaps in place is an amazing thing. genius product! i did watch the video, and i get it, but it's a lot. my brain gave up a long time ago. lol.

  • @tegxi
    @tegxi Рік тому +315

    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.

    • @hishaam5429
      @hishaam5429 Рік тому +1

      Why can’t u have no slips pointing to 1

    • @Mrityunjay7
      @Mrityunjay7 Рік тому +29

      @@hishaam5429 There are 100 unique numbers and 100 unique boxes so having 2 numbers that are the same is a contradiction
      Thus there cannot be 2 boxes pointing to 2
      Which further implies that there must be one box pointing to the number 1

    • @tegxi
      @tegxi Рік тому +21

      @@hishaam5429 the rule is that every prisoner has a slip somewhere. the game would be rigged if prisoner 1 had no slip

    • @Random-zt4ig
      @Random-zt4ig Рік тому +6

      Your explanation is fantastic. Traveller!

    • @reidflemingworldstoughestm1394
      @reidflemingworldstoughestm1394 Рік тому +5

      @@hishaam5429 you could have a loop with 99 slips that don't point to 1, but then box 1 would have to contain a slip that pointed to box 1 -- a loop of size one.

  • @tomgray8156
    @tomgray8156 Рік тому +482

    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.

    • @kevinbean3679
      @kevinbean3679 Рік тому +15

      Especially going the opposite direction to shoe that approximately 69% of the time, the prisoners get executed.
      Rather morbid problem 😅

    • @Legendendear
      @Legendendear Рік тому +13

      @@kevinbean3679
      69?
      Nice!

    • @AvanaVana
      @AvanaVana Рік тому +3

      Same, I knew that it had to be able to be related to some nice little expression. Now I’m trying to figure out how and if the “2” in 1 - ln(2) is related somehow to the ratio of choices per total boxes the prisoners are allowed to make

    • @giyanvice
      @giyanvice Рік тому

      So out of hundred groups made up of 100 Prisoners, only 31 groups will get all the answers and go home, the rest 69 groups will have to die.

    • @nimrod06
      @nimrod06 Рік тому +4

      @@AvanaVana It is obvious if you do the integration. int^2n_n 1/x dx = ln (2n) - ln (n) = ln 2, and that upper limit of 2 is the ratio you mentioned.

  • @yusufuveysdurudeniz2341
    @yusufuveysdurudeniz2341 5 місяців тому

    What seems wrong was about we are thinking like solving a random coordinat system problem however problem or equations contain more symetry than we are aware of. Therefore, we are dealing with x,y expression of a circle's equation when be get back to our model of coordinat system problem.

  • @basimqasim7113
    @basimqasim7113 4 дні тому

    i made a smaller version of this riddle by decreasing the number of participants to 4 and i made artificial intelligence to randomly pick numbers for me
    with the loop strategy they succeeded 5 times out of 10
    with random picking they didn't succeed in 10 trials.
    it was really fascinating.

  • @SwiftDustStorm
    @SwiftDustStorm Рік тому +342

    As a programmer, this reminds me of cyclic sort, and we deal with cycles all the time. Once you explained the strategy, it instantly blew my mind. Very clever solution!

    • @rachadelmoutaouaffiq5019
      @rachadelmoutaouaffiq5019 Рік тому +10

      Linked lists :))

    • @codahighland
      @codahighland Рік тому +13

      @@rachadelmoutaouaffiq5019 The worst kind of list!

    • @markingraham4892
      @markingraham4892 Рік тому +1

      It's a idiotic video. Any system to consistently search boxes would have the same result.

    • @codahighland
      @codahighland Рік тому +28

      @@markingraham4892 Uh... no, that's not true at all. It's true that other systems CAN have equally good results (nothing better) but not ALL systems will. Take, for example, the system of "everyone search the first 50 boxes." That's a consistent way to search, but it would obviously fail.

    • @SwiftDustStorm
      @SwiftDustStorm Рік тому +5

      @@markingraham4892 care to elaborate?

  • @sorensouthard927
    @sorensouthard927 5 місяців тому +1

    Basically it boils down to a function of the loops rather than however many given instances of choice. It's just the chance of a loop greater than half of the total numbers emerging.

  • @prathammathura
    @prathammathura 4 місяці тому

    this is definitely one of the best video ever i seen

  • @Lindeman08
    @Lindeman08 Рік тому +421

    10:55. Because the system was explained so well I did not find this confusing at all. You're gonna be on the right loop as long as you pick the box with your number. The only question remaining is how long that loop is.

    • @AmxCsifier
      @AmxCsifier Рік тому +15

      Well, Destin still didn't watch the Veritasium video back then

    • @AnthonyGoodley
      @AnthonyGoodley Рік тому +1

      @unfaithfulevil 🅥 Your a joke. You have no content!

    • @lanceslance2930
      @lanceslance2930 Рік тому +5

      @unfaithfulevil 🅥 that checkmark looks slightly off and then I realized lmao

    • @magica3526
      @magica3526 Рік тому

      but like also thats a bit of a silly question, as is derrick's answer. The only way to complete the loop is to find the correct slip.

    • @dries-pederjanse6249
      @dries-pederjanse6249 Рік тому +1

      For me he has a false title

  • @grys9245
    @grys9245 Рік тому +636

    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!

    • @adolforodolfo6929
      @adolforodolfo6929 Рік тому +5

      Good stuff.

    • @Harshil_Uppal
      @Harshil_Uppal Рік тому +35

      Bruh how do you even code that?

    • @ramsyfpp6418
      @ramsyfpp6418 Рік тому +26

      @@Harshil_Uppal it would be easier in javascript
      But it's very easy anyways

    • @HEYJO77
      @HEYJO77 Рік тому

      nice

    • @Linaiz
      @Linaiz Рік тому +43

      @@Harshil_Uppal Maybe have an array of numbers, size 100. Fill the array randomly with values from 1 to 100. Then, every prisoner searches the array. Every prisoner can have up to 50 attempts. You use the strategy of "index_to_search = array[index_to_search]", where on the first attempt, "index_to_search = prisoner_number". Each search must last less than 50 attempts. If prisoner_number != array[index_to_search] and attempt > 50, the experiment fails.

  • @taitsmith8521
    @taitsmith8521 5 місяців тому +1

    I like that the guy who came up with the problem is lauded, while the peraon who solved it is written off as "a colleague ".
    What you really mean is the janitor figured out the solution and he's embarrassed .

  • @AGill-mx8bj
    @AGill-mx8bj 4 місяці тому

    Bro, you are just a genius. Most people can’t solve this problem. There is just hard. I am watching this so I can come up with an algorithm so a computer can do it.

  • @kristjanbrezovnik6485
    @kristjanbrezovnik6485 Рік тому +648

    Destin's "Teach me." is possibly the greatest example of doing science right. Or, you know, something to that effect. :D Possibly both most humble and most epic answer ever.

    • @terryarmbruster9719
      @terryarmbruster9719 Рік тому +7

      And not created by them at all. Its a category theory loop. Took this s over 35 years ago. The same problem but worded different as in not prisoners is shown and proven in elementary category theory. Don't need all that stats to prove or show s. All one needs to know is how to categorize the problem and check where the functions associate then if s running link function appears. Lol category theory is like a cannon that swats fly problems like that

    • @DevinDTV
      @DevinDTV Рік тому +3

      it's not that deep or interesting to want to be taught something lmao

    • @JackFate76
      @JackFate76 Рік тому +6

      @@DevinDTV But it‘s humble and epic.

    • @Dylan_Did_A_Thing
      @Dylan_Did_A_Thing Рік тому +8

      right? I love it, it gave me chills to hear because I feel like it's such a rare thing these days for people to admit they don't know something, let alone for them to actually ask to learn it

    • @Hansulf
      @Hansulf Рік тому +2

      I felt the same

  • @shivamchouhan5077
    @shivamchouhan5077 Рік тому +61

    9:14 Lol, NICE number

  • @finallylegal2125
    @finallylegal2125 2 дні тому

    The solution itself is pretty intuitive. What struck me after some thought, was that if you instead replaced the numbers with a more ambiguous marker, like a color, this strategy seems almost impossible to stumble on, because you wouldn’t have a reference number to start with. You’d have to go into it labeling unique numbers for each color amongst the group FIRST, and then start by searching the box the corresponds to you numbered color.
    In other words, unless you’ve come across this strategy before, with each prisoner wearing a different COLOR and the boxes being labeled with NUMBERS, it’d seem as if searching randomly is your only option. Somehow in this case, arbitrarily assigning numbers to each color and then using this strategy, works to improve the odds of success for the whole group. That I think would be more mind blowing, because you’re not clued in to use numbers to figure out the loops.
    Edit: TLDR, as long as you can form closed loops that stays consistent when every group member starts searching, the strategy works. You don’t even have to use numbers!! 🤯

  • @knucklefucker
    @knucklefucker 2 місяці тому

    An almost practical application of Gabriel's Horn, or at least a slice thereof. Neat!

  • @smartereveryday
    @smartereveryday Рік тому +996

    Thanks for teaching me.

    • @jhaz89
      @jhaz89 Рік тому +9

      You're welcome

    • @daivomjoshi56
      @daivomjoshi56 Рік тому +4

      Hey destin when is your 2nd part of "Kodak film making" video coming ?

    • @Ryanisalive
      @Ryanisalive Рік тому +2

      There you are!

    • @alberteinstein9626
      @alberteinstein9626 Рік тому +3

      Thanks , @SmarterEveryDay ,, you just questioned the same questions we had watching and following by you 👍🏻

    • @strikerj_
      @strikerj_ Рік тому +19

      2:23 "Teach me." is one of the best responses ever

  • @cherkovision
    @cherkovision Рік тому +136

    I have noticed that whenever my family does a secret-Santa draw, the ten of us are more likely to exchange gifts in two loops of 4-6 rather than a big loop of 10. Same principle I guess.

    • @lck0ut348
      @lck0ut348 Рік тому +7

      I got in a loop of 3 out of 20something coworkers for secret santa last year, so that checks out

  • @morgangrosdidier1654
    @morgangrosdidier1654 6 днів тому

    Video: mentions the probability of finding their number approaching a limit
    Me: shudders at being reminded about derivatives

  • @phillard8653
    @phillard8653 6 місяців тому +1

    This loop logic is very reminiscent of solving rubik's cubes blindfolded, but in that case this type of method is used more for ease of memorization than any probability. You just have to memorize the order of steps in a loop.

  • @lukegorman4523
    @lukegorman4523 Рік тому +533

    The loop strategy was very easy for me to understand once you gave the solution, because it is actually the same concept that is used to solve a Rubik's Cube blindfolded. The pieces can be moved around into many different permutations, but they from loops (called cycles) which you can memorize the order of to solve it without even looking at the cube. Very interesting how two unrelated problems can be solved in the same way.

    • @mikebarrientos5085
      @mikebarrientos5085 Рік тому +16

      So in the rubik's case, there's also a 31% chance of solving it blindfolded?

    • @lukegorman4523
      @lukegorman4523 Рік тому +54

      ​@@mikebarrientos5085 No, because you can look through the whole thing. Essentially, the 31% chance is if there is a cycle greater than half of the total number of pieces, and that is not important in the rubik's case, because there is no constraint about only looking at half the pieces.

    • @mikebarrientos5085
      @mikebarrientos5085 Рік тому +4

      @@lukegorman4523 ohh makes sense

    • @rajithanw555
      @rajithanw555 Рік тому +1

      I still cant understand how you'd solve rubiks cube blindfolded. I mean i can do it in 40 seconds with carefully watching the thing.

    • @oscaar_3985
      @oscaar_3985 Рік тому

      Wow I’ve always been scared of trying to learn blindfolded but this comment gave motivation, thank you:)

  • @InterestingMindsYT
    @InterestingMindsYT Рік тому +1939

    and what if you work with time, lets say some people are slower then others, they also say nothing about time!, lets say every number is a = minut, and the second person to move in only can go in if the other out. what if they make a plan, that the amount of minuts somebody is gone is equel to the box that contains there specifik number. and if they dont find it they need to wait exactly 102minuts. ( because its more then 100 boxes = 1 box a minute) by that way the poeple that are waiting only have to count everytime and remember only 50 numbers ( and they have really long time for that) if they know 50 numbers thats not there number or a little bit less) the chances of cracking this code will also improve by multi trillions? correct me if am wrong

    • @entropie-3622
      @entropie-3622 Рік тому +28

      Technically that counts as communication.
      In practice the warden can easily set things up to prevent this anyways for example by giving each prisoner a fixed time window in which they have to be done and always waiting for the whole window even if a prisoner is done early before letting the next prisoner in.

    • @Karperteamdelo
      @Karperteamdelo Рік тому +6

      @@entropie-3622 yeah thats true! but you can also say if they randomize the boxes everytime they enter, then this solution wil also not work

    • @Karperteamdelo
      @Karperteamdelo Рік тому +1

      and lets say it even did, they said nothing about time?

    • @entropie-3622
      @entropie-3622 Рік тому +7

      @@Karperteamdelo The rules do generally say that communication is forbidden, not just verbal communication.
      Essentially this means any transfer of information between prisoners is forbidden no matter what medium is used to transfer the information, this includes subtle means like using time as well.

    • @SnailHatan
      @SnailHatan Рік тому +1

      Communication is inherently impossible in the scenario, so they couldn’t do that.

  • @TheNathan696969
    @TheNathan696969 5 місяців тому +16

    thinking outside the box, inside the box 😂 very easy to understand once you mentioned the loop I understood everything. I can not fathom how people would come to the summation of being on the wrong loop or how more prisoners gives diminishing returns 😅 it was pretty self explanatory. Loved it

  • @crystalprice1942
    @crystalprice1942 16 годин тому

    Before I watched the solution, I pretended I was doing your puzzle as a prisoner. I kept thinking the goal and that was either to stay alive or be released. Since there was a strong sense of impeding death, I would choose not to participate. But then the statistician in me got the better of me.

  • @tim..indeed
    @tim..indeed Рік тому +140

    I feel like I'd rather die than trying to explain to my co-prisoners why this works.

    • @wengserena7768
      @wengserena7768 Рік тому

      🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣

    • @secheltfishmarket6419
      @secheltfishmarket6419 Рік тому

      "Why this works"???
      Do you not watch the same video I did. It fails 69% of the time.

    • @WaynaPicchu05
      @WaynaPicchu05 Рік тому +1

      @@secheltfishmarket6419 "So you're telling me there's a chance!"

    • @itskelvinn
      @itskelvinn Рік тому +1

      @nijuo joing comes off as fake and forced for the video tbh. But then again destin always interrupts his guests on his videos and blurts out dumb off topic jokes like he’s Jimmy Fallon or something

    • @SquirrelTheorist
      @SquirrelTheorist Рік тому

      @@itskelvinn rly?

  • @Hannah123605
    @Hannah123605 Рік тому +32

    Classic Destin strategy - when stumped with a problem, ask with true interest and humility say “teach me”

  • @JMacSD
    @JMacSD 5 місяців тому

    When first hearing this problem it doesn't seem like there's a solution, but the probability bar graph at 10:24 plainly shows how there can be.
    Using no strategy (so every prisoner picks randomly) gives a bell curve centered at 50.
    using a good strategy gives a crazy distribution with a spike at 100 but still a mean of 50.

    • @miloszforman6270
      @miloszforman6270 5 місяців тому

      A bell curve? A crazy spike at 100? What are you talking about? (I know what a Gauss "bell curve" is, but I can't see any context).

    • @thetaomegatheta
      @thetaomegatheta 5 місяців тому +2

      @@miloszforman6270
      They are talking about the histograms at 10:24. One of them represents a bell curve, and another one has a different distribution, with 100 prisoners escaping having the highest probability density.

    • @miloszforman6270
      @miloszforman6270 5 місяців тому

      @@thetaomegatheta
      I see, I forgot that one. Thanks!

  • @WarpedStone
    @WarpedStone 3 дні тому +1

    It seems to me that the mistake is in grouping the "loops" with the same number as one loop. In fact, it is a line segment because it has a start and an end. 1-100 is different than 2-1

  • @doodoobear4689
    @doodoobear4689 Рік тому +1896

    It would be awesome to someone like Mr. Beast actually do the experiment with people to show it being done.

    • @owlofathena1247
      @owlofathena1247 Рік тому +61

      Omg someone pls send him this video!

    • @ytakarhaegar6666
      @ytakarhaegar6666 Рік тому +31

      I hope mr beast would see this and it would be a pretty good challenge

    • @cubeometry2699
      @cubeometry2699 Рік тому +14

      I thought the same thing 😂 there should be a practicle

    • @shamii_raiiz
      @shamii_raiiz Рік тому

      I thought so too!

    • @wizzzy
      @wizzzy Рік тому +7

      Would be a cool thing to show if it worked, but might be boring with a 69% chance of failure.

  • @jordanwoods3553
    @jordanwoods3553 Рік тому +501

    I feel like the really cruel thing to do would be to allow the prisoners to look at 95-97 boxes, with the same thing. If they figure out the stragegy, it's like a >95% chance of success. If they guess randomly, it's

    • @jackinkc767
      @jackinkc767 Рік тому +8

      What is the probability of prisoner compliance and success if the sheets of paper were face up?

    • @Astro-X
      @Astro-X Рік тому +14

      thats awesome! A much better example to use with people

    • @bensch182
      @bensch182 Рік тому +12

      exactly! try to convince your inmates now! the indivudual 97% seem so much more intuitive than trying to grasp even only that you'll always be on your own loop.. :D
      for nerds who want to avoid using their calculator: (97/100)^100 = 4.75525% (rounded since there was a 0 after the last digit)

    • @krizcillz
      @krizcillz Рік тому

      Oh yeah this is why statistics is a nonsense subject that has no relevance in the real world

    • @pwndbaby
      @pwndbaby Рік тому

      if they opened them randomly at 95 choices each, that would give them a 0.592% chance.
      similarly, you could do this with 4 boxes and 10 friends. let them open up 3 boxes each to try to find something in one of the boxes. If the goal is to win if every one finds what was in the box, then they would have about the same odds.

  • @KipIngram
    @KipIngram Місяць тому

    I saw a video yesterday about how "absolute chaos" is impossible. That is, in any complex system, there is an unavoidable amount of "order" that will be present, no matter what. These loops seem like the same sort of thing. The 100! bit makes this seem wildly unpredictable, and yet these loops can't be avoided - all you can do is control their length.

    • @miloszforman6270
      @miloszforman6270 Місяць тому

      You mean that these loops form a kind of order?

  • @MichaelCon
    @MichaelCon 3 місяці тому +1

    Love the problem and the video. I was expanding to different sized groups. While I agree that P(L=N) = 1/N, I disagree with the explanation at 6:59. The reason P(L=100) = 1/100 is not because of the permutations of the loop (and that logic fails for N < 100). It is because there are only 99 choices for the first box since you cannot choose #1. That would immediately create a loop of size 1. It is therefore 99!/100!, which is 1/100. Same result for a different reason. For P(L=99), there are 100 choices for the first, then only 98 for the second. So (100*98!)/100! = 1/99. Again same answer. Thanks.

    • @triganden
      @triganden 3 місяці тому +1

      He never said there are 100 choices for the slip that goes in box 1. He said there are 100 choices for the "first" box i.e. we take an unlabeled box and stick any of 100 labels on the outside of it. He clearly said he was considering boxes "pointing to" boxes and wasn't paying any attention to what slips would be necessary to go inside to make a chain of numbered boxes work as a loop. If I had three unlabeled box and three slips I have 3 ways to choose the number to go on (not in) the first box, 2 ways for the second and one way for the last (3!) giving 123, 132, 213, 231, 312 & 321 (order permutations). I can take any of these box numbers pointing to box numbers e.g. 213 and insert slips to make it work as a loop: 1 in 2, 3 in 1 and 2 in 3. When this is done for all we find that there are only 3!/3=2 "unique" loops written (123) & (132) in cycle notation. There are also 3! permutations of the slips in the boxes: (123), (132), (12)(3), (13)(2), (23)(1) & (1)(2)(3) so the probability of a 3-loop is (3!/3)/3!=1/3. Same reasoning for 100 boxes was correct. For P(L=99) we have 100!/1! ways to pick a line of 99 numbers of which, when the necessary slips are inserted, only (100!/1!)/99 are "unique". Then there is 1! way to have the leftover box so the total number of permutations with a 99-loop are (100!/1!)/99*1!=100!/99. In general for a k-loop, k>50: 100!/(100-k)! ways to form a chain of k numbers. 100!/(100-k)!/k unique k-loops once necessary slips inserted. (100-k)! permutations for the leftover boxes => 100!/k permutations that have a k-loop. Probability = 100!/k/100!=1/k.

    • @paddie9505
      @paddie9505 Місяць тому

      Thanks for addressing this @MichaelCon and for the explanation ​@triganden . This is the part of the video that I'm struggling with. I feel like I kind of get the explanation of the probability for a loop of size 100. But I could not get to understand why the probability for a loop of size 50 < n < 100 is 1/n.

  • @MoshpitMaestro
    @MoshpitMaestro Рік тому +78

    I love the Destin cameos. His reactions very much mirrored my own, despite him being a LOT more knowledgeable about math than I am.

    • @sac58999
      @sac58999 Рік тому +4

      I agree. When Destin said "Teach me." I thought, "...and that's why I like him." Their honest amazement and fascination with learning make these two great teachers for the layman.