I♡PM ▶ Mid-Autumn 2021

At mid-autumn of the lunar calendar, the moon is full and bright.

Most likely you'll use your smartphone to snap a photo of such a beauty. Do you realise that your smartphone is a product of pure math?

To know why, read on. Otherwise, skip to a movie【M1】, or switch to a song, as always.

This is because a smartphone (or tablet, or laptop, or desktop) is a computer, and a computer is a 'universal calculator'.

You play with your smartphone. You have some idea of a computer. But what is a 'universal calculator'?

That's math: not ordinary math, but pure math — the math of logic.

適逢農曆中秋,夜月又圓滿、又光亮。

如此美景,或者你會使用智能手機拍照。但可知道,智能手機是純數學的產品?

要理解原因,請繼續閱讀。否則,像往常一樣,請跳到電影【M1】或切換到歌曲

這是因為:智能手機(或平板電腦、筆記本電腦、桌面電腦)是一台電腦,而電腦其實是「萬能計算機」。

你認識自己的智能手機,你對電腦有一些印象。但什麼是「萬能計算機」?

那是數學:不是普通的數學,而是純數學 — 邏輯的數學。

Alan Turing Alan Turing (艾倫·圖靈)

The banknote started circulation on 23 June 2021, Alan Turing's birthday. Click to enlarge (click again to close)
2021年6月23日,即艾倫·圖靈 (Alan Turing) 的生日,該鈔票開始流通。 點擊放大(再擊關閉)
A 'universal calculator', also called a universal machine, is an exceptional kind of Turing machine, a math computation device. These machines are named in honour of Alan Turing, featured on the new £50 banknote of 2021 in England【A1】.

Known as the father of computing, Alan Turing was born in 1912. As a young boy, he was shy, and became attached to his mother, Sara Turing.

When little Alan first learned arithmetic, he had trouble doing long multiplication. Sara patiently explained the method: getting row by row, shifting and adding, doing step by step.

This idea of solving a math problem by breaking down into simple parts, then work out the steps, planted a seed in Alan's mind. He became fascinated with math, showing his talents in tackling math problems. He used his own method, sometimes even invented his own notation.

Before he was 16, he read Einstein's work. He grasped it totally, and wrote a little pamphlet on relativity for his mother【A2】.

In this episode, we shall take a look at:

Remember, it is ok not to understand, just to admire is enough.
「萬能計算機」又稱萬能機,是一類獨特的圖靈機,一種數學計算裝置。機器的命名,紀念艾倫·圖靈(Alan Turing)。2021年,英格蘭新發行的50英鎊鈔票,印上他的頭像【A1】。

生於1912年的 Alan Turing,有「計算機之父」之稱。年幼時為害羞男孩,總是常常依附母親 Sara Turing (薩拉·圖靈) 。

小小 Alan 起初練習算術時,不懂如何做長乘法。Sara 耐心地講解方法:逐行計算,移位相加,循序漸進。

他意識到:解決數學問題,首先分解成為簡單的部分,然後製定步驟。這種想法,在 Alan 內心開始萌芽。他漸漸對數學著迷,在對付數學難題時,展現自己的才華。他自創方法,甚至自創符號。

仍未滿16歲,已閱讀愛因斯坦的著作。他完全掌握內容,並寫了一本「相對論」小冊子,送給母親【A2】。

本期節目,我們一齊來看一看:

可記得:唔明唔緊要,只要懂欣賞。

Smartphone 智能手機

History and Evolution of Smartphone. Click to enlarge (click again to close)
智能手機的歷史和演變。 點擊放大(再擊關閉)
A smartphone is a computer, sometimes regarded as an 'electronic brain'. If you are not shocked by this, think again.

Isn't this incredible: something inside your smartphone is busily calculating, doing math, all the time? Why so many calculations? What are they, and what's the math? Just one thing is calculating, or many things are calculating in union?

The word 'computer' originally means someone who computes, that is, a human calculator. Throughout history, teams of such computers were employed in the computation of math tables,

Before the 90s, teachers in schools and colleges turned into human computers prior to the end of school year. That was the time when marks from mid-term exam and final exam would be combined by a formula to deliver the yearly marks. Students waited patiently for this 'computer' to stop, to learn their fate in study.

Modern computers do not rely on manpower. Nonetheless, their work is essentially the same: just calculating much faster. What exactly are the things that need a lot of calculations? Using the example of taking a photo with your smartphone,

