Can you solve the rogue submarine riddle Alex Rosenthal

Smuggling yourself aboard the rogue
submarine was the easy part.

Hacking into the nuclear missile launch
override— a little harder.

But now you’ve got a problem:
you don’t have the override code.

You know you need
the same two numbers

that the agents of chaos just used
to authorize the launch.

But one wrong answer will lock you out.

From your hiding spot,
you’ve been able to learn the following:

The big boss didn’t trust any minion
with the full information

to launch nuclear missiles on their own.

So he gave one launch code to Minion A,
the other to minion B,

and forbade them to share
the numbers with each other.

When the order came,

each entered their own number
and activated the countdown.

That was 50 minutes ago,

and there’s only 10 minutes left
before the missiles launch.

Suddenly, the boss says, “Funny story—
your launch codes were actually related.

I chose a set of distinct positive
integers with at least two elements,

each less than 7, and told their sum
to you, A, and their product to you, B.”

After a moment of awkward silence,
A says to B,

“I don’t know whether you know my number.”

B thinks this over, then responds,

“I know your number, and now I know
you know my number too.”

That’s all you’ve got.

What numbers do you enter
to override the launch?

Pause now to figure it out for yourself.
Answer in 3

Answer in 2

Answer in 1

Ignorance-based puzzles like this are
notoriously difficult to work through.

The trick is to put yourself
in the heads of both characters

and narrow down the possibilities
based on what they know or don’t know.

So let’s start with A’s first statement.

It means that B could conceivably
have something with the potential

to reveal A’s number,
but isn’t guaranteed to.

That doesn’t sound very definitive,
but it can lead us to a major insight.

The only scenarios where B could know
A’s number

are when there’s exactly one valid way
to factor B’s number.

Try factoring a few
and you’ll find the pattern—

It could be prime— where the product
must be of 1 and itself—

or it could be the product of 1
and the square of a prime, such as 4.

In both cases, there is exactly one sum.

For a number like 8, factoring it
into 2 and 4, or 1, 2, and 4,

creates too many options.

Because the boss’s numbers
must be less than 7,

A’s list of B’s possibilities
only has these 4 numbers.

Here’s where we can conclude a major clue.

To think B could have these numbers,
A’s number must be a sum of their factors—

so 3, 4, 5, or 6.

We can eliminate 3 and 4,
because if the sum was either,

the product could only be 2 or 3,

in which case A would know that B
already knows A’s number,

contradicting A’s statement.

5 and 6, however, are in play,

because they can become
sums in multiple ways.

The need to consider this is one of
the most difficult parts of this puzzle.

The crucial thing to remember
is that there’s no guarantee

that B’s number is on A’s list—

those are just the possibilities
from A’s perspective

that would allow B to deduce A’s number.

That ambiguity forces us to go through
unintuitive multi-step processes like:

consider a product, see what sums
can result from its factors,

then break those apart
and see what products can result.

We’ll soon have to do something similar
going from sums to products

and back to sums.

But now we know—
when A made his first statement,

he must have been holding
either 5 or 6.

B has access to the same information
we do,

so he knows this too.

Let’s review what’s in each
brain at this point:

everyone knows a lot about the sum,
but only B knows the product.

Now let’s look at the first part
of B’s statement.

What if A’s number was 5?

That could be from 1+4 or 2+3,

in which case B would have
either 4 or 6.

4 would tell B what A had, like he said,

because there’s only one option to make
the product: 4 times 1.

6, on the other hand, could be broken
down three ways, which sum like so.

7 isn’t on B’s list of possible sums,
but 5 and 6 both are.

Meaning that B wouldn’t know
whether A’s number was 5 or 6,

and we can eliminate this option
because it contradicts his statement.

So this is great— 5 and 4
could be the override code,

but how do we know it’s the only one?

Let’s consider if A’s number was 6—

which would be 1+5, 2+4, or 1+2+3,

giving B 5, 8, or 6, respectively.

If B had 5, he’d know that A had 6.

And if he had 8, the possibilities for A
would be 2+4 and 1+2+4.

Only 6 is on the list of possible sums,
so B would again know that A had 6.

To summarize, if A had 6,

he still wouldn’t know whether
B had 5 or 8.

That contradicts the second half
of what B said,

and 5 and 4 must be the correct codes.

With seconds to spare you override
the missile launch,

shoot yourself out of the torpedo bay,

and send the sub
to the bottom of the ocean.

将自己走私到流氓
潜艇上是很容易的部分。

侵入核导弹发射
超控装置——有点困难。

但是现在你遇到了一个问题:
你没有覆盖代码。

你知道你需要

