Can you solve the fortress riddle? - Henri Picciotto

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

TED-Ed


請雙擊下方英文字幕播放視頻。

譯者: Lilian Chiu 審譯者: Thomas Tam
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
埃拉托斯特尼質數篩法。
02:23
Eratosthenes of Cyrene was a 3rd century BCE mathematician from ancient Greece
40
143806
6256
昔蘭尼的埃拉托斯特
是西元前三世紀的古希臘數學家,
02:30
interested in prime numbers,
41
150062
2378
他對質數很感興趣,
02:32
that is numbers only divisible by 1 and themselves.
42
152440
4254
質數就是只能被一 及它自己整除的數字。
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
3 的偶數倍數都已經被去除了,
02:57
and the odd multiples can all be found in this column.
49
177882
3795
3 的奇數倍數都會在這一行裡面。
03:02
4 was already accounted for when you did multiples of 2,
50
182053
3545
處理 2 的時候, 就已經把 4 一併考量了。
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,以及它們下方的所有數字。
我們已經用直行的方式 把 6 都考量了,
04:09
We’ve accounted for the 6′s with the columns,
67
249203
2461
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