If the smartphone is taking a video, there are more computations: When the smartphone is set up with backup to the cloud, think of all the extra computations【B1】!
智能手機,是一台計算機,亦稱「電腦」。如果你對此不感到驚訝,請再想一想。

在智能手機內,原來有某些東西,一直在忙於計算、作數學運算。難道這不是匪夷所思?為什麼需要這麼多計算?計算什麼,有什麼數學根據?只有一個在計算,還是有多個在合作計算?

「computer」一詞,最初是指:計算的人,即計算員。縱觀歷史,數學表的計算,往往要徵用計算員團隊來完成:

90年代前,小學、中學的教師,在學年結束前,都化身為計算員。當時,期考和大考的分數,要用公式結合,以提供年度分數。學生們耐心等待這台「計算機」停下來,以了解學業前途。

儘管現代計算機不靠人力,兩者工作原理基本相同:只是計算速度快得多。究竟有什麼東西,需要大量計算?以使用智能手機拍照為例,

如果用智能手機拍攝視頻,則需要進行更多計算: 倘若智能手機設置為雲端備份,想想其他額外的計算【B1】!

Computer 電腦

A computer consists of two parts: software and hardware. Together, a computer takes input, and gives output: .---------. | input | '----+----' | v .----------------------------------------------. | Software (apps, operating system, etc.) | | | | .----------------------------------------. | | | Hardware (microprocessor, memory, etc.) | | | | | | | '----------------------------------------' | | | '---------------------+------------------------' | v .--------. | output | '--------' Schematic diagram of a computer. Your smartphone screen shows a lot of icons. Each icon is an app, short for application, a piece of software. Touching an icon runs an app. The touchscreen serves both as input and output.

Inside your smartphone lies the hardware, the high-tech electronics that run the software.

The most important piece of hardware is the heart of the computer: a microprocessor. Like the human heart, it ticks along, driven by an internal clock. Do you know how fast is the microprocessor clock【C1】?

電腦由兩部分組成:軟件和硬件。兩者功能互補,電腦接受輸入,並給予輸出: .---------. | 輸 入 | '----+----' | v .-------------------------------------. | 軟 件( 應 用 程 序 、 操 作 系 統 等 ) | | | | .----------------------. | | | 硬 件( 微 處 理 器 、 記 憶 等 )| | | | | | | '----------------------' | | | '-----------------+-------------------' | v .--------. | 輸 出 | '--------' 電 腦 示 意 圖 。 智能手機屏幕,會顯示很多圖標(icon)。每個圖標,都是 app,應用程序的縮寫(application),是軟件。點擊圖標,運行應用程序。輕觸屏幕,作輸入和輸出。

硬件一般藏在智能手機內部,即運行軟件的高科技電子設備。

最重要的硬件,是計算機的心臟:微型處理器。如同人的心臟,它不停忐忑跳動,因為有內置時鐘驅動。估算一下,微型處理器的時鐘,到底有多快【C1】?

Turing Machine 圖靈機

What is Alan's Turing machine? Well, he was solving a deep problem — a math logic problem. He started from the beginning: how to logically compute 1 + 1 = 2?

This sounds simple. As children we all learn how to do this: show one finger, add one more, then count. However, this is not by logic. This finger-counting method runs into trouble when doing, for example, 17 + 13.

For a logical way, the first thing to realise is this: numbers are just symbols.

There are many ways of using symbols to denote numbers. In fact, the Chinese language uses strokes for simple numbers: 1(一), 2(二), 3(三). Following Alan Turing's thoughts, think of a tape, dividing into squares.

Alan 的圖靈機,到底是什麼?嗯,他正在解決一個深奧的問題 — 數學邏輯問題。他從基本開始:如何邏輯地計算 1 + 1 = 2?

這似簡單,小孩子都懂得如何做:伸出一根手指,再加一根,然後數手指。然而,這不是應用邏輯!例如計算 17 + 13 時,數手指有點麻煩。

從邏輯上講,首先要意識到:數字只是符號

表示數字,使用多種符號。例如,中文用筆劃:1(一)、2(二)、3(三),來表示簡單數字。按照 Alan Turing 的想法,想像一條長紙帶,分成正方格。

To be as simple as possible, just use two symbols: black square or white square. For the addition 1 + 1 = 2, the start and end can be represented on the tape as:
為求簡單,只需使用兩個符號:黑白方格。加法 1 + 1 = 2 的開始和結束,可以在方格上表示為:
Input:輸入: representing 1 and 1, to be added. 代表兩個1,要相加。
Output:輸出: representing 2, the result. 代表結果2。
To do addition logically is to manipulate symbols, from input to output. For this, we need to invent a simple 'math brain', and some simple rules.
邏輯的加法,是符號操作,把輸入轉化成輸出。為此,要發明一個簡單的「數學腦」,及一些簡單的規則。