和混乱的代理人刚刚
用来授权发射的相同的两个号码。

但是一个错误的答案会把你锁在外面。

从你的藏身之处,
你已经了解到以下信息

:大老板不相信任何
拥有完整信息的奴才可以

自行发射核导弹。

于是他给了 Minion A 一个启动码
,另一个给了 Minion B,

并禁止他们
互相分享号码。

当命令来临时,

每个人输入自己的号码
并启动倒计时。

那是50分钟前

,距离导弹发射只剩下10分钟
了。

突然,老板说:“有趣的故事——
你的启动代码实际上是相关的。

我选择了一组不同的正
整数,其中至少有两个元素,

每个元素都小于 7,然后将它们的总和
告诉你 A,并将它们的乘积告诉你 B。”

一阵尴尬的沉默后,
A 对 B 说:

“我不知道你是否知道我的号码。”

B 想了想,然后回答说:

“我知道你的号码,现在我知道
你也知道我的号码了。”

这就是你所拥有的。

你输入什么数字
来覆盖启动?

现在停下来自己弄清楚。
3 中

答案 2 中

答案 1 中答案

像这样基于无知的谜题是出了名的
难以解决。

诀窍是将自己
放在两个角色的脑海中,


根据他们知道或不知道的内容缩小可能性。

所以让我们从 A 的第一个陈述开始。

这意味着 B 可以想象
有一些东西有

可能揭示 A 的号码,
但不能保证。

这听起来不是很确定,
但它可以引导我们获得一个重要的见解。

B 可以知道
A 的数字

的唯一情况是只有一种有效的方法
来分解 B 的数字。

尝试分解一些
,你会发现模式——

它可能是素数——乘积
必须是 1 和它本身——

或者它可能是 1
和素数平方的乘积,例如 4。

在这两种情况下, 正好有一个总和。

对于像 8 这样的数字,将其分解
为 2 和 4,或 1、2 和 4,

会产生太多选择。

因为老板的数字
必须小于 7,所以

A 的 B 可能性列表
只有这 4 个数字。

在这里,我们可以得出一个主要线索。

要认为 B 可以有这些数字,
A 的数字必须是它们的因子的总和——

所以 3、4、5 或 6。

我们可以消除 3 和 4,
因为如果总和是其中之一,

则乘积只能是 2 或 3 ,

在这种情况下,A 会知道 B
已经知道 A 的数字,这

与 A 的陈述相矛盾。

然而,5 和 6 正在发挥作用,

因为它们可以
以多种方式成为总和。

需要考虑这一点是
这个难题中最困难的部分之一。

需要记住的关键一点
是,不能

保证 B 的数字在 A 的列表中——

这些只是
从 A 的角度

来看允许 B 推断 A 的数字的可能性。

这种模糊性迫使我们经历
不直观的多步骤过程,例如:

考虑一个产品,看看
它的因素可以产生什么总和,

然后将它们分开
,看看能产生什么产品。

我们很快将不得不做一些类似的
事情,从总和到产品

再回到总和。

但现在我们知道了——
当 A 发表他的第一个声明时,

他一定
持有 5 或 6。B

可以访问与我们相同的信息

所以他也知道这一点。

让我们回顾一下此时每个
大脑中的内容:

每个人都对总和了解很多,
但只有 B 知道乘积。

现在让我们看一下
B 声明的第一部分。

如果 A 的数字是 5 怎么办?

这可能来自 1+4 或 2+3,

在这种情况下,B 将
有 4 或 6。4

会告诉 B A 有什么,就像他说的那样,

因为只有一种选择可以
制造产品:4 乘以 1.

6 另一方面,可以分解为
三种方式,总和是这样的。

7 不在 B 的可能总和列表中,
但 5 和 6 都在。

这意味着 B 不
知道 A 的数字是 5 还是 6

,我们可以取消这个选项,
因为它与他的陈述相矛盾。

所以这很好——5 和 4
可以是覆盖代码,

但我们怎么知道它是唯一的呢?

让我们考虑一下 A 的数字是否为 6

,即 1+5、2+4 或 1+2+3

,分别给 B 5、8 或 6。

如果 B 有 5,他会知道 A 有

6。如果他有 8,A 的
可能性是 2+4 和 1+2+4。

只有 6 在可能的总和列表中,
所以 B 会再次知道 A 有 6。

总而言之,如果 A 有 6,

他仍然不知道
B 有 5 还是 8。

这与 B 所说的后半部分相矛盾

, 5 和 4 必须是正确的代码。

只需几秒钟,您就可以
超越导弹发射,

将自己射出鱼雷舱,

然后将
潜艇送入海底。