The whole, before the parts

Information theory measures messages the way a scale measures weight: without caring what they mean. Claude Shannon's one idea carries it all — the information in a message is how surprising it is, so the less probable the message, the more it tells you. From that single move follow hard numerical limits: how far any data can be compressed, how fast any channel can carry messages, and when errors become unavoidable. These are limits in the same sense as the speed of light — no cleverness gets past them, and knowing where they sit tells you what an engineering effort can and cannot achieve. Citation needed

Terminology and core concepts

  1. Information as surprise

    The information in an outcome of probability p is log₂(1/p), measured in bits — one bit is the information in a fair coin flip — so halving an outcome's probability adds exactly one bit of surprise. Citation needed

    How much information is in a fair coin flip?
    1 bit Citation needed
    How much information is in an outcome of probability 1/8?
    3 bits Citation needed
    How much information is in an outcome that was certain?
    zero Citation needed
    Why a logarithm rather than 1/p directly?
    so independent surprises add instead of multiply Citation needed
    Does information theory weigh a message's meaning?
    no — only its probability Citation needed
  2. Entropy of a source

    Entropy is the average surprise per message: weight each outcome's log₂(1/p) by its probability and sum, written H = Σ p log₂(1/p). Citation needed

    What is the entropy of a fair coin?
    1 bit per flip Citation needed
    What is the entropy of a two-headed coin?
    0 bits Citation needed
    What is the entropy of a fair eight-sided die?
    3 bits per roll Citation needed
    What does each outcome contribute to entropy?
    its surprise, weighted by its probability Citation needed
    What does high entropy say about predicting the source?
    it is hard to predict Citation needed
  3. When entropy peaks

    For a fixed number of outcomes, entropy is largest when they are equally likely and shrinks as the distribution skews — bias is predictability, and predictability is low entropy. Citation needed

    Which distribution over n outcomes maximizes entropy?
    the uniform one Citation needed
    What is the maximum entropy over n outcomes?
    log₂ n bits Citation needed
    Which has higher entropy: a 90/10 coin or a 60/40 coin?
    the 60/40 coin Citation needed
    What does skewing a distribution do to its entropy?
    lowers it Citation needed
  4. Redundancy

    Redundancy is the gap between a source's actual entropy and the maximum its alphabet allows; English text is heavily redundant, which is why you can read a sentence with its vowels removed. Citation needed

    What is redundancy the gap between?
    actual entropy and the alphabet's maximum Citation needed
    Why is "q is almost always followed by u" redundancy?
    the u is nearly predictable, so it carries little information Citation needed
    What does redundancy make possible when a message is damaged?
    reconstruction from what remains Citation needed
    What does a compressor do to redundancy?
    removes it Citation needed
    Is redundancy always waste?
    no — it is the raw material of error correction Citation needed
  5. The compression limit

    Shannon's source coding theorem: a source of entropy H bits per symbol cannot be compressed below an average of H bits per symbol without losing information — entropy is the floor, and good codes approach it by giving likely symbols the short codewords. Citation needed

    What sets the floor on lossless compression?
    the source's entropy Citation needed
    Why do good codes give frequent symbols short codewords?
    frequent symbols carry fewer bits of surprise Citation needed
    What happens if you compress a file twice?
    almost nothing — the redundancy is already gone Citation needed
    Why will random data not compress?
    its entropy already equals its length Citation needed
    How does lossy compression beat the entropy floor?
    by discarding information, not by encoding it Citation needed
  6. Noise and the channel

    Noise is whatever randomly corrupts symbols in transit; what a noisy channel delivers is the sent information minus what the noise destroys, so the useful rate of a channel is a property of the pair: signal and noise together. Citation needed

    What does noise do to a transmitted symbol?
    randomly corrupts it Citation needed
    What is the receiver uncertain about on a noisy channel?
    which sent symbol produced what arrived Citation needed
    A channel flipping every bit with certainty: how noisy is it, informationally?
    not at all — flip them back Citation needed
    Which binary channel is informationally worst?
    one flipping bits with probability 1/2 Citation needed
  7. Channel capacity

    Every channel has a capacity — a maximum rate in bits per use — and Shannon's noisy channel coding theorem says errors can be made as rare as desired at any rate below capacity, while above it some errors are unavoidable no matter the scheme. Citation needed

    What is possible at rates below capacity?
    arbitrarily low error rates Citation needed
    What is guaranteed at rates above capacity?
    some errors, no matter the code Citation needed
    What is the capacity of a noiseless binary channel per use?
    1 bit Citation needed
    What was surprising in Shannon's result?
    noise limits rate, not achievable accuracy Citation needed
    What is the price of pushing error rates down near capacity?
    long block codes and coding delay Citation needed
  8. Error-correcting codes

    An error-correcting code adds structured redundancy on purpose, so the receiver can detect and repair corrupted symbols — compression and error correction are opposite moves: one strips redundancy, the other installs it. Citation needed

    What does an error-correcting code add to a message?
    structured redundancy Citation needed
    How does triple repetition (send each bit three times) decide a bit?
    majority vote Citation needed
    How many single-bit flips can triple repetition correct per bit?
    one Citation needed
    In what order do real systems compress and encode?
    compress first, then add code redundancy Citation needed
    Can a parity bit detect a single flipped bit?
    yes Citation needed
    Can a parity bit locate a flipped bit?
    no Citation needed