Simple Idea 簡單的想法 (show)(顯示)

Simple Machine 簡單的機器 (show)(顯示)

Computing Machine 計算機 (show)(顯示)

Universal Machine 萬能機 (show)(顯示)

Turing's Paper 圖靈論文

In 1936, Alan Turing published his paper, On Computable Numbers, with an Application to the Entscheidungsproblem.

Computable numbers are numbers that can be computed mechanically, by a Turing machine. Since a universal machine can simulate any Turing machine, a universal machine can compute any computable number.

However, when applying logic to analyse the universal machine, Alan Turing found that: there are numbers that cannot be computed by a universal machine. These are called uncomputable numbers.

Entscheidungsproblem is a German word for the Decision Problem. This was first proposed by David Hilbert, a preeminent German mathematician of the 19th and early 20th century. He would like to settle a fundamental problem: is math just a logic game?

1936年,Alan Turing 發表論文《論可計算數,及其在 Entscheidungsproblem 中的應用》。

「可計算數」(computable numbers)指凡是利用機械計算的數,即圖靈機能夠計算的數。由於萬能機模擬任何圖靈機,一台萬能機可以計算任何「可計算數」。

然而,Alan Turing 應用邏輯,分析萬能機的性能,發現:有些數字,是萬能機也無法計算出,稱為「不可計算數」(uncomputable numbers)。

Entscheidungsproblem 是德語詞,意思是「判定問題」,由 David Hilbert 首先提出。在19世紀到20世紀初,他是傑出的德國數學家。他想解決一個基本問題:數學是否只是邏輯遊戲?

Game of Logic 邏輯遊戲 (show)(顯示)

Dream of Logic 邏輯夢想 (show)(顯示)

Reality of Logic 邏輯現實 (show)(顯示)

Turing's Legacy 圖靈的傳承

Alan Turing, around 1950. This is used on the banknote. Click to enlarge (click again to close)
艾倫·圖靈(Alan Turing)大約在1950年,頭像在鈔票上使用。 點擊放大(再擊關閉)
Today, Alan Turing is recognized as one of the greatest minds of the 20th century【F1】: In summary, Alan Turing conceived a simple idea to solve the deepest math problem. There is beauty seeping through simplicity. | a simple idea ... | a simple method ... | ... the deepest math problem | |-------------------------|-------------------------|-----------------------------------| | Use machine to compute | have states and steps | that's the essence of computation |

A smartphone is a piece of technological beauty: minimal in design, maximal in utility. No wonder it becomes a part of modern life. Yet, the theoretical foundation of such a device is precisely the Turing machine!

Moreover, a smartphone is a piece of technological wonder: holding in your hands is a computer, with hardware inside and software outside. The hand-held device is much more powerful than the on-board computer guiding astronauts landing on the Moon. Yet conceptually, any computer is just a realisation of the Turing machine!

For more information about him, see my page on Alan Turing. The page offers another take on Turing machine, universal machine, and the Decision Problem. The page also has a movie, as well as some books, about Alan Turing.

今天,Alan Turing 被公認為20世紀最偉大的思想家之一【F1】: 總而言之,Alan Turing 構思了最簡單的想法,來解決最深奧的數學問題。單純中透出美麗。 | 簡單的想法 ... | 簡單的方法 ... | ... 深奧的數學問題 | |----------------|----------------|--------------------| | 使用機器進行計算 | 利用狀態和步驟 | 這就是計算的抽象本質 |

智能手機,是科技之美:設計極簡約,實用性極高,難怪成為現代生活的一部分。然而,這種設備的理論基礎,正是圖靈機!

況且,智能手機是科技奇蹟:手握是一台電腦,內有硬件,外有軟件。手提設備,比太空人登月的導航電腦強大得多,但概念上任何電腦,都只是圖靈機的一種實現!

了解更多有關他的訊息,請參閱我的 Alan Turing 網頁。該頁面從另一角度,探討圖靈機、萬能機和判定問題,還有關於 Alan Turing 的電影和書籍。

Like An Old Friend Comes 似是故人來

