Can you solve the fortress riddle? - Henri Picciotto

1,505,069 views ・ 2022-05-31

TED-Ed


请双击下面的英文字幕来播放视频。

翻译人员: Siyu Lian 校对人员: Yuwei Wu
00:07
Bad news: your worst enemies are at the gate.
0
7503
3921
坏消息:你最大的敌人 已经兵临城下。
00:11
For your fledgling kingdom guards the world’s only herd of tiny dino creatures.
1
11424
6340
你新生的王国守护着世界上 唯一一群小恐龙。
00:17
To you, they’re sacred.
2
17972
1627
它们对你来说是无价之宝,
00:19
To everyone else, they’re food.
3
19599
2210
对别人来说,它们只是食物而已。
00:21
The three closest nation-states have all teamed up
4
21851
3670
三个最接近的王国
00:25
in what they call an alliance of the hungry
5
25521
2878
组成了一个饥饿联盟,
00:28
to smash open your walls and devour the herd.
6
28399
3212
他们准备砸开你的城墙, 吃掉你的一群小恐龙。
00:32
Your fortifications will hold off their armies for now.
7
32111
3504
你的防御城墙现在还能抵抗得住,
00:35
But when their siege weapons arrive tomorrow,
8
35615
2627
但明天他们的攻城武器到来时,
00:38
you won’t stand a chance.
9
38242
1794
你就没有赢的机会了。
00:40
Luckily, you have a wall fabricator:
10
40203
2502
幸运的是,你有一台城墙制造器。
00:42
if you run it all night, you may be able to reinforce your border
11
42705
4088
如果它一晚上不停地运作,
00:46
before the weapons arrive.
12
46793
1793
你可以在你的敌人到达之前 加固你的城墙。
00:48
However, it can only create wall segments of a specific, whole number size
13
48711
5714
不过,它只能制造出特定和 整数尺寸的墙体。
00:54
that you must determine ahead of time.
14
54425
2586
你必须在制造之前 决定好墙体的尺寸。
00:57
Your engineers have been in close consultation with your spymaster.
15
57428
4129
你的工程师和间谍专家 进行了密切的讨论。
01:01
Each rival kingdom has wall-busters that come in one specific size.
16
61808
5255
每个竞争王国都有一个 特定尺寸的破墙器。
01:07
The clowns’ are all 6 meters,
17
67230
2210
小丑王国可以攻破 6 米城墙,
01:09
the royals’ are 9, and the redheads’ are 20.
18
69524
3962
皇室王国可以攻破 9 米城墙, 红发王国攻破 20 米城墙。
01:13
Each wall-buster can level a wall segment of the matching size.
19
73986
4547
每个破墙器可以攻破 相对尺寸的城墙。
01:18
And they can be combined as well;
20
78616
2002
破墙器同时还可以组合使用,
01:20
two 6′s can take out a 12 meter wall
21
80618
3253
两个 6 米的破墙器可以 攻破 12 米的城墙,
01:23
and a 6 and a 9 could break one that’s 15 meters.
22
83871
3587
一个 6 米和一个 9 米 可以攻破 15 米的城墙,
01:27
But a 7 meter wall would hold fast against any of them.
23
87625
4087
但一个 7 米的城墙 不会被攻破。
01:32
Meanwhile, large walls aren't necessarily protected.
24
92380
3628
同时,大城墙不一定就是安全的。
01:36
Here’s how they could take down 70, 71, and 72 meters.
25
96175
5130
这是它们如何可以攻破 70、 71 和 72 米的城墙。
01:41
Your fabricator takes the same amount of time to produce a wall segment
26
101639
3921
不论城墙的长度,
01:45
no matter its length, and it’s not particularly fast.
27
105560
3461
你的城墙制造器 制造的时间都是一样的。
01:49
So to finish the wall in time,
28
109188
2002
但制造的速度不快, 所以要抓紧时间。
01:51
you need the longest segment that can’t be destroyed
29
111190
3128
你要制造出不会被任何 尺寸组合的破墙器
01:54
by any combination of the siege weapons,
30
114318
2670
摧毁的最长城墙,
01:56
which your enemies have hundreds of.
31
116988
2294
你的敌人有上百个这样的武器。
01:59
What wall length will save your kingdom?
32
119824
2711
什么长度的城墙能拯救你的王国?
02:02
Pause here to figure it out yourself. Answer in 3
33
122869
2711
在这里暂停一下,想想看。 答案在 3 秒后出现
02:05
Answer in 2
34
125580
2544
答案在 2 秒后出现
02:08
Answer in 1
35
128124
2335
答案在 1 秒后出现
02:10
It's possible to solve this problem by trial and error.
36
130710
3503
你可以通过不停地试错 来找出答案,
02:14
But there’s also a remarkably quick and elegant solution
37
134213
3587
但有一个快速并优美的解决方法。
02:17
inspired by an idea that’s thousands of years old:
38
137800
3545
这个方法是由一个 数百年前的思想所启发的:
02:21
the sieve of Eratosthenes.
39
141345
2169
埃拉托斯特尼筛法 (Sieve of Eratosthenes)
02:23
Eratosthenes of Cyrene was a 3rd century BCE mathematician from ancient Greece
40
143806
6256
塞雷纳的埃拉托塞尼斯是公元前 3 世纪的古希腊数学家,
02:30
interested in prime numbers,
41
150062
2378
他对质数有强烈的兴趣。
02:32
that is numbers only divisible by 1 and themselves.
42
152440
4254
质数是指只能被 1 和自己整除的数字。
02:37
Presumably he grew bored of manually checking whether a given number was prime,
43
157445
5005
他对手动检查一个个数字 是否为质数而感到厌烦,
02:42
so he came up with the following technique.
44
162450
2836
所以他创造出了一个技巧。
02:45
Make a giant list of numbers.
45
165995
2169
先列出一个巨大的数字表,
02:48
X out all of the multiples of 2, except 2 itself.
46
168164
3837
删掉除 2 以外, 所有 2 的倍数。
02:52
Now do the same with multiples of 3.
47
172460
2461
现在对 3 的倍数做同样的事。
02:55
The even multiples have already been eliminated,
48
175129
2753
偶数的倍数已经被除掉了,
02:57
and the odd multiples can all be found in this column.
49
177882
3795
所有奇数的倍数都在这列里。
03:02
4 was already accounted for when you did multiples of 2,
50
182053
3545
4 已经在删除 2 的倍数时被除掉了。
03:05
so move on to 5.
51
185598
1752
所以直接跳到 5 。
03:07
The multiples of 5 and 7 show up conveniently in diagonals.
52
187516
4880
5 和 7 的倍数 巧妙的出现在对角线上。
03:12
This method eliminates all possible composite numbers,
53
192605
3920
这个技巧排除了所有 可能的复合数,
03:16
leaving only primes behind.
54
196525
2294
只留下质数。
03:19
We've already identified every prime less than 121,
55
199195
4212
我们已经找出了所有 小于 121 的质数,
03:23
and it’s easy to go higher and higher this way.
56
203658
2419
我们可以轻松地找到 越来越大的质数。
03:26
We can use a similar technique with our wall problem
57
206619
3420
我们可以用同样的技巧 去排除一整列的数字
03:30
to eliminate entire groups of numbers at once.
58
210039
3337
来解决城墙的问题,
03:33
A first, critical step is to be deliberate about the number of columns.
59
213834
4880
首先,关键一步就是要认真考虑 需要多少列的数字。
03:38
If we use 6 again, the numbers in each column will be exactly 6 apart.
60
218839
4880
如果我们再一次使用 6 列, 每一列的数字都间隔 6 个。
03:43
What that means is that if we identify a number vulnerable to the wall-busters,
61
223970
4504
这代表如果我们找到了 一个会被攻破的数字,
03:48
then all the rest of the column below it would also fall.
62
228474
3629
这列剩下的数字也同样会被攻破。
03:52
In other words, because your enemies can make 9,
63
232520
3211
换句话说,你的敌人 可以攻破 9 米,
03:55
they can make 15, 21, 27, and so on
64
235731
4129
它也同时也可以攻破 15、 21、27,等等,
03:59
by adding the clowns’ 6-meter machines.
65
239860
3045
加上小丑王国的 6 米破墙器。
04:03
So right away this eliminates 6, 9 and 20, and everything under them.
66
243030
5506
可以排除 6、9 和 20 , 以及这列剩下的数字。
04:09
We’ve accounted for the 6′s with the columns,
67
249203
2461
我们排除了所有 6 的倍数,
04:11
so we can focus on combinations of 20′s and 9′s to eliminate more options.
68
251664
5505
找到 20 和 9 的组合 来排除剩下的数字。
04:17
Your rivals can easily make 20 plus 9 and 20 plus 20 and everything below.
69
257378
5881
你的敌人可以组合 20 加 9 和 20 加 20,
以及这列剩下的数字。
04:23
Using this approach, we could have eliminated the 70, 71, and 72,
70
263634
5381
使用这个方法,我们可以排除 70、71 和 72,
04:29
and infinitely many other options without having to do any calculations.
71
269015
4754
不需要做任何计算 来排除无数个其他可能。
04:34
In the remaining column there are no multiples of 9 or 20,
72
274103
4171
剩下一列的数字没有 9 和 20 的倍数,
04:38
but 49 jumps out, as 2 times 20 plus 9.
73
278274
3712
但是 49 是由 2 乘 20 加 9 得出的。
04:42
There's no way to make 43,
74
282236
1960
我们没有办法得出 43,
04:44
so that must be the largest wall segment that your enemies can’t destroy.
75
284405
4838
所以这是不会被你的敌人 摧毁的最长城墙。
04:49
And there you have it.
76
289493
1377
你终于有了这个数字。
04:50
You plug 43 into the wall fabricator, and after a tense night,
77
290870
4212
你设置城墙制造器 来制造 43 米的城墙。
04:55
the sun rises on your now impregnable fortress
78
295082
3504
经过紧张的一晚, 太阳照射在你铜墙铁壁般的城墙。
04:58
and a herd that won’t become unhappy meals.
79
298586
3211
你的小恐龙们不会变成 别人的盘中餐。
关于本网站

这个网站将向你介绍对学习英语有用的YouTube视频。你将看到来自世界各地的一流教师教授的英语课程。双击每个视频页面上显示的英文字幕,即可从那里播放视频。字幕会随着视频的播放而同步滚动。如果你有任何意见或要求,请使用此联系表与我们联系。

https://forms.gle/WvT1wiN1qDtmnspy7


This website was created in October 2020 and last updated on June 12, 2025.

It is now archived and preserved as an English learning resource.

Some information may be out of date.

隐私政策

eng.lish.video

Developer's Blog