Information theory
Information theory is the branch of Mathematics that studies how to measure, store, and send information. It treats information as a choice among possible messages, sets aside what the messages mean, and measures the choice in bits.[1][2] Claude Shannon founded the modern field with his 1948 paper "A Mathematical Theory of Communication".[2]
The theory sets two hard limits. Entropy is the smallest average number of bits needed to describe data, which limits data compression. Channel capacity is the highest rate at which data can be sent over a noisy link and still be recovered with almost no errors.[3]
The basic idea
Information as choice
Shannon described the basic problem of communication as reproducing, at one point, a message selected at another point.[1] He treated meaning as irrelevant to this engineering problem. What matters is that the actual message is one chosen from a set of possible messages.[1]
The size of a message and the knowledge it carries are separate things.[2] Britannica gives the example of Victor Hugo, who sent his publisher a card with only "?" and got back a card with only "!". The cards were full of meaning in context and meaningless without it.[2]
Counting with logarithms
When there are equally likely messages, the information in picking one can be measured by the Logarithm of , a choice Shannon credited to Ralph Hartley.[1] Logarithms make information add up. Two punched cards should hold twice as much as one, and adding one two-state relay doubles the number of states but adds exactly 1 to the base-2 logarithm.[1]
The base of the logarithm sets the unit. With base 2 the unit is the binary digit, or bit, a word suggested by J. W. Tukey.[4] A device with two stable positions, such as a relay, stores one bit, and such devices have states, so they store bits.[4]
| Log base | Unit | Note |
|---|---|---|
| 2 | bit | The usual unit in communication |
| nat (natural unit) | Useful when the work involves calculus | |
| 10 | decimal digit | One decimal digit is about bits |
To change from base to base , multiply by .[1]
Entropy
Surprise of one outcome
Learning that an unlikely event happened tells you more than learning that a likely one did.[5] The information content, or surprisal, of an outcome with probability is
A fair coin landing heads () gives 1 bit. An outcome with probability gives 3 bits.
Average surprise
A discrete random variable is a quantity whose value is set by chance from a list of possible values. The entropy of such a variable is its average information content:[6]
Here is the probability that takes the value , and the sum runs over all possible values. By convention , so outcomes that cannot happen add nothing.[6] Entropy depends only on the probabilities, not on the values themselves.[6]
Shannon noted that the same formula defines entropy in statistical mechanics, for example the H in Boltzmann's H theorem.[1]
Key properties
- Entropy is 0 when the outcome is certain, since there is no uncertainty.[6]
- Entropy is never more than of the number of possible values, and it equals that value only when all values are equally likely.[6]
- Entropy is concave: the entropy of a mix of two distributions is at least the average of their two entropies.[6]
For a coin that lands heads with probability , the entropy is the binary entropy function . It is 0 at and and reaches its maximum of 1 bit at .[6]
Entropy as a game of questions
Entropy also counts the yes-or-no questions needed to find an unknown value. Suppose is , , , or with probabilities , , , and . Its entropy is bits.
Asking "Is ?", then "Is ?", then "Is ?" takes 1.75 questions on average, and no strategy does better.[3] In general, the minimum expected number of yes-or-no questions lies between and .[3]
Measures of shared information
Most problems involve more than one random variable, such as what was sent and what was received. The following measures, all built from entropy, describe how such variables relate.
Joint and conditional entropy
The joint entropy is the entropy of the pair treated as a single variable.[6] The conditional entropy is the uncertainty left in once is known, averaged over the values of .[6] The two are linked by the chain rule:[6]
On average, knowing never increases the uncertainty about , so .[6] A single observation can raise uncertainty, as one piece of new evidence in a court case sometimes does, but evidence lowers it on average.[6]
Mutual information
Mutual information measures how much one random variable tells about another. It is the drop in uncertainty about one variable from knowing the other:[6]
Mutual information is symmetric in and , never negative, and zero exactly when and are independent.[3]
Relative entropy and cross-entropy
Relative entropy, also called the Kullback-Leibler divergence, compares two probability distributions and over the same values:[6]
It measures the cost of assuming the distribution is when it is really . It is never negative and is zero only when , but it is not a true distance, because it is not symmetric and does not satisfy the triangle inequality.[6]
A code designed for needs bits on average to describe values that actually follow .[6] This total is the Cross-entropy, . Mutual information is itself a relative entropy, between the joint distribution and the product .[6]
Summary
| Quantity | Symbol | Plain meaning |
|---|---|---|
| Entropy | Average uncertainty in | |
| Joint entropy | Uncertainty in the pair | |
| Conditional entropy | Uncertainty left in after learning | |
| Mutual information | Information and share | |
| Relative entropy | Extra cost of using in place of the true |
An information diagram shows these relations as overlapping regions, with mutual information as the overlap of and .[6]
Shannon's model of communication
Shannon described a communication system as five parts in a chain:[4]
- An information source picks a message.
- A transmitter turns the message into a signal. A telephone turns sound pressure into electric current, and a telegraph turns letters into dots, dashes, and spaces.
- A channel carries the signal. It may be a pair of wires, a coaxial cable, a band of radio frequencies, or a beam of light, and a noise source may disturb the signal on the way.
- A receiver does the inverse of the transmitter and rebuilds the message from the signal.
- A destination is the person or thing the message is meant for.
The model leads to two central questions. The first asks how far data can be compressed, and the answer is the entropy . The second asks how fast data can be sent reliably, and the answer is the channel capacity .[3] The Shannon-Weaver model page covers this diagram in more detail.
Source coding: compression
The source coding theorem
Shannon's source coding theorem ties compression to entropy. If a source has entropy bits per symbol and a channel can carry bits per second, the source can be coded to send symbols per second for any small , but never more than .[1]
In the language of compression, is a lower bound on the average length of the shortest description of a random variable. Codes exist whose average length is within 1 bit of .[3]
Practical lossless codes
Entropy coding gives short codewords to common symbols and long ones to rare symbols. Two families are widely known:
- Huffman coding, published by David A. Huffman in 1952, is an optimum method for coding a finite set of messages, giving the smallest average number of code digits per message.[7]
- Lempel-Ziv coding, published by Jacob Ziv and Abraham Lempel in 1977, is a universal method. Its compression ratio approaches the best ratio achievable by codes designed for a fully known source.[8] Later dictionary-based variants of the Lempel-Ziv methods replace repeated strings with short codes and are used in GIF image files.[9]
Lossy compression
Some uses do not need an exact copy of the data. Rate-distortion theory asks what rate is needed to describe a source when some distortion is allowed.[3] Shannon proved coding theorems for a source with such a fidelity criterion in 1959.[10]
Channel coding: beating noise
How much gets through
Shannon gave a worked example of a noisy link.[1] A source sends 1,000 symbols per second, each 0 or 1 with equal probability, so it produces 1,000 bits per second. Noise flips 1 symbol in 100 on average.
Subtracting the errors to get 990 bits per second is wrong, because the receiver does not know where the errors are.[1] In the extreme case where the output is independent of the input, half the symbols are still right by chance, yet no information gets through at all.[1]
The right correction subtracts the uncertainty that remains about what was sent after the signal is received. Shannon called this the equivocation, written today as :[1]
This is the mutual information between input and output. In the example, is 0.081 bits per symbol, so the true rate is bits per second.[1]
Channel capacity
A channel is described by the probabilities of each output given each input . Its capacity is the most mutual information any input distribution can achieve:[3]
Capacity is the maximum rate at which information can be sent over the channel and recovered with a vanishingly low probability of error.[3]
The noisy-channel coding theorem
In the early 1940s, engineers thought it impossible to send information at a positive rate with negligible error. Shannon proved that the error probability can be made nearly zero for every rate below capacity.[3] This is the noisy-channel coding theorem.
The theorem relies on codes with long block lengths. Real systems face limits on code complexity, so they may fall short of capacity.[3] Shannon's proof used randomly generated codes rather than building a specific one.[3]
The binary symmetric channel
The binary symmetric channel is the basic example of a noisy channel. It takes a bit as input and delivers it unchanged with probability , or flipped with probability .[3]
Its capacity is[3]
where is the binary entropy function. For , bits per use, which matches Shannon's 1,000-symbol example. For , the output is independent of the input and .
Bandwidth, power, and noise
White Gaussian noise is random noise whose sizes follow a bell curve and whose power is spread evenly across all frequencies. The Shannon-Hartley theorem gives the capacity of a channel with bandwidth hertz, average signal power , and white Gaussian noise power :[11]
The ratio is the signal-to-noise ratio. When , the capacity equals bits per second. Capacity grows in proportion to bandwidth but only with the logarithm of the signal-to-noise ratio.
Hartley's name is attached to the formula through a counting argument called Hartley's rule, but Rioul and Magossi note that Hartley's 1928 paper never mentions signal versus noise.[11] At least seven authors derived similar formulas independently in 1948.[11]
Error-correcting codes in practice
Coding theory designs the codes that the coding theorem promises exist. For about half a century, its central goal was practical codes that come close to capacity on well-understood channels.[12] Turbo codes and the rediscovery of low-density parity-check codes reached that goal in many practical cases by the mid-2000s.[12]
| Code family | Introduced | Key point |
|---|---|---|
| Hamming codes | 1950, Richard Hamming | Correct any single error; the (7, 4) code appears in Shannon's 1948 paper[12][13] |
| BCH and Reed-Solomon codes | 1959 to 1960, three independent papers | Reed-Solomon codes work well against bursts of errors[12] |
| Low-density parity-check (LDPC) codes | 1960, Robert Gallager | Decoded by passing messages on a graph, the first appearance of the sum-product algorithm[12][14] |
| Turbo codes | 1993, Claude Berrou, Alain Glavieux, Punya Thitimajshima | Error correction near the Shannon limit[15] |
| Polar codes | 2009, Erdal Arıkan | Proven to reach capacity on symmetric binary-input channels without memory[16] |
Modern mobile networks use these codes. In 5G NR, LDPC codes carry user data and polar codes carry control information, replacing the convolutional and turbo codes of 4G LTE.[17] The broader practice is covered under error detection and correction.
Why the theorems work: typical sequences
Both main theorems rest on the asymptotic equipartition property. For a sequence of symbols, the sample entropy is
For long sequences, almost all sequences that occur are typical, meaning their sample entropy is close to , and there are about of them.[3] This set is called the typical set.
Compression follows directly. Shannon's first proof of the source coding theorem splits all sequences of symbols into a high-probability group with fewer than members and a remainder with total probability less than , where and both shrink toward zero as grows.[1] Indexing only the typical sequences takes about bits, or bits per symbol.
The channel side uses the same idea. Capacity is the logarithm of the number of input signals that stay distinguishable after noise.[3] Choosing codewords whose noisy versions do not overlap is like packing spheres in a space with many dimensions.[3]
History
Before 1948
Shannon wrote that a basis for his theory was contained in papers by Harry Nyquist (1924) and Ralph Hartley (1928).[4] Both men worked at Bell Labs.[4] Warren Weaver also traced the ideas back to Boltzmann's 1894 observation, pointed out by John von Neumann, that entropy is related to missing information.[4]
Shannon's paper
Shannon's paper appeared in the Bell System Technical Journal in 1948 and was reprinted as a book with Weaver in 1949.[11] It extended earlier work to include channel noise and the savings possible from the statistical structure of messages.[1] The practical spur was the telephone system, especially how to carry as many conversations as possible over existing cables.[2]
Shannon said communication theory owed a great debt to Norbert Wiener for much of its basic philosophy. Wiener in turn credited Shannon with independently developing the entropy ideas.[4]
Growth of the field
The theory spread quickly after 1948 to fields such as art and business. In a 1956 editorial titled "The Bandwagon," Shannon warned against applying it to every problem and field.[2]
The history of information theory page covers these events in more depth.
Connections to other fields
Information theory overlaps physics, mathematics, electrical engineering, and computer science.[3]
- Physics: in statistical mechanics, entropy is roughly the logarithm of the number of ways a physical system can be arranged.[3]
- Computer science: Kolmogorov, Chaitin, and Solomonoff defined the complexity of a data string as the length of the shortest program that prints it. For a sequence drawn at random from a distribution with entropy , this complexity is about .[3] This is the core of algorithmic information theory.
- Probability and statistics: the chance that observations land in a rare set of outcomes is about , where is the relative entropy between the closest distribution in that set and the true distribution.[3] Relative entropy also sets the best error exponent in hypothesis tests, which is how fast the error probability shrinks as grows.[3]
- Economics: in a horse race with uniform odds, the best growth rate of wealth plus the entropy of the race is constant, and side information raises the growth rate by exactly the mutual information.[3] See gambling and information theory.
- Cryptography: in 1949 Shannon showed that perfect secrecy needs at least as many possible keys as possible messages, which the one-time pad meets.[18] This is the basis of information-theoretic security.
- Machine learning: most modern neural networks are trained by maximum likelihood, which means minimizing the cross-entropy between the training data and the model's distribution.[19]
- Quantum physics: quantum information theory studies sending information with quantum systems, and research on it began in the 1960s.[20]
References
- A Mathematical Theory of Communication, C. E. Shannon, Bell System Technical Journal, 1948.
- Information theory, Encyclopaedia Britannica.
- Elements of Information Theory, 2nd edition, T. M. Cover and J. A. Thomas, Wiley, 2006.
- The Mathematical Theory of Communication, C. E. Shannon and W. Weaver, University of Illinois Press, 1963.
- Probability and Information Theory, I. Goodfellow, Y. Bengio and A. Courville, Deep Learning, MIT Press, 2016.
- Entropy, Relative Entropy and Mutual Information, T. M. Cover and J. A. Thomas, Elements of Information Theory, Wiley, 1991.
- A Method for the Construction of Minimum-Redundancy Codes, D. A. Huffman, Proceedings of the IRE, 1952.
- A universal algorithm for sequential data compression, J. Ziv and A. Lempel, IEEE Transactions on Information Theory, 1977.
- Milestones: Lempel-Ziv Data Compression Algorithm, 1977, Engineering and Technology History Wiki, IEEE.
- Coding Theorems for a Discrete Source With a Fidelity Criterion, C. E. Shannon, IRE National Convention Record, 1959.
- Shannon's formula and Hartley's rule: A mathematical coincidence?, O. Rioul and J. C. Magossi, HAL open archive, 2019.
- Channel Coding: The Road to Channel Capacity, D. J. Costello and G. D. Forney, Proceedings of the IEEE, 2007.
- Error Detecting and Error Correcting Codes, R. W. Hamming, Bell System Technical Journal, 1950.
- Low density parity check codes, R. G. Gallager, Sc.D. thesis, Massachusetts Institute of Technology, 1960.
- Near Shannon limit error-correcting coding and decoding: Turbo-codes, C. Berrou, A. Glavieux and P. Thitimajshima, Proceedings of ICC '93, IEEE, 1993.
- Channel polarization: A method for constructing capacity-achieving codes for symmetric binary-input memoryless channels, E. Arıkan, IEEE Transactions on Information Theory, 2009.
- An overview of channel coding for 5G NR cellular communications, APSIPA Transactions on Signal and Information Processing, Cambridge University Press, 2019.
- Communication Theory of Secrecy Systems, C. E. Shannon, Bell System Technical Journal, 1949.
- Deep Feedforward Networks, I. Goodfellow, Y. Bengio and A. Courville, Deep Learning, MIT Press, 2016.
- Quantum Shannon Information Theory: Design of communication, cipher and sensor, arXiv, 2025.
