Communication §
Communication studies how to transmit data reliably over a noisy channel. It is relevant whenever data must cross a physical medium (wire, air, fiber) that introduces errors.
Three questions structure the subject: channel capacity sets the fundamental limit on how fast information can be sent; error detection flags when the received bits differ from what was sent; error correction repairs the errors so the receiver recovers the original message. Each section builds on the previous: capacity tells you whether a target rate is achievable, detection tells you an error occurred, and correction restores the data.
Authoritative sources
Channel models §
Three canonical channels capture the essential noise mechanisms:
| Channel | Parameter | Capacity | Typical use |
|---|---|---|---|
| Binary Symmetric Channel (BSC) | crossover probability p | C = 1 − Hb(p) | Model for digital links with bit flips |
| Binary Erasure Channel (BEC) | erasure probability ε | C = 1 − ε | Model for channels that lose symbols (e.g. packet loss) |
| Additive White Gaussian Noise (AWGN) | bandwidth B, SNR | C = B log₂(1 + SNR) | Model for analog / RF links |
The BSC is the simplest discrete model: each bit is flipped independently with probability . The BEC replaces bits with an erasure marker (the receiver knows which positions are lost). The AWGN channel is the continuous analogue; its capacity is the Shannon–Hartley theorem.
Channel capacity §
The Shannon capacity of a discrete memoryless channel is:
bits per channel use, where is the mutual information and is the entropy (see Coding and entropy for definitions). For a binary symmetric channel with crossover probability :
The channel coding theorem states that reliable communication at any rate is possible with sufficiently long codes; no code can reliably communicate at .
The code rate is the ratio of information bits to the total codeword length . It measures the overhead: a rate of means one parity bit per data bit. A code can only operate reliably when .
Source–channel separation theorem (Shannon 1948): optimal source coding (compression) and channel coding (error correction) can be designed independently. The source is compressed to its entropy rate, then the compressed stream is protected by a channel code operating below capacity. This is why Compression and this page are separate topics: each solves a different problem, and the optimal solution to one does not depend on the details of the other.
Details
AWGN channel: For a continuous channel with bandwidth Hz and signal-to-noise ratio :
This is the Shannon–Hartley theorem. It sets the ultimate limit for any modulation and coding scheme on that channel.
Practical gap: Polar codes (Arikan 2009) provably achieve capacity for binary-input DMC channels and approach within a small gap (≲ 0.1 dB) for large block lengths. LDPC codes are typically within 0.5–1 dB of capacity. Turbo codes (1993) were the first practical codes to come close.
Error detection §
Parity bit: append 1 bit so the total number of 1s is even (or odd). Detects single-bit errors.
Checksum: sum all bytes (mod or ); append the complement. Detects most single-bit and some multi-bit errors. Used in TCP, IP.
CRC (Cyclic Redundancy Check): treat the message as a polynomial over ; compute where is a generator polynomial (e.g., CRC-32: ). Append the remainder. Detects all burst errors of length and most longer errors.
Authoritative sources
The minimum Hamming distance of a code is the smallest number of positions in which any two distinct codewords differ. It is the single most important parameter linking detection to correction:
- A code with minimum distance detects up to errors.
- A code with minimum distance corrects up to errors.
For example, detects 2 errors and corrects 1; detects 4 errors and corrects 2.
Details
CRC properties:
- Detects all single-bit errors.
- Detects all double-bit errors (if has terms).
- Detects all burst errors of length .
- Detects of longer burst errors.
CRC is a linear code: the set of valid codewords forms a vector space over . This makes hardware implementation trivial (a shift register with XOR feedback).
Hamming distance : the number of positions in which two codewords differ. The minimum distance determines the error-detection and correction capability as stated above.
Error correction §
Hamming code : adds parity bits to protect data bits. Has : corrects single-bit errors. Example: Hamming(7,4) protects 4 data bits with 3 parity bits.
Reed-Solomon code over : encodes symbols into symbols; corrects up to symbol errors. Used in CDs, QR codes, SSDs, Deep Space Network.
Convolutional codes: pass the input through a shift register with XOR feedback; the output is a sequence of parity bits. Decoded with the Viterbi algorithm (dynamic programming over the trellis).
LDPC codes: sparse parity-check matrix; decoded with belief propagation (iterative message passing on the factor graph). Used in Wi-Fi (802.11ax), DVB-S2, 5G.
Details
Reed-Solomon example: RS(255, 223) over encodes 223 bytes into 255 bytes, correcting up to 16 byte errors. Used in CD (C2 error correction) and QR codes.
Viterbi algorithm: for a convolutional code with constraint length , the trellis has states. At each time step, for each state, keep only the path with the minimum Hamming distance to the received sequence. Complexity: .
Belief propagation (for LDPC): alternate between variable nodes (“what is my value?”) and check nodes (“is my constraint satisfied?”). Converges in – iterations for good codes.
Simulation §
Example problem §
Problem: A message of 1000 bits is sent over a BSC with . What is the channel capacity? If a (1023, 1013) Hamming code is used, what is the code rate and the probability of undetected error per codeword (approximate)?
Solution
Capacity: bits/use.
Code rate: . Since , this code rate exceeds capacity: reliable communication is not guaranteed at this rate with this code. A practical code would need , e.g., a (1023, 940) code.
Undetected error probability: The Hamming(1023, 1013) code has : it corrects 1 error and detects 2. With expected errors per codeword, the code will almost always see more than 1 error and declare a failure (or, in a real system, request retransmission). The probability of an undetected error (3 or more errors that map to another valid codeword) is:
where is the number of codewords of weight . For a Hamming code with and , the dominant term is with , giving , which is very small.