How to Use Shannon's Information Theory: Establish the Information Bounds Before Choosing a Solution
This article walks through Shannon's information theory as a practical engineering toolkit rather than a set of abstract concepts. It explains how entropy makes information computable, how the lossless source coding theorem and the noisy-channel coding theorem define hard bounds on compression and transmission, why popular "free compression" and "infinite-precision" ideas fail against those bounds, how information counting yields limits for problems like the 13-ball weighing puzzle, and how channel capacity explains the role of capacity-approaching codes and MIMO. It closes with a repeatable workflow for applying these bounds to architecture design, capacity planning, and technical review.
Introduction: Three threads that run through Shannon’s information theory
In Shannon’s information theory, information entropy, Shannon limits, and channel capacity are not abstract terms. They are a set of computable, verifiable bounds: how much information a message actually carries, how small compression can get, how fast a channel can transmit, and how many distinguishable outcomes a decision process needs at minimum. The material here can be organized around three threads:
- Information entropy makes information computable. It turns intuitive statements like “this carries a lot of information” into quantities that can be summed, compared, and proven.
- Coding lower bounds and capacity upper bounds define hard limits. Source coding has a lower bound on average code length, and noisy channels have an upper bound on transmission rate. A scheme can approach a bound, but it cannot cross one out of thin air.
- Establish the bounds first, then design the solution. Whether the problem is compression, storage, communication, log sampling, weighing balls, sorting, searching, or decision making, start by asking how many states there are, how many distinguishable outcomes there are, and whether the available information is enough.
1. Information entropy: turning information from intuition into a computable quantity
Before Shannon, “information” usually relied on intuition. We say a message carries a lot of information, yet we struggle to say how much. Shannon’s key breakthrough was a definition of information content that depends only on the probability distribution:
H(X) = - Σ p(x) · log₂ p(x)
This definition matters not only because it can be computed, but because it satisfies several requirements that are almost impossible to avoid:
- Certain events carry no information. When an event has probability 1 and is certain to occur, its contribution is 0.
- Rarer events are more surprising. The smaller the probability, the larger
-log p(x), so the event delivers more information when it happens. - Information adds across independent sources. The joint information of two independent sources equals the sum of their individual information, which is exactly the property the logarithmic form provides.
More formally, under axioms such as continuity, monotonicity, and additivity for independent sources, or equivalently a recursive-branching property, the entropy expression is unique up to a positive constant factor. In other words, if someone tries to construct a reasonable measure of “surprise” or “information content,” it will typically end up in the family of forms given by Shannon entropy.
The significance of this step is that information stops being a philosophical, fuzzy discussion and becomes a quantity that can be computed, compared, and used in engineering design. Every coding theorem, capacity result, and compression limit that follows is built on this computable entropy.
2. What Shannon’s limits mean: two bounds that coding cannot get around
With entropy in place, Shannon established two foundational theorems that specify “how small compression can get” and “how fast transmission can go.”
2.1 Lossless source coding theorem: compression has a lower bound
Under a uniquely decodable code, the average code length of any lossless code cannot fall below the source entropy H(X). Put differently, entropy is the theoretical lower bound for compression.
This does not mean that no specific file can ever be compressed below some string length. It means that under a given source model, if some code achieves an average length below the entropy, then something in the assumptions must have changed. For example:
- It may be using a different source assumption.
- It may have sacrificed unique decodability or decoding correctness.
- It may have shifted the cost onto additional codebooks, context, or prior information.
- It may work only for a few samples rather than on average across all possible inputs.
So when someone claims that “any data can be compressed to arbitrarily small size,” information theory gives a clear prompt: first pin down the source model, the code length, and the decodability assumptions, then check whether the claimed compression actually violates the bound.
2.2 Noisy-channel coding theorem: transmission has an upper bound
The other theorem states that a noisy channel has a capacity C. As long as the transmission rate stays below C, there exists a coding scheme that drives the error probability arbitrarily close to zero. Once the rate exceeds C, the error probability cannot be made arbitrarily small.
Coding, then, is not about guessing tricks, and trying more methods does not break the limit. Effective coding schemes approach a boundary defined mathematically. Many of the strong codes used in modern communications are fundamentally capacity-approaching schemes, not ways of surpassing capacity without end.
3. Which pseudo-compression schemes Shannon’s bounds expose
One of the most useful aspects of Shannon’s information theory is that it quickly identifies pseudo-problems dressed up as clever ideas. They sound smart, but once you break them into an encoding and a decoding procedure, they cannot escape the constraints imposed by entropy, code length, and channel capacity.
3.1 A “normal” number like pi does not offer free compression
A common proposal goes like this: since certain digit strings may appear somewhere in the decimal expansion of pi, could we map a file’s content to the index of its position in pi, thereby compressing any file into a single integer?
The idea sounds ingenious, but there are at least two problems.
First, it relies on a strong mathematical claim: that every finite digit string appears in pi. This concerns whether pi is a normal number, which remains unproven today. Even if the claim held, it would not follow that arbitrary data can be compressed.
Second, even if some strings really do occur in pi, this is merely an encoding scheme, and it still cannot escape Shannon’s lower bound. To reconstruct a file from a position index, you must be able to locate it uniquely, and the position index itself must be written in bits. For content of L bits, if its first occurrence in pi is far out, describing that position may take on the order of L bits or more. The rarer the string, the later it typically appears, and the longer the position number usually is. Averaged over all possible inputs, information content does not shrink just because you switched to a different representation.
There is no free lunch here. “Recording the position is compression” simply swaps “content” for “position,” and the position still carries information, still bounded by entropy and encodability.
3.2 Infinite real-number precision cannot defeat noise
Another proposal is to write data in binary and then encode it with enough digits after the decimal point to specify a real number, as if unlimited precision could carry unlimited information. The flaw in this argument is that it conflates a mathematical real number with physical distinguishability.
Every physical medium has noise. Raising distinguishable precision requires a higher signal-to-noise ratio. For an additive white Gaussian noise channel with bandwidth B, signal power S, and noise power N, the capacity is:
C = B · log₂(1 + S/N)
Requiring precision to grow without bound means the number of distinguishable states grows without bound, which in turn means the required signal-to-noise ratio grows without bound. That is not physically achievable. Real channels are therefore always constrained by capacity. Real numbers do have infinitely many digits in theory, but in a noisy world, the amount of information that can be reliably distinguished remains finite.
These seemingly clever shortcuts are, once unpacked, nothing more than coding and decoding. Encoding can change the representation, but it cannot make noise, entropy, and capacity limits disappear.
4. Using information theory to bound the weighing puzzle
What is genuinely impressive about Shannon’s information theory is that it does more than handle communication problems: it can analyze seemingly unrelated problems through information counting.
Consider a classic balance puzzle: among 13 balls, one has an abnormal weight, and it is unknown whether it is heavier or lighter, with no known reference ball. The goal is to identify the odd ball and determine whether it is heavier or lighter, without a known standard ball, in at most 3 weighings.
From an information-theoretic viewpoint, rather than rushing to design weighing steps, start with counting:
- The states to be determined have two parts: which ball is odd, with 13 possibilities, and whether it is heavier or lighter, with 2 possibilities. The total number of states is:
13 × 2 = 26
- A single weighing has three outcomes: left pan sinks, right pan sinks, or balance. Three weighings can produce:
3³ = 27
distinct outcome sequences.
To determine a state uniquely, the number of distinguishable outcomes must be no less than the number of states. Therefore:
2N ≤ 3ⁿ
With n = 3:
2N ≤ 27N ≤ 13.5
So the maximum integer number of balls is:
N ≤ 13
What we have derived here is a counting bound. It says that if someone claims to resolve the odd-ball problem for 13 or more balls within 3 weighings, the number of states must not exceed the number of distinguishable outcomes. But a counting bound is only a necessary condition; it does not by itself guarantee that a concrete weighing scheme exists. A workable scheme must also make the states remaining after each weighing as fully separable as possible by later outcomes.
The classic 12-ball problem is often used to show that such counting bounds can be met by construction. For 13 balls, construction is stricter if no additional reference ball is available; the problem changes if an extra known-standard ball is allowed, or if identifying the odd ball is enough and determining heavier or lighter is not required.
The generality of this line of reasoning is that the information obtainable from one experiment cannot exceed the logarithm of the number of distinguishable outcomes. There is therefore a hard limit on the number of states. However much a problem looks like a manual trick, writing down the number of states and the number of outcomes tells you where the feasible region lies.
| Check | Content |
|---|---|
| Number of states | 13 balls × 2 (heavier or lighter) = 26 |
| Number of outcomes | 3 outcomes per weighing, 27 in total over 3 weighings |
| Basic constraint | Distinguishable outcomes must be no fewer than states |
| Bound obtained | 13 balls is the integer ceiling within the counting bound |
| Next step | Construct the scheme and verify that each step separates the remaining states well enough |
5. Channel capacity and modern communications: why MIMO
Shannon’s channel capacity is just as consequential in practice. For a point-to-point Gaussian channel, the capacity formula was given long ago:
C = B · log₂(1 + S/N)
Given a fixed bandwidth and noise level, this sets a theoretical ceiling on the transmission rate. Capacity-approaching codes in modern communications, such as low-density parity-check (LDPC) codes, Turbo codes, and various iterative decoding schemes, already push real link performance very close to capacity.
That said, any discussion of “how close to capacity” has to state its terms explicitly. It is not enough to say “only one or two dB away”; you must specify the comparison conditions: the same code rate, the same spectral efficiency, the same block error rate, and the same bandwidth and noise assumptions. For example, in certain rate-1/2 scenarios, the low block-error-rate region may sit on the order of 1 dB from capacity, but the exact figure still depends on the code rate, modulation, block length, decoding algorithm, and implementation loss.
Precisely because single-link coding is already approaching the boundary, continuing to improve one coding point at a time yields diminishing returns. The evolution of modern communication systems has therefore turned to adding degrees of freedom, and the representative example is MIMO.
MIMO transmits multiple data streams in parallel across multiple antennas. In an environment with sufficient scattering, it opens additional dimensions at both the transmitter and the receiver, and capacity grows roughly linearly with the smaller of the transmit and receive antenna counts. What it adds is not a cleverer code on the same link, but extra spatial degrees of freedom.
This also gives a verifiable engineering review process. If someone claims that coding alone can deliver enormous performance gains on the same Gaussian channel, you should not conclude either way from the feeling that the number looks exaggerated. Check step by step:
- Align the assumptions. Is the comparison made at the same code rate, spectral efficiency, block error rate, bandwidth, and noise assumptions?
- Fix the baseline. Compare the claimed code against codes that already approach capacity, such as mature schemes roughly 1 to 2 dB from capacity.
- Assess the headroom. If the claimed gain exceeds the baseline’s headroom, it may lie outside what capacity permits.
- Recheck the conditions. Look for changes in code rate, bandwidth, noise assumptions, modulation, block length, or decoding complexity.
The existence of these bounds makes overpromising easier to test. A genuinely effective improvement must state the conditions under which it holds and how much it improves over which baseline.
6. Establish the bounds first, then design: a general way of thinking
The real strength of Shannon’s information theory is not only that it solved communication problems, but that it offers a new lens. When facing seemingly unrelated problems such as sorting, searching, decision making, or games, start by asking:
- How many states are there in total?
- How many distinguishable outcomes can each operation produce?
- Is the available information enough to cover all states?
- Where do the upper or lower bounds on a feasible solution lie?
This resembles the Fourier transform. The Fourier transform moves a time-domain problem into the frequency domain and changes the perspective from which a problem is analyzed; information theory converts vague problems into questions about information counting, entropy, and capacity, changing the perspective from which feasibility is judged.
For instance, in sorting, the decision-tree lower bound for comparison-based sorting is fundamentally a constraint on the required number of comparisons derived from the number of distinguishable outcomes. In decision problems, the branching factor of a decision tree limits how many states can be distinguished. In search problems, how many possibilities an index structure can eliminate depends on how much information each query delivers.
So “establish the bounds first, then design the solution” is not a slogan but an engineering habit. It requires admitting the constraints first, then looking for optimization room inside them.
7. Applying information-theoretic bounds to architecture design and capacity planning
This theory also translates into everyday engineering and architecture design. The key is not memorizing formulas but mapping a problem onto the corresponding information-theoretic constraint and then forming concrete actions.
| Scenario | Corresponding information-theoretic constraint | Actionable steps |
|---|---|---|
| Data compression | Source entropy is a lower bound on average code length | Estimate an upper bound on entropy from word frequencies or chunk statistics as a compression-ratio reference; do not promise to compress arbitrary data to arbitrarily small sizes |
| Distributed storage | Trade-off between reliability and redundancy overhead | Choose erasure coding or a replication strategy, and evaluate availability, recovery bandwidth, and storage cost |
| Message queues | Constraints on throughput, bandwidth, replica count, and latency | Design partitioning and replica strategies, load-test throughput and latency, and avoid exceeding capacity limits |
| Logging and monitoring | The Shannon sampling theorem and effective information content | Set sampling rates, aggregation windows, and retention policies, prioritizing high-value information |
Take data compression. When designing a compression scheme, do not judge it only by whether a few text samples shrink noticeably; consider the source entropy. In practice, estimate an upper bound on entropy from frequency or chunk statistics first, then judge whether the current compression ratio falls in a reasonable range. If a scheme claims an extremely high compression ratio for nearly all data, it is worth checking the source assumptions and the test samples.
Take distributed storage. Multiple replicas improve reliability but increase storage overhead; erasure coding reduces redundancy but adds reconstruction computation and recovery bandwidth. There is no infinitely free option here, only trade-offs under different constraints. The information-theoretic view helps turn “reliable, cheap, and fast” from a slogan into comparable boundary conditions.
Take logging and monitoring. Collecting everything looks complete, but under limited bandwidth, storage, and cost it is not always feasible. Sampling rates, aggregation windows, and retention policies are essentially ways of maximizing effective information under finite resources. Understanding information entropy and sampling constraints helps decide which logs are worth keeping and which aggregation methods fit the business need better.
General cloud capabilities such as object storage, message queues, and monitoring and alerting follow the same basic information-theoretic constraints in capacity planning and cost optimization. Understanding the bounds is what lets you judge whether a design is approaching the optimum or just going in circles.
Conclusion: a review of the main points
The remarkable thing about Shannon’s information theory is that it used rigorous mathematics to draw clear boundaries around the vague notion of “information.” The main points:
- Information entropy makes information computable. The probability distribution determines information content, and entropy becomes the basic tool for measuring uncertainty and information.
- Source coding has a lower bound. Under a uniquely decodable code, the average length of lossless compression cannot fall below the source entropy.
- A noisy channel has a capacity upper bound. Once the rate exceeds capacity, the error probability cannot be made arbitrarily small.
- Counting bounds constrain the number of states. The weighing puzzle shows that the information obtainable from one experiment is limited by the number of distinguishable outcomes.
- Establish the bounds first, then design the solution. Engineering optimization, architecture design, and technical review should all confirm the boundary conditions before discussing a concrete implementation.
Mastering Shannon’s information theory yields more than a communications toolkit. It builds the habit of looking for the bounds before constructing a solution when a complex problem shows up.
References and further reading:
- C. E. Shannon, A Mathematical Theory of Communication, 1948.
- T. M. Cover and J. A. Thomas, Elements of Information Theory.
- E. Telatar, Capacity of Multi-antenna Gaussian Channels, 1999.