Clarke (played by Keira Knightley) was the only woman to work alongside Turing (played by Benedict Cumberbatch). Click to enlarge (click again to close)
Clarke(Keira Knightley 飾演)是唯一與 Turing(Benedict Cumberbatch 飾演)一起工作的女性。 點擊放大(再擊關閉)
The historical movie The Imitation Game (2014), was based on the life story of Alan Turing. He was homosexual, but he tried to act normal, playing his own 'Imitation Game'.

Alan Turing did propose to Joan Clarke, a female codebreaker in Bletchley Park. Their relationship did not blossom, as Alan was devoted to his favourite friend Christopher Morcom. Christopher was his fellow classmate who taught him crytography. Alan regarded Christopher as a talent. but he died without telling Alan his existing illness. Alan was devastated, and vowed to work hard to match the talent of Christopher, as an honour of their friendship.

The script altered some historical details to make up for an enticing story (see link). Alan built several codebreaking machines called 'Bombes' due to the loud clickering noise, but in the movie, Alan built only one, and named it Christopher. At the end of the movie, Joan Clarke came to visit Alan. Two old friends met, but Alan was no longer his former self after chemical therapy【G1】.

This brings up a 1991 Hong Kong movie, Twin Bracelets, about the mutual love between two village girls. The story was tragic, and Like An Old Friend Comes is the theme song. The lyricst Albert Leung (林夕, real name 梁偉文), is a famous writer born in Hong Kong.

Being a sensitive subject, Albert Leung wrote the lyrics with only hidden references. How to be subtle, but not too abstract? He hit upon math. He made use of double words, units in arithmetic, and units in geometry. He played tricks on words, using numbers (1, 2, 3, 10, 10000), time (day, month, year), math (dots and lines), nature (wind, rain), and the faraway moon!

2014年的歷史電影《模仿遊戲》,是根據 Alan Turing 的生平故事改編。他是同性戀者,但試圖表現正常,演譯自己的「模仿遊戲」。

的確,Alan Turing 曾向 Bletchley Park 的女密碼破解員 Joan Clarke 求婚。他倆感情並沒有開花,因為 Alan 心儀摯友 Christopher Morcom。Christopher 是他的同窗,曾教他密碼學。Alan 認為 Christopher 是天才,但他去世前沒有告訴 Alan 他的隱疾。Alan 傷心欲絕,發誓要努力向上,與 Christopher 的才華相匹配,作為對他們友誼的致敬。

劇本修改了一些歷史細節,組成一個引人入勝的故事(參見連結)。Alan 建造不只一台密碼破譯機,由於響亮的咔嗒聲,只稱為 Bombe。在電影中,Alan 只建造一台,並命名為 Christopher。電影結束時,Joan Clarke 拜訪 Alan。兩位故人重逢,但 Alan 經過化學治療後,已大不如前【G1】。

這帶出另一部影片,1991年的香港電影《雙鐲》,講述兩個鄉村女孩的傾慕。故事的發展是悲劇,主題曲是《似是故人來》。填詞人林夕(Albert Leung),本名梁偉文,是香港土生土長的著名文字工作者,

由於題材敏感,林夕填寫歌詞避重就輕。如何表達微妙但不太抽象?自然想到數學。他使用疊字、算術單位和幾何單位。玩弄文字把戲,用數字(1、2、3、10、10000)、時間(日、月、年)、數學(點、線)、自然(風、雨)和遙遠的月亮!

Epilog 後記

In 1936, aged 23, Alan invented his Turing machine, a simple device to crack the hardest math problem. From Turing machine back to smartphone, we can connect these two dots (點點) by two links (連連), via a critical idea, the computer: ___________ .------------. / / .---------------. | Smartphone | *----->/ Computer +----->* | Turing Machine | '------------' /__________/ '---------------' In the diagram above, you can see dots, links, and 1, 2, 3. I see beauty in the logic behind. You can form your own opinion.

Pairing up connecting dots, uniting people at full moon,
I♡PM (20 September, 2021)

1936年,23歲的 Alan,發明了他的圖靈機,是一種簡單設備,解決最艱深的數學問題。從圖靈機返回智能手機,我們可以利用兩線連接(連連),結合這兩點子(點點),通過一個關鍵的構想:電腦: ___________ .------------. / / .----------. | 智 能 手 機 | *----->/ 電 腦 +----->* | 圖 靈 機 | '------------' /__________/ '----------' 從上圖,可以看見點點、連連,1、2、3。背後的邏輯,是否很美?見仁見智啦!

點點連連、雙雙對對,人月兩團圓。
I♡PM (2021年9月20日)

Notes and Links 說明及連結