Can you solve the Ragnarok riddle Dan Finkel

Ragnarok. The fabled end of the world,

when giants, monsters, and Norse gods
battle for the future.

The gods were winning handily until
the great serpent Jörmungandr emerged.

It swallowed Valhalla,
contorted itself across the land,

and then merged into one continuous body
with no head and no tail.

As it begins to digest Valhalla,

an exhausted Odin explains that he has
just enough power to strike the creature

with one final bolt of lightning.

If you magnify his blast
with your fabled hammer, Mjölnir,

it should pierce the massive serpent.

You’ll run with super-speed
along the serpent’s body.

When you hold your hammer high,
Odin will strike it with lightning

and split Jörmungandr open at that point.

Then, you’ll need to continue
running along its body

until every part of it is destroyed.

You can’t run over the same section twice

or you’ll fall into the already blasted
part of the snake.

But you can make multiple passes
through points where the creature

intersects its own body.

If you leave any portion un-zapped,
Jörmungandr will magically regenerate,

Odin’s last power will be spent,
and Valhalla will fall forever.

What path can you take to destroy
the serpent?

Pause now to figure it out yourself!

Answer in 3

2

1

One powerful way to solve problems
is to simplify.

And in this case, we can focus
our attention on the two things

that are important for our path:

intersections and the stretches
of snake between them.

Or, as they’re referred
to in graph theory, nodes and edges.

The edges are important
because they’re what we need to travel.

And the nodes matter
because they connect the edges,

and are where we may need to make choices
as we run from edge to edge.

This simplification into nodes
and edges leaves us

with a ubiquitous and important
mathematical object known as a graph,

or network.

We just need to figure out how to travel
what mathematicians call an Eulerian path,

which traces every edge exactly once.

Instead of looking at the path as a whole,
let’s zoom in on a single node.

During some moment in your run,
you’ll enter that node, and then exit it.

That takes care of two edges.

If you enter again,
you’ll need to exit again too,

which requires another pair of edges.

So every point along your path
will have edges that come in pairs.

One edge in each pair will function
as entrance; the other as exit.

And that means that the number of edges
coming out of every node must be even.

There are just two exceptions:
the start and end points,

where you can exit
without entering, or vice versa.

If we look at the network
formed by the serpent again,

and number how many edges
emerge from each node,

a pattern jumps out that fits
what we just saw.

Every node has an even number
of edges emerging from it, except two.

So one of these must be the start
of your route, and the other the end.

Interestingly enough, any connected
network that has exactly 2 nodes

with an odd number of edges
will also contain an Eulerian path.

The same is true if there are no nodes
with an odd number of edges—

in that case the path starts
and ends in the same spot.

So knowing that,
let’s return to our full graph.

We can begin by taking care
of this edge here.

Now we can zig-zag back and forth
across the whole snake

until we reach the end.

And that’s just one solution—
it helps to be systematic,

but you’re likely to happen
upon many others

once you know where to begin
and end your run.

You hold your hammer high
at the opportune moment,

and Odin sends the world-saving surge
of lightning at you.

Then you run
like you’ve never run before.

If you can pull this off, surely nothing
could stop the might of the Norse Gods.

And if something like that were out there,
slouching its way towards you…

well, that would be a story
for another day.

诸神黄昏。 传说中的世界末日

,巨人、怪物和北欧诸神
为未来而战。

众神轻而易举地获胜,
直到大蛇耶梦加德出现。

它吞噬了英灵
殿,在大地上扭曲着自己,

然后融合成一个
没有头没有尾的连续身体。

当它开始消化瓦尔哈拉时

,精疲力竭的奥丁解释说,他的
力量刚好足以

用最后一道闪电击中这个生物。

如果你
用传说中的锤子 Mjölnir 放大他的爆炸,

它应该会刺穿这条巨大的蛇。

你会
沿着蛇的身体以超快的速度奔跑。

当你高举锤子时,
奥丁会用闪电击打它,

并在此时将耶梦加德劈开。

然后,你需要继续
沿着它的身体奔跑,

直到它的每一部分都被摧毁。

你不能两次跑过同一部分,

否则你会掉进蛇已经爆炸的
部分。

但是你可以多次
通过生物

与自己身体相交的点。

如果你留下任何部分未被破坏,
Jörmungandr 将神奇地再生,

奥丁的最后力量将被耗尽
,瓦尔哈拉将永远陨落。

你可以采取什么途径来
消灭蛇?

现在停下来自己弄清楚!

回答 3

2

1

解决问题的一种有效方法
是简化。

在这种情况下,我们可以将
注意力集中在

对我们的路径很重要的两件事上:

交叉点和
它们之间的蛇形延伸。

或者,正如它们
在图论中所指的那样,节点和边。

边缘很重要,
因为它们是我们旅行所需要的。

节点很重要,
因为它们连接边缘,

并且
是我们从边缘运行到边缘时可能需要做出选择的地方。

这种对节点
和边的简化为我们留下

了一个无处不在且重要的
数学对象,称为图

或网络。

我们只需要弄清楚如何
通过数学家所说的欧拉路径,

这条路径精确地追踪每条边一次。

与其查看整个路径,
不如放大单个节点。

在您运行的某个时刻,
您将进入该节点,然后退出它。

这需要照顾两个边缘。

如果你再次进入,
你也需要再次退出,

这需要另一对边。

因此,您路径上的每个点
都会有成对出现的边缘。

每对中的一条边将
用作入口; 另一个作为出口。

这意味着
从每个节点出来的边数必须是偶数。

只有两个例外
:起点和终点

,您
无需进入即可退出,反之亦然。

如果我们
再次查看由蛇形成的网络,

并计算
每个节点出现的边数,就会

跳出一个与
我们刚刚看到的相符的模式。

每个节点都有偶数
条边从它出现,除了两条。

因此,其中一个必须
是您路线的起点,而另一个必须是终点。

有趣的是,任何
恰好有 2 个节点

且边数为奇数的连接网络
也将包含一条欧拉路径。

如果没有
具有奇数条边的节点也是如此——

在这种情况下,路径
在同一个点开始和结束。

所以知道了这一点,
让我们回到我们的完整图表。

我们可以从
这里开始处理这个边缘。

现在我们可以
在整条蛇上来回曲折,

直到到达终点。

这只是一种解决方案——
它有助于系统化,

一旦你知道从哪里开始
和结束你的跑步,你很可能会遇到许多其他人。


在适当的时候高举锤子

,奥丁就会向你发射拯救世界
的闪电。

然后
你像以前从未跑过一样跑。

如果你能做到这一点,肯定没有什么
能阻止北欧诸神的力量。

如果有类似的东西在那里,
无精打采地朝你走来……

好吧,那将
是另一天的故事。