JOVANA
Library Glossary Getting Started Three Levels Fields How it works Mission
Join the mission
Back to the library
資訊理論 / 計算機科學 1948

通訊的數學理論

克勞德·香農

資訊可以用位元來度量——而且即便通過有雜訊的通道,也能被無誤地傳送。

Choose your version
In depth · the introduction

香農找到了度量「資訊本身」的辦法——用位元——並證明:即便在一條充滿雜訊、劈啪作響的線路上,你也能把一條消息完美無誤地傳過去。

把這個想法拆開看

香農的第一個洞見聽上去很怪:要用數學處理通訊,就別管一條消息「是什麼意思」。要緊的,是它有多「出人意料」。一個你本就能猜到的符號,幾乎什麼都沒告訴你;一個出乎意料的,則告訴你很多。他把這一點變成了度量資訊的單位——位元,也就是一道「是或否」問題的答案。每一段文字、每一張照片、每一首歌、每一部影片,歸根結底,都只是一堆位元。

接著,他證明了兩件了不起的事。第一,一條消息在不丟失任何內容的前提下能被壓到多小,是有一個硬性地板的——那就是它真正的資訊量,不能再小。第二,也更驚人:每一條線路,都有一個誠實的最高速度,只要你保持在它之下,巧妙的額外編碼就能讓消息幾乎零錯誤地抵達——哪怕穿過雜訊。這正是為什麼一張劃傷的碟仍能播放,而一張來自遙遠飛船的照片,也能清晰無比地傳回。

它從哪裡來

1948 年,克勞德·香農——貝爾實驗室一位 32 歲的工程師兼數學家——在公司的技術期刊上發表了一篇長論文。在電話與電報線路的種種實際問題之間,他造出了遠為宏大的東西:一套完整的通訊數學理論,幾乎是一出手就已成形。它甚至引入了「bit(位元,二進位位)」這個詞,香農把它的功勞歸於同事約翰·圖基。這篇論文,一夜之間奠定了一整個領域。

它為何重要

在香農之前,「資訊」是個含糊的念頭;在他之後,它成了一個有硬性極限、可度量的量。他給了工程師兩顆北極星——一條消息最小能被壓到多小(它的熵),與一條通道最快能承載多少(它的容量)——並證明:只要低於那道極限,穿過雜訊的可靠通訊永遠是可能的。此後的每一台數位設備,都在追逐這兩個數。

意外,就是資訊

設想一位朋友給你發天氣。在一片天天都晴的沙漠裡,「晴」什麼都沒告訴你——你早就知道。可「下雪了!」卻是個驚人的消息,滿載資訊。香農把這件事說精確了:一條消息越罕見、越出人意料,它攜帶的位元就越多;越可預測,就越少。在下方親手調一調機率,看看資訊量的指針如何回應。

一個可互動的熵度量器:四個滑桿設定每個符號的機率;長條顯示各自的機率與意外度(−log₂ p),讀數給出熵 H = −Σ pᵢ log₂ pᵢ(位元)——四者等機率時最高(2 位元),某一個獨大時趨近於零。專家面板另給出上限 log₂n、冗餘度與效率。

你在哪裡遇見它

你每天都倚賴香農的理論數十次,卻毫無察覺。它在你壓縮的每一個檔案裡,在被壓得更小的每一張照片、每一首歌裡,在弱信號下仍撐得住的每一通電話、每一段影片裡,在被弄髒了仍能掃出的每一個二維碼裡。同樣的思想,如今也驅動著機器學習與密碼學的一部分——任何需要度量不確定性的地方。

The original document
Original source text

通訊的根本問題

C. E. Shannon · The Bell System Technical Journal 27 (1948): 379–423, 623–656
The fundamental problem of communication is that of reproducing at one point either exactly or approximately a message selected at another point.
Frequently the messages have meaning … These semantic aspects of communication are irrelevant to the engineering problem. The significant aspect is that the actual message is one selected from a set of possible messages. The system must be designed to operate for each possible selection, not just the one which will actually be chosen since this is unknown at the time of design.

選擇,與那個叫「位元」的單位

If the number of messages in the set is finite then this number or any monotonic function of this number can be regarded as a measure of the information produced when one message is chosen from the set, all choices being equally likely. … The logarithmic measure is more convenient. … The resulting units may be called binary digits, or more briefly bits, a word suggested by J. W. Tukey.

熵——H = −Σ pᵢ log pᵢ

Quantities of the form H = − Σ pᵢ log pᵢ play a central role in information theory as measures of information, choice and uncertainty.
H is largest when the choices are most uncertain — all equally likely — and falls to zero when one outcome is certain. It is, in Shannon's words, a measure of how much “choice” is involved in the selection of a message.

有雜訊通道的基本定理

Theorem: Let a source have entropy H bits per symbol and a channel have a capacity C bits per second. Then it is possible to transmit at the average rate C/H symbols per second over the channel with arbitrarily small frequency of errors.
Bell Telephone Laboratories · 1948