Problems that prove it

  1. Compute the entropy of a coin with P(heads) = 3/4, and compare it to a fair coin.

    Drills: the entropy sum, term by term.

    Derivation steps
    1. Heads: surprise log₂(4/3) ≈ 0.415 bits, weighted by 3/4 → 0.311.
    2. Tails: surprise log₂ 4 = 2 bits, weighted by 1/4 → 0.5.
    3. Sum: H ≈ 0.811 bits per flip.
    4. The fair coin gives 1 bit; bias toward heads made the source more predictable, so entropy fell.

    Citation needed

  2. You must find one marked card among 64 using yes/no questions. What is the minimum number of questions, and what strategy achieves it?

    Drills: entropy as a question-counting bound.

    Derivation steps
    1. With all 64 cards equally likely, the entropy is log₂ 64 = 6 bits.
    2. A yes/no answer delivers at most 1 bit, and exactly 1 only when the question splits the remaining cards in half.
    3. So at least 6 questions are needed.
    4. Strategy: halve each time — 64 → 32 → 16 → 8 → 4 → 2 → 1 in exactly 6 questions.
    5. Any lopsided question averages less than a bit and wastes part of a question.

    Citation needed

  3. A source emits A half the time, B a quarter, and C and D an eighth each. Find the entropy and a code that meets it exactly.

    Drills: the source coding theorem made concrete.

    Derivation steps
    1. Entropy: (1/2)(1) + (1/4)(2) + (1/8)(3) + (1/8)(3) = 1.75 bits per symbol.
    2. Give each symbol a codeword as long as its surprise: A → 0, B → 10, C → 110, D → 111.
    3. No codeword is a prefix of another, so the stream decodes unambiguously.
    4. Average length: (1/2)(1) + (1/4)(2) + (1/8)(3) + (1/8)(3) = 1.75 bits — the entropy floor, achieved.
    5. A naive fixed 2-bit code uses 2.00 bits per symbol; the saved 0.25 was pure redundancy.

    Citation needed

Sources

  • Claude Shannon and Warren Weaver, The Mathematical Theory of Communication — the founding paper, still readable, with Weaver's gentle introduction.
  • John R. Pierce, An Introduction to Information Theory: Symbols, Signals and Noise — the best non-specialist treatment of surprise, capacity, and coding.
  • Thomas M. Cover and Joy A. Thomas, Elements of Information Theory — the standard rigorous textbook, for when the notes are too thin.

Learning path

Continue through Systems & Information Theory in order, using the concepts above to connect this topic to the next.