Can you solve the Trojan War riddle Dennis E. Shasha

The Trojan War has been raging
for 10 years,

with neither Greeks nor Trojans
prevailing.

Gods and humans alike
are desperate for a break,

so when a divine omen races
across the sky,

the two sides agree to a 10 day truce.

From high up on Olympus you’ve been
waiting for an opportunity

to bring this bloody war
to its conclusion.

When you go to consult the Fates,
they advise:

should the peace last for a full 10 days,
all will end soon.

However, if the truce is broken,

the ensuing battle will lead to 10 more
devastating years of war.

The Fates’ loom has shown them
the exact conditions

that will keep the truce intact.

The great Trojan plain can be viewed
as a grid of Greek and Trojan encampments.

If they’re organized in such a way that
any Greek can reach any other Greek camp

without having to pass through a Trojan
camp, and likewise for Trojans,

plus neither side completely surrounds
the other, peace will prevail.

Anyone can move to a horizontally
or vertically adjacent camp,

but never diagonally.

The problem is,
they’re currently arranged like this.

Tonight, you can use your powers to swap
up to six pairs of camps

that are horizontally, vertically,
or diagonally adjacent.

No camp can be moved more than once.

Which swaps do you make
to keep the peace?

Pause here to figure it out yourself.
Answer in 3

Answer in 2

Answer in 1

The first insight here is to divide
this into two sub-problems.

There’s the matter of connecting
4 clumps of Greeks

without putting holes in the Trojan line.

And then there’s dealing
with the thorny center space.

Let’s consider the Greeks first.

To connect any Greek clumps,

you’ll have to mess
with the nice, straight Trojan lines.

If you try to do that anywhere
in the center of these arms,

you’ll create new isolated
clusters of Trojans.

So the only option is to go
to the perimeter of the field

and move some Trojans diagonally,
say here, here, and here.

Now for the center.

there’s no way to connect the Trojan arms
without swapping a Trojan in.

But continuing to shift that arm
of Trojans inward

would require moving
the same Greek camp multiple times.

However, you could shift the whole
Trojan arm up and to the right,

closing this gap.

There are several
solutions with slight variants,

but as long as you perform this maneuver
on the short arm of Trojans,

you can achieve peace in exactly 6 moves.

You make the swaps and all is well
until the fifth night.

One of your rival gods wants
to see the bloodshed continue,

and has taken advantage
of a forgotten prophecy.

He’s convinced one Trojan camp
to make a swap

with their horizontal, vertical,
or diagonal Greek neighbors

that will break up the Greek connectivity.

Once again, you consult the Fates,
who prophesize the following:

the meddling Trojan camp is somewhere
within four grid spaces

of the perimeter of the battlefield.

They won’t go through with a swap
if it only breaks up Trojan connectivity.

And finally, you can make
at most two swaps

with the same rules as before
to thwart them.

Which swaps do you make
to block the troublesome Trojan camp?

Answer in 3

Answer in 2

Answer in 1

You won’t be able to identify
the scheming camp precisely,

but there’s a lot you can do
to at least narrow down the options.

They have to be somewhere in this area.

And they have to be able to block Greek
camps from each other in a single swap.

That doesn’t leave many options;

the only possible blockages
are at the end of these two arms,

where a Trojan camp could plug a hole
without opening a new one.

So they must be in one of these
four camps.

Let’s look at the right arm first.

There’s a threat here because this column
has two Trojan camps.

If one moves to the right,
the other will still be in place,

blocking Greeks from crossing.

so we can thwart them by moving either one
a column left into this square.

and the same principle applies
to the bottom arm.

Your effort maintains the peace
for the final 5 days.

But it seems that a certain Greek general
noticed what was happening

and left the Trojans a parting gift…

特洛伊战争
持续了 10 年

,无论是希腊人还是特洛伊人都没有
占上风。

神与人
都急切地想要休息,

所以当神兆
划过天空时

,双方同意休战十天。

从奥林匹斯山的高处,你一直在
等待

机会结束这场血腥的战争

当你去咨询命运时,
他们建议:

如果和平持续整整十天,
一切很快就会结束。

然而,如果休战协议被打破

,接下来的战斗将导致10年更具
毁灭性的战争。

命运的织布机向他们展示

了保持休战完好无损的确切条件。

伟大的特洛伊平原可以
看作是希腊和特洛伊营地的网格。

如果他们的组织方式使
任何希腊人都可以到达任何其他希腊人的营地

而无需经过
特洛伊营地,特洛伊人也是如此,而且

双方都没有完全
包围对方,和平将占上风。

任何人都可以移动到水平
或垂直相邻的营地,

但不能沿对角线移动。

问题是,
他们目前是这样安排的。

今晚,你可以使用你的力量交换
多达六

对水平、垂直
或对角相邻的营地。

营地不能多次移动。

你做了哪些交换
来保持和平?

在这里停下来自己弄清楚。
回答 3

回答 2

回答 1

这里的第一个见解是将
其分为两个子问题。

连接
4 组希腊人

而不在特洛伊木马线上留下漏洞的问题。

然后是
处理棘手的中心空间。

让我们首先考虑希腊人。

要连接任何希腊语丛,

您必须
弄乱漂亮、笔直的特洛伊木马线。

如果您尝试
在这些武器中心的任何地方执行此操作,

您将创建新的孤立
的特洛伊木马集群。

所以唯一的选择是
到场地的外围沿

对角线移动一些特洛伊木马,
比如这里、这里和这里。

现在为中心。

如果不交换特洛伊木马,就无法连接特洛伊木马的手臂

但是继续向内移动
木马的手臂

需要
多次移动同一个希腊营地。

但是,您可以将整个
特洛伊木马臂向上和向右移动,从而

缩小这个差距。

有几种
解决方案略有不同,

但只要你
在木马的短臂上执行这个动作,

你就可以在 6 个动作中实现和平。

你做了交换,一切都很好,
直到第五个晚上。

你的一个敌对神
想看到流血事件继续,

并利用
了一个被遗忘的预言。

他说服了一个特洛伊营地

与他们水平、垂直
或对角的希腊邻居进行交换,

这将破坏希腊的连通性。

再一次,你咨询了命运,
他们预言如下

:干涉的特洛伊营地位于战场周边
的四个网格空间

内。

如果只是破坏木马连接,他们就不会进行交换。

最后,您最多可以使用

与以前相同的规则进行两次交换
来阻止它们。

你做了哪些交换
来阻止麻烦的特洛伊木马阵营?

回答 3

回答 2

回答 1

您将无法
准确识别阴谋阵营,

但您可以做很多事情
,至少可以缩小选择范围。

他们必须在这个区域的某个地方。

他们必须能够
在一次交换中阻止希腊阵营。

这并没有留下很多选择。

唯一可能的堵塞
是在这两个臂的末端

,特洛伊营地可以在
不打开新的情况下堵住一个洞。

所以他们必须在这
四个阵营之一。

我们先来看看右臂。

这里存在威胁,因为该专栏
有两个特洛伊木马阵营。

如果一个向右移动
,另一个将仍然在原地,

阻止希腊人通过。

所以我们可以通过将其中任何一个
向左移动一列进入这个正方形来阻止它们。

同样的原理也适用
于下臂。

你的努力
维持了最后 5 天的和平。

但似乎某位希腊将军
注意到了正在发生的事情,

并给特洛伊人留下了临别礼物……