The word "Algorithm" sounds like high-level mathematics, something only geniuses understand. But actually, every time you brush your teeth in the morning, tie your shoelaces, or pack your schoolbag, you are executing an algorithm!
簡單來說,演算法就是「把一件事做好的『詳細步驟』」——而且每一步都要明確到不用猜,做完有限步一定會結束。
傳統程式裡的電腦很笨,只會照指令一步步做,不會自己思考。要讓電腦幫我們找資料、算圓周率,我們必須給它一張「絕對不會出錯的說明書」。這張說明書,就叫演算法。
Let's use a game to help children discover that they are already Algorithm Masters.
Phase 1: Experience "Computers are Dumb" (The Blind Robot)
Goal: Children usually assume, "I say it once, and you should get it." But computers don't work like that. We need to let them experience what "Precise Instructions" really mean.
1. Game Setup:
- Role Play: The parent plays the "Blind Robot" (blindfolded), and the child plays the "Programmer."
- Mission: Command the robot to walk from the door and sit on a chair.
Execution & "Debugging":
- Child: "Go forward!"
- Parent (Robot): Intentionally keeps walking until hitting a wall (because the instruction didn't say stop).
- Child: "Stop! Turn!"
- Parent: Spins in circles on the spot (because they didn't say which way or how many degrees).
- Child (Frustrated): "Ugh! I meant turn toward the chair!"
Constructive Scaffolding:
- Teacher: "The robot can't see the chair. It doesn't know where 'that way' is. You have to give it clearer instructions."
- The Revised Algorithm:Guiding Reflection:
- Walk forward 3 steps.
- Turn right 90 degrees.
- Walk forward 2 steps.
- Sit down.
- Summary: "See? This sequence of 'Forward, Turn, Sit' is a walking algorithm!"
Phase 2: Good Methods vs. Bad Methods (Efficiency Matters)
"Some algorithms are faster... allowing us to solve hard problems." We need children to understand that for the same task, how you arrange the steps makes a huge difference.
1. Task: Packing the Schoolbag (The Bin Packing Problem)
- Scenario: Give the child a pile of items of various sizes (textbooks, pencil case, water bottle) and a small backpack.
2. The Bad Algorithm (Random Stuffing):
- Teacher: "Close your eyes, grab anything, and throw it into the bag until it's full."
- Result: It's a mess, space is wasted, and the water bottle won't fit at the end.
3. The Good Algorithm (Greedy Algorithm / Sorting):
- Teacher: "What if we put the Biggest items in first, then use the Small items to fill the gaps? Let's try that."
- Result: Everything fits, and it's neat.
- Summary:「雖然都是『裝書包』,但你的方法(演算法)比較聰明,就能裝更多東西。Google 也是這樣,它用聰明的演算法幫你在數千億個網頁裡,不到一秒就找到你要的資料。」
Phase 3: The Story of Algorithms (The History)
Once the child has a "feel" for steps, we tell the story.
We use the word "Algorithm" frequently in math and computer science every day, but where does its name actually come from? Let's travel back in the river of history to explore how this concept was built.
追溯「演算法」的根源,我們必須認識一位重要的歷史人物:穆罕默德•伊本 •穆薩•花拉子米(Mohammed ibnMusa Al-Khowarizmi—Mohammed)。這位學者,也就是「摩西的兒子,花刺子模人」,大約在 9 世紀初(約 820 年左右),加入了當時位於巴格達、被譽為知識殿堂的「智慧之屋」(House of Wisdom)這個學術中心。
So, what did Al-Khowarizmi do to link his name so tightly to modern science?
His work served as a crucial bridge. He successfully transmitted the art of arithmetic, originally from India, to the vast Arab world. We can understand this as him opening a vital road for the spread of knowledge. Subsequently, this precious arithmetic knowledge spread further from the Arab world to Europe.
知識在翻譯和傳播的過程中會留下印記。更有趣的是,當花拉子米的作品約在 12 世紀初被翻譯成拉丁文時,譯本開頭的第一句正是「Dixit Algorizmi」(花拉子米如是說)。
You see, the word "Algorithm" we use today comes directly from that Latinized name—"Algorismi." This reminds us that today's mathematics and computer science are actually built upon a foundation of cross-cultural exchange and accumulated knowledge between India, the Arab world, and Europe over a thousand years ago. Behind every word we learn, there is a rich historical story hidden.

