老虎与羊
Tigers & The Sheep
题目详情
一座只有草的魔法岛上有 100 只老虎和 1 只羊。老虎吃草能活,但也想吃羊。
规则:如果一只老虎咬了羊,它会立刻变成羊;若两只老虎同时攻击羊,只有最先咬到羊的那只会变成羊。
老虎并不介意变成羊,但会担心被其他老虎吃掉。所有老虎都非常聪明且都想活下去。
问:羊能活下来吗?
提示:先考虑 1 只老虎、2 只老虎的情况。
Hundred tigers and one sheep are put on a magic island that only has grass. Tigers can live on grass, but they want to eat sheep. If a Tiger bites the Sheep then it will become a sheep itself. If 2 tigers attack a sheep, only the first tiger to bite converts into a sheep. Tigers don’t mind being a sheep, but they have a risk of getting eaten by another tiger. All tigers are intelligent and want to survive. Will the sheep survive?
Hint
Instead of 100, think of 1 or 2 tiger's case.
解析
羊能活下来。
结论规律:当老虎数量为偶数时,羊会存活;为奇数时,羊会被吃掉。
倒推:
- 1 只老虎:没有被反咬的风险,会吃羊(羊死)。
- 2 只老虎:任何一只吃羊都会立刻变羊并被另一只吃掉,因此都不会动手(羊活)。
- 3 只老虎:若某只吃羊,剩下变成“2 老虎 + 1 羊”,根据上面结论羊会活,所以每只老虎都有动机先吃(羊死)。
因此 100 只老虎(偶数)时,羊存活。
Original Explanation
Sheep survives!
Solution
If there is 1 tiger, then it will eat the sheep because he does not need to worry about being eaten. Sheep will not survive. If there are 2 tigers, both of them knows that if one eats the Sheep, the other tiger will eat him. So, the sheep will survive.
If there are 3 tigers, then they each of them knows that if one tiger eats up the sheep, then Iceland will be left with 1 sheep and 2 tigers and as shown in the previous case, the sheep will survive. Hence each tiger will try to eat up the sheep. The sheep will not survive.
If there are 4 tigers, then the sheep will survive.
And so on….
So, If there are even number of tigers the sheep will survive, else it will die. Hence, if there are 100 tigers the sheep will survive.