🎯 Key Takeaways for quick navigation: 00:00 🏛️ Issue raised: 100 prisoners need to find boxes with their numbers to be freed, but allowed only 50 tries each. 01:59 💡 With random selection, prisoners have very low chance of all succeeding. 02:28 💡 Strategy: Open own box, then box of number inside, until finding own number. 05:00 🔗 Box numbers will form loops - key to higher success rate. 08:29 📏 Success if no loops longer than 50 boxes. Calculate probability. 14:58 🎯 With strategy, ~31% chance all prisoners freed. 19:55 📈 Doubling prisoners only changes probability slightly. 21:52 🛡️ Prisoners can still succeed if warden tries to thwart strategy. 23:22 🏅 Guard could help ensure success by switching just 2 number cards. Made with HARPA AI
@olderjiang70702 жыл бұрын
李老师你好,我是一名典狱长,感谢你的讲解让我有了新的启发
@wolfcc21382 жыл бұрын
每个囚犯获得有各自的计数设为k,初始k = 1. 当前的天数为n,从0开始计数 设i= n mod 7 如果灯是点亮的,在k 加上 (2^(i-1)),将灯熄灭, 当i < 6 时 如果k == (2^i)或者(k/(2^i)) mod 2 == 1 则将k 减去 (2^i)并且将灯点亮 任何一人计数达到100则可以报告 以上==为等于,^为乘方,mod为取模)
課後作業 (改良在留言看到的解法): 100 個人先決定一個天數 m (< 100),在第 m 天以前,由第一個重複放風的人負責計數並將燈打開,如果在第 k (< m) 天就重複就從 k - 1 開始計,之後到第 m 天放風的人不動燈 ; 如果 m 天都沒有重複就由第 m + 1 天放風的人從 m (自己重複) 或 m + 1 (自己沒有重複) 計,從第 m + 1 天開始如果是第一次看到燈是開的就關燈,直到輪到那個負責計數的人觀察,如果燈是關的就計數 + 1 並開燈,否則就再等下一輪,直到加到 100 結束。 m 可以透過計算發生重複的機率和分析其效益成本決定。 由第一個重複的人負責計數而非事先隨機挑選,可在第一次就決定數個已放風的人數,之後同樣一輪只決定 1 人,一般情況可較原解法花較少時間。
Have 99 of them to only turn on light if light is off and each of them can only do turn on the light once. Have only 1 prisoner be able to turn off light and that person will be able to tell when he turn off the light 99 times. . . Is there a better solution than this?
@bcsa80792 жыл бұрын
Big problem for this solution:that guy has to get pick 100 times when it’s a 1/100 chance everyday
Use the light as a counter. Start with the light off every night. Turn it on and off once, count it as one. Each prisoner just needs to remember the number of the previous counts. On his turn to go out, he has to turn the light on and off one more time, if it is his first time to be let out. Otherwise, turn the light on and off the same number of times as the previous night. For the first prisoner, he starts with one. After seeing 99 counts, the last prisoner will know he is the 100 prisoner.
@jerry8liu2 жыл бұрын
Or, if the prisoner had been let out before, he may choose not to turn on the light at all. Another solution is that a prisoner will only turn on the light once he is let out for the first time. In this case, every inmate has to record the number of times the light has been turned on.
@whitytsubasa2 жыл бұрын
Good solution! How about in the other condition that only the one who is let out can see the light? ie, they cannot know the status of light when staying their room. Also an interesting question.
@jerry8liu2 жыл бұрын
@@whitytsubasa Interesting condition. The light is the only communication channel in this question. Without it, there is no way to signal other inmates.
@Cookie-sg7lt2 жыл бұрын
@@whitytsubasa Choose one of the prisoner to calculate the time that the light turn on, start with the light on, the choosen one can only turn off the light and calculate how many time the light was turn on, the other prisoner can only turn on the light for first time they let out, otherwise they do nothing. Then when the choosen one find out it is the 100th time, they win it.
@helloworld17072 жыл бұрын
@@Cookie-sg7lt But it takes too long! The counting prisoner need to be let out at least 100 times? I think of no other solution though