As a wildfire rages through the grasslands, three lions and three wildebeest flee for their lives. To escape the inferno, they must cross over to the left bank of a crocodile-infested river. Fortunately, there happens to be a raft nearby. It can carry up to two animals at a time, and needs as least one lion or wildebeest on board to row it across the river. There's just one problem. If the lions ever outnumber the wildebeest on either side of the river, even for a moment, their instincts will kick in, and the results won't be pretty. That includes the animals in the boat when it's on a given side of the river. What's the fastest way for all six animals to get across without the lions stopping for dinner? Pause here if you want to figure it out for yourself. Answer in: 3 Answer in: 2 Answer in: 1 If you feel stuck on a problem like this, try listing all the decisions you can make at each point, and the consequences each choice leads to. For instance, there are five options for who goes across first: one wildebeest, one lion, two wildebeest, two lions, or one of each. If one animal goes alone, it'll just have to come straight back. And if two wildebeest cross first, the remaining one will immediately get eaten. So those options are all out. Sending two lions, or one of each animal, can actually both lead to solutions in the same number of moves. For the sake of time, we'll focus on the second one. One of each animal crosses. Now, if the wildebeest stays and the lion returns, there will be three lions on the right bank. Bad news for the two remaining wildebeest. So we need to have the lion stay on the left bank and the wildebeest go back to the right. Now we have the same five options, but with one lion already on the left bank. If two wildebeest go, the one that stays will get eaten, and if one of each animal goes, the wildebeest on the raft will be outnumbered as soon as it reaches the other side. So that's a dead end, which means that at the third crossing, only the two lions can go. One gets dropped off, leaving two lions on the left bank. The third lion takes the raft back to the right bank where the wildebeest are waiting. What now? Well, since we've got two lions waiting on the left bank, the only option is for two wildebeest to cross. Next, there's no sense in two wildebeest going back, since that just reverses the last step. And if two lions go back, they'll outnumber the wildebeest on the right bank. So one lion and one wildebeest take the raft back leaving us with one of each animal on the left bank and two of each on the right. Again, there's no point in sending the lion-wildebeest pair back, so the next trip should be either a pair of lions or a pair of wildebeest. If the lions go, they'd eat the wildebeest on the left, so they stay, and the two wildebeest cross instead. Now we're quite close because the wildebeest are all where they need to be with safety in numbers. All that's left is for that one lion to raft back and bring his fellow lions over one by one. That makes eleven trips total, the smallest number needed to get everyone across safely. The solution that involves sending both lions on the first step works similarly, and also takes eleven crossings. The six animals escape unharmed from the fire just in time and begin their new lives across the river. Of course, now that the danger's passed, it remains to be seen how long their unlikely alliance will last.
草原上野火蔓延 三隻獅子和三隻牛羚逃離家園 為了逃離地獄 牠們必須跨越潛伏著 鱷魚的河到左岸 幸運的是,附近有個木筏 它一次可以承載兩隻動物 並需要至少一隻獅子或牛羚 並行橫跨過河 只有一個問題 在河的兩邊 如果獅子的數量超過牛羚 不到一會兒 獅子的本能會吃了牛羚 這樣結果不會很 OK 在渡河的船上,情況也是如此 什麼是能讓這六隻動物最快渡河 又不會讓獅子吃掉牛羚的方式? 如果你想自己找出答案,請暫停 3 2 1 如果你覺得這問題困擾你 試著列出你在 每個時間點做出的決定 和每個選擇導致的後果 例如:有五個選項,誰先穿過? 一隻牛羚 一隻獅子 兩隻牛羚 兩隻獅子 或兩種動物各一隻 如果一隻動物獨自走 它只需要直接回來 如果兩隻牛羚先走 剩下的一隻立即被吃了 所以這些錯誤的選項都刪除了 運送兩隻獅子 或每種動物各一隻 這兩種方法最終得到的 運送次數都是一樣的 因為時間的緣故,我們將關注第二種 每種動物各一隻 現在,如果留下牛羚 讓獅子回來 會有三隻獅子在右岸 壞消息是兩隻牛羚會被吃 所以我們需要獅子留在左岸 而牛羚回來右岸 現在我們有五個相同的選項 但是有一隻獅子在左岸 如果兩隻牛羚過去 留下來的那隻會被吃 如果每隻動物各一隻過去 一旦到達另一邊 左岸的獅子數量將超過牛羚 這是糟糕的選擇 這意味著在第三次過河時 只有兩隻獅子可以去 一隻獅子回去 留下兩隻獅子在左岸 第三隻獅子帶著木筏回來 右岸的牛羚正在等待 現在該怎麼辦? 好了,因為我們有兩隻獅子在左岸 唯一的選擇是兩隻牛羚過去 接下來,如果兩隻牛羚 再回去沒有意義 只是重複這一步 如果兩隻獅子回來 在右岸,牠們的數量會超過牛羚 所以一隻獅子和一隻牛羚 把木筏帶回來 在左岸,留下每種動物各一隻 及各兩隻在右岸 再次運送每種動物各一隻,沒有意義 所以下一次過河應該是一對獅子 或一對牛羚 如果獅子去,在左岸時 牠們會吃掉牛羚,所以牠們留下來 所以兩隻牛羚過去 現在我們接進尾聲,因為 牛羚都在牠們需要待的地方 在數量上很安全 剩下的就是那一隻獅子帶木筏回來 並帶上另一隻獅子,並逐個帶回 這總共十一趟來回 以最少的次數 安全地讓每隻動物到達對岸 先送兩隻獅子過去的解法與這個相似 也需要來回十一趟 六隻動物不會受傷害 很及時的逃過火災 橫跨過河後,並開始新的生活 當然,現在危險已經過去了 這個不可能的聯盟能維持多久 將持續受到關注