返回题库

笼中狮子与肉:会发生什么?

lions in a cage

专题
Brainteaser / 脑筋急转弯
难度
L2

题目详情

笼子里有 nn 头狮子。有人扔进来一块肉。每头狮子要么把整块肉吃掉,要么完全不吃。

如果某头狮子吃了肉,它会立刻睡着,并在其他狮子眼里变成“一块肉”(可以被吃掉)。

问:最后会发生什么?

There are nn lions in a cage. A piece of meat is thrown into the cage. A lion can either eat the whole piece of meat or none of it. If it eats the meat, it falls asleep and becomes to the other lions a piece of meat. What happens?

解析

假设狮子都足够理性:只有在“吃了不会让自己被其他狮子吃掉”时才会吃。

用归纳:

  • n=1n=1:唯一的狮子吃掉肉,安全。
  • n=2n=2:若其中一头吃肉就会睡着,另一头会把它吃掉,因此没人敢吃。
  • 假设对 n1n-1 成立。

当有 nn 头狮子时,若某头狮子吃肉睡着,那么笼中还剩 n1n-1 头清醒狮子面对“一块肉”(睡着的那头)。根据归纳假设:

  • n1n-1 为奇数(即 nn 为偶数),会有狮子去吃这块“肉”,于是最初吃肉那头会被吃掉,因此没有狮子敢先吃;
  • n1n-1 为偶数(即 nn 为奇数),不会有狮子去吃这块“肉”,因此最初吃肉那头是安全的,于是会有人吃。

结论:n 为奇数时会有狮子吃;n 为偶数时无人吃。\boxed{n\text{ 为奇数时会有狮子吃;}n\text{ 为偶数时无人吃。}}