Shelves / Information Theory
Computer Science, Applied · Book 1
Information Theory
How much information a message carries, how far it can be squeezed, and how fast it can cross a noisy line, from first principles. It assumes only school arithmetic and the logarithms of Mathematics Book 1; probability is built as it's needed. Every chapter measures its ideas on real data in Python: the letters of Shakespeare's plays, files on disk, simulated noisy channels, passwords and DNA. By the end you can compute the entropy of any source, build an optimal code, say exactly what compression can and can't do, and read cross-entropy in a machine-learning paper as the same idea.
How to read this book
Read in order: each chapter builds on the ones before. Work every example before you open its solution, and run the lab's code yourself: the ideas only become solid when you've seen the numbers come out. The exercises at the end of each chapter go from routine to hard. The capstone, Squeeze, builds a working compressor one stage per chapter.
How to use this book
- Read one topic at a time. Each topic heading has a Done tick. Tick it only when you can explain the idea aloud without looking.
- Do the worked examples and practicals yourself before opening their solutions.
- Take the chapter quiz at the end. A score of 80% or more counts as passed. Wrong answers show the explanation, so re-read that topic and untick it if needed.
Contents
- IT·01Start Here: What Information IsWhat "information" means to an engineer: not meaning but resolved uncertainty; Shannon's 1948 picture of a source, an encoder, a noisy channel and a…25 min
- IT·02Counting Possibilities: Bits, Logarithms and QuestionsHow to count what a message could have been, and turn the count into bits: sequences (the multiplication principle), orderings (factorials) and…28 min
- IT·03The Probability You NeedJust enough probability for the rest of the book, built from counting: outcomes, events and the rules every probability obeys; why independent…30 min
- IT·04Entropy: the Average Surprise of a SourceShannon's entropy, H = Σ p log₂(1/p): the expected surprise of a source, measured in bits per symbol; computed for coins, dice and the binary entropy…26 min
- IT·05Codes: Prefix Codes, Kraft's Inequality and Huffman CodingVariable-length codes that give likely symbols short codewords: why some codes are ambiguous; prefix codes, decoded one bit at a time down a tree…32 min
- IT·06The Source Coding Theorem: Why Entropy Is the LimitShannon's first theorem, proved and measured: typical sequences, the few that carry almost all the probability, about 2^(nH) of them; why that means…33 min
- IT·07Joint and Conditional Entropy, Mutual InformationInformation about two things at once: joint entropy; conditional entropy, the uncertainty left about one thing once you know another; the chain rule…31 min
- IT·08Channels and NoiseWhat noise does to information, and the first defences against it: channels described by their probabilities; the binary symmetric channel and the…40 min
- IT·09Channel Capacity and the Noisy-Channel Coding TheoremThe most surprising result in information theory: every noisy channel has a capacity, the largest mutual information between its input and output…34 min
- IT·10Information Everywhere: Language, DNA, Randomness and PasswordsMeasuring information in the real world, where nobody hands you the probabilities: how any model gives an upper bound on a source's entropy rate…36 min
- IT·11Information in Machine Learning: Cross-Entropy and KL DivergenceThe book's ideas as the language of machine learning: cross-entropy, a model's average surprise on real data, which splits exactly into the data's…32 min