5CS3-01 · RTU · 3rd Year
Information Theory & Coding
Entropy, mutual information and channel capacity, Huffman, Shannon-Fano and Lempel-Ziv coding, linear block codes and syndrome decoding, cyclic codes over Galois fields, convolutional codes with trellis and Viterbi decoding – solved numericals from RTU papers and exam-ready diagrams.
Last time you stopped at card —. ·
- 70cards
- 5units
- 0nailed
- 30diagrams
70/70
-
Information theory (Shannon, 1948) answers two questions: how much can a source be compressed, and how fast can data be sent reliably over a noisy channel.
Blocks in order:
- 1. Source – produces messages
- 2. Source encoder – removes redundancy (compression, e.g. Huffman)
- 3. Channel encoder – adds controlled redundancy for error control (block/convolutional codes)
- 4. Modulator – converts bits to signals
- 5. Channel – adds noise
- 6. Demodulator, channel decoder (detects/corrects errors), source decoder
- 7. Destination
Block pair Purpose Source coding Efficiency (fewer bits) Channel coding Reliability (fewer errors) Exam tip: Source coding removes redundancy, channel coding adds it. Say this line in every answer.
-
Self-information of a message with probability \( p_k \):
\( I_k = \log_2 \dfrac{1}{p_k} = -\log_2 p_k \) bits
(base 2 gives bits, base e gives nats, base 10 gives Hartleys)
Properties:
- \( I_k \ge 0 \), and a rarer event gives more information
- \( p_k = 1 \Rightarrow I_k = 0 \)
- For independent messages information adds: \( I(m_1 m_2) = I_1 + I_2 \)
Proof of zero information: "The sun rises in the east" is certain, so \( p = 1 \).
\( I = \log_2 (1/1) = \log_2 1 = 0 \). If the receiver already knows the message, \( p = 1 \) and no information is conveyed. (RTU 2022, Feb 2024, 2024)
Numerical (RTU 2019): \( p_k = 1/4 \Rightarrow I = \log_2 4 = 2 \) bits.
Exam tip: Always write "probability of a certain event is 1" first, then substitute.
-
Entropy is the average information per source symbol:
\( H(X) = \sum_{k=1}^{n} p_k \log_2 \dfrac{1}{p_k} \) bits/symbol
Properties:
- \( H \ge 0 \) (zero only when one symbol has \( p = 1 \))
- \( H \le \log_2 n \) (upper bound)
- Entropy is maximum when all symbols are equally likely
- Adding a zero-probability symbol does not change \( H \)
Proof of maximum: put \( p_k = 1/n \) for all k:
\( H = \sum_{k=1}^{n} \dfrac{1}{n}\log_2 n = n \cdot \dfrac{1}{n}\log_2 n = \log_2 n \)
Example: 4 equally likely symbols give \( H = 2 \) bits. (RTU 2019, 2022, Feb 2024)
Exam tip: For the "\( H \le \log_2 M \)" proof, also use \( \ln x \le x - 1 \) with \( q_k = 1/M \).
-
Steps:
- 1. Check \( \sum p_k = 1 \)
- 2. Find each \( I_k = \log_2 (1/p_k) \)
- 3. \( H = \sum p_k I_k \) bits/symbol
- 4. Information rate \( R = r \cdot H \) bits/sec (r = symbols/sec)
Example (RTU Feb 2024): p = 1/2, 1/4, 1/8, 1/16, 1/16 and r = 16 outcomes/sec.
p \( \log_2 (1/p) \) \( p \cdot I \) 1/2 1 0.5 1/4 2 0.5 1/8 3 0.375 1/16 4 0.25 1/16 4 0.25 \( H = 1.875 \) bits/symbol, \( R = 16 \times 1.875 = 30 \) bits/sec.
Tip: \( \log_2 x = \log_{10} x / 0.3010 \). If the given probabilities do not add up to 1 (as printed in some papers), state this and proceed with the given values.
-
For a binary source with \( P(0) = p \) and \( P(1) = 1 - p \):
\( H(p) = -p \log_2 p - (1-p)\log_2 (1-p) \) bits
Shape of the curve:
- \( H(0) = H(1) = 0 \) (no uncertainty)
- Maximum 1 bit at \( p = 0.5 \)
- Symmetric about \( p = 0.5 \)
Proof of maximum: \( \dfrac{dH}{dp} = \log_2 \dfrac{1-p}{p} = 0 \Rightarrow p = 0.5 \).
Values: \( H(0.1) = 0.469 \), \( H(0.25) = 0.811 \), \( H(0.5) = 1 \).
Uncertainty vs information: Before the message arrives we have uncertainty; after it arrives that uncertainty is removed and the amount removed is the information. A fair coin has the most uncertainty (1 bit); a coin with \( p = 0.99 \) has almost none.
Exam tip: Always draw the curve with the peak at (0.5, 1).
-
Let X = number of tosses until the first tail appears.
Fair coin (\( P(\text{tail}) = 1/2 \)): \( P(X = k) = (1/2)^k \), k = 1, 2, 3 …
\( H = \sum_{k=1}^{\infty} \dfrac{1}{2^k}\log_2 2^k = \sum_{k=1}^{\infty} \dfrac{k}{2^k} = 2 \) bits
(Use \( \sum k x^k = x/(1-x)^2 \) with \( x = 1/2 \): \( 0.5/0.25 = 2 \).)
Unfair coin (\( P(\text{tail}) = p \), \( q = 1 - p \)): \( P(X = k) = q^{k-1}p \)
\( H = \dfrac{H(p)}{p} \) bits, where \( H(p) \) is the binary entropy.
Check: \( p = 1/2 \Rightarrow H(0.5)/0.5 = 1/0.5 = 2 \) bits (matches).
Exam tip: Write the probability law first, then the log term splits into \( \log p + (k-1)\log q \).
-
For two variables X (input) and Y (output):
- Joint entropy: \( H(X,Y) = -\sum\sum p(x,y)\log_2 p(x,y) \)
- Conditional entropy: \( H(X Y) = -\sum\sum p(x,y)\log_2 p(x y) \) (equivocation: uncertainty left in X after seeing Y) - \( H(Y|X) \) is the noise entropy
- Mutual information: \( I(X;Y) = H(X) - H(X Y) = H(Y) - H(Y X) \) Chain rule: \( H(X,Y) = H(X) + H(Y X) = H(Y) + H(X Y) \) \( I(X;Y) = H(X) + H(Y) - H(X,Y) \)
Venn picture: two overlapping circles H(X) and H(Y); the overlap is \( I(X;Y) \), the whole union is \( H(X,Y) \).
If X and Y are independent: \( H(X,Y) = H(X) + H(Y) \) and \( I = 0 \). (RTU 2021, Feb 2024, 2024)
Exam tip: Draw the Venn diagram first; every identity can be read from it.
-
Proof 1: Since \( p(x,y) = p(x|y)\,p(y) \):
\( H(X,Y) = -\sum\sum p(x,y)\log_2 p(x|y) - \sum\sum p(x,y)\log_2 p(y) \)
- First term is \( H(X|Y) \)
- In the second term \( \sum_x p(x,y) = p(y) \), so it becomes \( -\sum_y p(y)\log_2 p(y) = H(Y) \)
Hence \( H(X,Y) = H(X|Y) + H(Y) \).
Proof 2 (independent): \( p(x,y) = p(x)p(y) \) and \( p(x y) = p(x) \), so \( H(X Y) = H(X) \). Therefore \( H(X,Y) = H(X) + H(Y) \).
(RTU 2021, Feb 2024, 2024: asked as "discrete binding channel", meaning discrete memoryless channel.)
Exam tip: Write the step "\( \sum_x p(x,y) = p(y) \)"; that is where marks are given.
-
Mutual information \( I(X;Y) \) is the average information about X gained by observing Y:
\( I(X;Y) = \sum\sum p(x,y)\log_2 \dfrac{p(x,y)}{p(x)p(y)} \)
Properties:
- 1. Symmetric: \( I(X;Y) = I(Y;X) \)
- 2. Non-negative: \( I(X;Y) \ge 0 \)
3. \( I(X;Y) = H(X) - H(X Y) = H(Y) - H(Y X) \) - 4. \( I(X;Y) = H(X) + H(Y) - H(X,Y) \)
- 5. \( I(X;Y) = 0 \) iff X and Y are independent
- 6. \( I(X;X) = H(X) \)
- 7. Channel capacity is \( C = \max I(X;Y) \) over input distributions
(RTU 2021, 2024, 2025)
Exam tip: Properties 1, 2 and 5 earn the 2 marks in Part A.
-
From a joint matrix \( P(X,Y) \):
- 1. \( p(x_i) \) = row sums, \( p(y_j) \) = column sums
- 2. \( H(X), H(Y) \) from the marginals
- 3. \( H(X,Y) = -\sum p_{ij}\log_2 p_{ij} \)
4. \( H(X Y) = H(X,Y) - H(Y) \), \( H(Y X) = H(X,Y) - H(X) \) - 5. \( I = H(X) + H(Y) - H(X,Y) \)
RTU 2024 matrix gives: \( H(X) = 1.907 \), \( H(Y) = 1.802 \), \( H(X,Y) = 3.565 \), \( H(X Y) = 1.763 \), \( H(Y X) = 1.658 \), \( I = 0.144 \) bits. From a channel matrix (BSC, \( p = 0.1 \), equiprobable inputs): \( H(Y|X) = H(0.1) = 0.469 \), \( H(Y) = 1 \), so \( I = 1 - 0.469 = 0.531 \) bits.
Exam tip: Do the table of \( p \log_2 (1/p) \) values first; reuse them.
-
A DMC has input alphabet \( x_1 \ldots x_m \), output alphabet \( y_1 \ldots y_n \) and transition probabilities \( p(y_j|x_i) \). "Memoryless" means the output depends only on the present input.
Channel matrix \( P(Y|X) \) is \( m \times n \); each row sums to 1.
Cascade rule: matrix of cascaded channels = product of matrices.
RTU 2022: first BSC \( \begin{bmatrix}0.8&0.2\\0.2&0.8\end{bmatrix} \), second \( \begin{bmatrix}0.7&0.3\\0.3&0.7\end{bmatrix} \).
\( P(z_1|x_1) = 0.8(0.7) + 0.2(0.3) = 0.62 \), so the overall matrix is \( \begin{bmatrix}0.62&0.38\\0.38&0.62\end{bmatrix} \).
With \( p(x_1) = 0.6 \), \( p(x_2) = 0.4 \):
\( P(z_1) = 0.6(0.62) + 0.4(0.38) = 0.524 \), \( P(z_2) = 0.476 \).
Exam tip: Check that rows add to 1 and \( P(z_1) + P(z_2) = 1 \).
-
Channel Condition Matrix pattern Capacity Lossless \( H(X\mid Y) = 0 \) each column has one non-zero entry \( \log_2 m \) Deterministic \( H(Y\mid X) = 0 \) each row has a single 1 \( \log_2 n \) Noiseless both zero identity matrix \( \log_2 m \) BSC symmetric errors \( \begin{bmatrix}1-p&p\\p&1-p\end{bmatrix} \) \( 1 - H(p) \) - Lossless: input is fully recoverable from the output, though several outputs may share an input (no loss of source information)
- Deterministic: each input gives exactly one output
- Noiseless: both lossless and deterministic, so \( I(X;Y) = H(X) = H(Y) \)
- Symmetric channel: every row is a permutation of every other row
(RTU Feb 2024)
Exam tip: Draw one small 2x2 or 3x3 matrix per type; examiners accept that as the example.
-
Statement: A discrete memoryless source of entropy \( H(X) \) can be encoded into binary codewords with average length
\( H(X) \le \bar{L} < H(X) + 1 \) bits/symbol
(Using \( n \)-th extensions, \( \bar{L}/n \to H(X) \) as \( n \to \infty \).)
Meaning:
- \( H(X) \) is the minimum possible average code length; no uniquely decodable code can do better
- Code efficiency \( \eta = H / \bar{L} \le 1 \)
- Coding longer blocks (extensions) gets closer to entropy
It is also called the noiseless coding theorem because it deals with compression, not errors. (RTU 2022, 2025)
Exam tip: Mention that Huffman and Shannon-Fano are practical ways of approaching this limit.
-
Papers in this deck: 2019, 2021, 2022 (code 5E1351) and Feb 2024, 2024, 2025 (code 5E1751).
Old pattern (2019, 2022) New pattern (2024, 2025) Marks / time 80 / 2 hrs (2021: 65) 70 / 3 hrs Part A 5 x 2, all compulsory 10 x 2 Part B 4 of 6 x 10 5 of 7 x 4 Part C 2 of 3 x 15 (2021: 1 of 3) 3 of 5 x 10 Most repeated topics:
- 6 of 6 papers: Huffman, entropy, cyclic codes, linear block codes / syndrome
- 5 of 6: Viterbi, Shannon-Fano, Galois field, channel capacity
- 4 of 6: prefix code / Kraft, mutual information, systematic vs non-systematic
Exam tip: Master the 4 "6 of 6" topics first; they are worth almost half the paper.
-
- Amount of information if \( p = 1/4 \)? \( \log_2 4 = 2 \) bits. (2019)
- Receiver already knows the message? \( p = 1 \Rightarrow I = \log_2 1 = 0 \). (2022, Feb 2024, 2024)
- Entropy of n equally likely messages? \( \log_2 n \) bits (the maximum). (Feb 2024)
- Define entropy: average information per symbol, \( H = \sum p_k \log_2 (1/p_k) \). (2025)
- Define mutual information: information about X obtained by observing Y, \( I = H(X) - H(X|Y) \). (2021, 2025)
- Property of mutual information: symmetric, non-negative, \( I = H(X) + H(Y) - H(X,Y) \). (2024)
- Shannon's first theorem: \( H \le \bar{L} < H + 1 \); entropy is the minimum average code length. (2022, 2025)
Exam tip: Part A is 2 marks each: one definition plus one formula is enough.
-
A prefix (instantaneous) code is one in which no codeword is the prefix of another. It can be decoded immediately as bits arrive, with no look-ahead.
Symbol Code A Code B s1 0 0 s2 10 01 s3 110 011 s4 111 111 Type Prefix Not prefix (0 is prefix of 01) Binary tree view: codewords sit only at leaves; if a symbol sits at an internal node, its code is a prefix of others.
Decode example: 0 10 110 111 in Code A is read left to right without ambiguity.
Prefix codes are uniquely decodable, but not every uniquely decodable code is a prefix code. Huffman and Shannon-Fano both give prefix codes. (RTU 2021, Feb 2024, 2024)
Exam tip: Always draw the tree with codewords at the leaves.
-
Kraft inequality: a binary prefix code with codeword lengths \( l_1, l_2, \ldots, l_n \) exists if and only if
\( \sum_{i=1}^{n} 2^{-l_i} \le 1 \)
Check:
- Lengths 1, 2, 3, 3: \( \tfrac12 + \tfrac14 + \tfrac18 + \tfrac18 = 1 \) (possible)
- Lengths 1, 2, 2, 3: \( 0.5 + 0.25 + 0.25 + 0.125 = 1.125 > 1 \) (impossible)
It tells existence only; it does not say that a given code is a prefix code.
Prefix code Block code Variable length, no codeword is prefix of another Fixed length n for every codeword Used for source coding (compression) Used mostly for channel coding (error control) Example: Huffman Example: (7,4) Hamming (RTU Feb 2024, 2024, 2025)
Exam tip: Write the sum with the actual lengths of your code to show it is satisfied.
-
Average length: \( \bar{L} = \sum p_k l_k \) bits/symbol
Efficiency: \( \eta = \dfrac{H(X)}{\bar{L}} \times 100\% \) (for binary codes)
Redundancy: \( \gamma = 1 - \eta \)
Proof of the P(0) = P(1) statement: the code bits form a binary source. Its entropy is \( H(p) = -p\log_2 p - (1-p)\log_2 (1-p) \), and the average information per code bit is largest when \( p = 0.5 \) (\( H = 1 \) bit). Then each code bit carries 1 bit of information, so no bits are wasted and \( \eta \to 100\% \).
Efficient code means: 0s and 1s equally likely in the output, and \( \bar{L} \to H \).
Example: probabilities \( 1/2, 1/4, 1/8, 1/8 \) with lengths 1, 2, 3, 3 give \( \bar{L} = H = 1.75 \), so \( \eta = 100\% \).
(RTU 2019, 2021)
Exam tip: Efficiency is 100% only when every \( p_k = 2^{-l_k} \).
-
Algorithm:
- 1. Arrange symbols in decreasing probability
- 2. Divide them into two groups with nearly equal total probability
- 3. Assign 0 to the upper group and 1 to the lower group
- 4. Repeat inside each group until every group has one symbol
Example: P = 1/2, 1/4, 1/8, 1/8
Symbol P Steps Code l s1 1/2 0 0 1 s2 1/4 1, 0 10 2 s3 1/8 1, 1, 0 110 3 s4 1/8 1, 1, 1 111 3 \( \bar{L} = 0.5 + 0.5 + 0.375 + 0.375 = 1.75 \), \( H = 1.75 \), so \( \eta = 100\% \). (RTU Feb 2024, 2024)
Note: Shannon-Fano is a top-down method and is not always optimal.
Exam tip: Show each split with a dotted line in the table; the examiner checks the splits.
-
Source S: \( P(S_1) = 3/4 \), \( P(S_2) = 1/4 \).
Entropy: \( H(S) = 0.75\log_2\tfrac43 + 0.25\log_2 4 = 0.811 \) bits.
2nd extension (pairs, multiply probabilities):
Pair P Code l S1S1 9/16 0 1 S1S2 3/16 10 2 S2S1 3/16 110 3 S2S2 1/16 111 3 Split 1: 9/16 vs 7/16 (best balance), split 2: 3/16 vs 4/16, split 3: 3/16 vs 1/16.
\( \bar{L}_2 = \dfrac{9 + 6 + 9 + 3}{16} = 1.6875 \) bits per pair, \( H(S^2) = 2H(S) = 1.6226 \)
\( \eta_2 = 1.6226 / 1.6875 = 96.2\% \)
Without extension: \( \bar{L} = 1 \), \( \eta = 81.1\% \). Higher extension improves efficiency.
Exam tip: Divide \( \bar{L}_2 \) by 2 if asked bits per source symbol (0.844).
-
Huffman coding gives an optimal prefix code (minimum \( \bar{L} \)). It is bottom-up.
Algorithm:
- 1. List symbols in decreasing probability
- 2. Merge the two smallest probabilities into one node (add them)
- 3. Re-sort and repeat until a single node of probability 1 remains
- 4. Trace back: assign 0/1 to the two branches of each merge; a symbol's code is the path from the root
Example (RTU-style): P = 0.4, 0.2, 0.2, 0.1, 0.1
Symbol P Code l x1 0.4 10 2 x2 0.2 00 2 x3 0.2 01 2 x4 0.1 110 3 x5 0.1 111 3 \( \bar{L} = 0.8 + 0.4 + 0.4 + 0.3 + 0.3 = 2.2 \), \( H = 2.122 \), \( \eta = 2.122/2.2 = 96.5\% \).
(Merged nodes can be placed higher or lower on ties; \( \bar{L} \) stays the same.)
Exam tip: Always give \( H \), \( \bar{L} \), \( \eta \) at the end. This is the most repeated question (6 of 6 papers).
-
Method: (1) merge two smallest, repeat; (2) read lengths; (3) \( \bar{L} = \sum p_k l_k \); (4) \( H = \sum p_k \log_2 (1/p_k) \); (5) \( \eta = H/\bar{L} \).
RTU 2022: P = 0.3, 0.25, 0.2, 0.12, 0.08, 0.05
- Merge 0.08 + 0.05 = 0.13; then 0.13 + 0.12 = 0.25; then 0.25 + 0.2 = 0.45; then 0.3 + 0.25 = 0.55; finally 0.55 + 0.45 = 1
- Lengths: 2, 2, 2, 3, 4, 4
- \( \bar{L} = 0.6 + 0.5 + 0.4 + 0.36 + 0.32 + 0.2 = 2.38 \)
- \( H = 2.360 \), so \( \eta = 99.2\% \)
Other answers (check yours):
Paper \( \bar{L} \) \( H \) \( \eta \) 2019 (7 symbols) 2.6 2.571 98.9% 2024 (9 symbols) 2.33 2.314 99.3% Exam tip: Lengths may differ with tie choices but \( \bar{L} \) is always the same.
-
Point Huffman Shannon-Fano Direction Bottom-up (merge smallest) Top-down (split into halves) Optimality Always optimal (min \( \bar{L} \)) Not always optimal Efficiency Higher or equal Lower or equal Tie handling Different trees, same \( \bar{L} \) Split may be ambiguous Complexity Needs sorting and re-sorting Simple Result Prefix code Prefix code Both:
- Are variable-length, lossless, prefix codes
- Need the source probabilities in advance (static coding)
- Give short codes to frequent symbols
Static Huffman: probabilities fixed before encoding. Adaptive Huffman updates the tree as data arrives (RTU 2019 asks for the principle of static Huffman).
Exam tip: Write 4 rows in a table; that is a full 4-mark answer.
-
Lempel-Ziv (LZ78) is a universal, dictionary-based code: it needs no probabilities. The input is parsed into the shortest phrases not seen before; each phrase = (index of its longest earlier prefix, new last bit).
Example: 1011010100010
Phrases: 1 0 11 01 010 00 10 No. Phrase (pointer, bit) Code (3-bit pointer) 1 1 (0, 1) 000 1 2 0 (0, 0) 000 0 3 11 (1, 1) 001 1 4 01 (2, 1) 010 1 5 010 (4, 0) 100 0 6 00 (2, 0) 010 0 7 10 (1, 0) 001 0 Huffman Lempel-Ziv Needs probabilities No probabilities needed Fixed to the source statistics Adapts to the data Two passes Single pass Efficient for known sources Good for text, files (ZIP, GIF) LZ can expand short inputs; gains appear for long, repetitive data. (RTU 2025)
Exam tip: Draw the parsing table; it is what the examiner expects.
-
Channel capacity: the maximum rate of reliable information transfer:
\( C = \max_{p(x)} I(X;Y) \) bits per channel use (bits/sec if multiplied by symbols/sec)
Channel coding theorem (Shannon's 2nd theorem): For a DMC of capacity \( C \) and a source of rate \( R \):
- If \( R \le C \), there exists a code for which the error probability can be made arbitrarily small
- If \( R > C \), reliable communication is impossible (error probability stays bounded away from 0)
Notes:
- Theorem proves existence, not how to build the code
- Cost: long block length, so more delay and complexity
- Noise-free channel: \( C = \log_2 m \), where m = number of inputs
(RTU 2021, 2025)
Exam tip: Draw R-versus-C: error-free below C, errors above C.
-
BSC: input and output are 0/1; each bit is flipped with probability p, passes correctly with probability \( 1-p \).
\( I(X;Y) = H(Y) - H(Y|X) \)
Every input has the same error behaviour, so \( H(Y|X) = -p\log_2 p - (1-p)\log_2 (1-p) = H(p) \), which does not depend on the input distribution.
\( H(Y) \) is maximum (1 bit) for equiprobable inputs, hence
\( C = 1 - H(p) = 1 + p\log_2 p + (1-p)\log_2 (1-p) \) bits/use
Values:
p C 0 1 0.1 0.531 0.5 0 (output independent of input) \( p = 1 \) is also \( C = 1 \) (just invert the output).
Exam tip: Mention "capacity occurs at \( P(0) = P(1) = 0.5 \)".
-
BEC: a bit is either received correctly or erased (output symbol e, "unknown"). Never flipped.
- \( P(y = x) = 1 - \alpha \)
- \( P(y = e) = \alpha \)
Capacity derivation: for input \( P(0) = P(1) = 0.5 \):
\( H(Y|X) = H(\alpha) \), \( H(Y) = H(\alpha) + (1-\alpha) \)
\( C = H(Y) - H(Y|X) = 1 - \alpha \) bits/use
Meaning: a fraction \( \alpha \) of bits is lost; the rest are perfect.
\( \alpha \) C 0 1 0.25 0.75 1 0 BSC vs BEC: at the same error rate a BEC is better, because the receiver knows where the problem is.
Exam tip: Draw the 2-input, 3-output diagram and label the erasure arrows with \( \alpha \).
-
For a band-limited AWGN channel:
\( C = B \log_2\left(1 + \dfrac{S}{N}\right) \) bits/sec
with B = bandwidth (Hz), S/N = signal-to-noise power ratio (not dB), \( N = N_0 B \).
Observations:
- C increases with B and with S/N
- Increasing S/N is costly (logarithmic): doubling the power does not double C
- Increasing B also raises the noise power, so C saturates:
\( C_{\infty} = \lim_{B \to \infty} C = 1.44\,\dfrac{S}{N_0} \)
- Trade-off: bandwidth can be exchanged for SNR
- Shannon limit: \( E_b/N_0 = \ln 2 = 0.693 \), which is -1.6 dB; no reliable communication below it
Exam tip: Always convert dB to ratio: \( \text{SNR} = 10^{\text{dB}/10} \).
-
Steps: (1) convert SNR from dB to ratio; (2) substitute in \( C = B\log_2(1 + S/N) \); (3) write the unit (bits/sec).
RTU Feb 2024: B = 3.4 kHz, SNR = 30 dB
- \( S/N = 10^{30/10} = 1000 \)
- \( C = 3400 \times \log_2 (1001) = 3400 \times 9.967 = 33{,}889 \) bits/sec, about 33.9 kbps
RTU 2024: B = 10 MHz, S/N = 100 (already a ratio)
- \( C = 10 \times 10^6 \times \log_2 (101) = 10^7 \times 6.658 \approx 66.6 \) Mbps
Quick log tip: \( \log_2 x = 3.32\,\log_{10} x \) (so \( \log_2 1001 = 3.32 \times 3.0004 = 9.96 \)).
Exam tip: If SNR is in dB, do not substitute it directly; that is the commonest mistake.
-
Noise power in bandwidth B: \( N = N_0 B \). So
\( C = B\log_2\left(1 + \dfrac{S}{N_0 B}\right) \)
Let \( x = \dfrac{S}{N_0 B} \), so \( B = \dfrac{S}{N_0 x} \). As \( B \to \infty \), \( x \to 0 \):
\( C = \dfrac{S}{N_0}\cdot\dfrac{\log_2 (1+x)}{x} = \dfrac{S}{N_0}\cdot\dfrac{1}{\ln 2}\cdot\dfrac{\ln(1+x)}{x} \)
Using \( \lim_{x\to 0} \dfrac{\ln(1+x)}{x} = 1 \):
\( C_{\infty} = \dfrac{1}{\ln 2}\dfrac{S}{N_0} = 1.44\,\dfrac{S}{N_0} \)
Meaning: even with unlimited bandwidth, capacity stays finite for a fixed signal power. (RTU 2022, 2024)
Exam tip: Write the limit \( \ln(1+x)/x \to 1 \) clearly; it carries the marks.
-
- Prefix code: no codeword is a prefix of another; instantaneously decodable. (2021, Feb 2024, 2024)
- Prefix vs block code: prefix = variable length for compression; block = fixed length n, used for error control. (2025)
- Kraft inequality: \( \sum 2^{-l_i} \le 1 \), condition for a prefix code to exist. (Feb 2024, 2024)
- Code efficiency: \( \eta = H(X)/\bar{L} \). (2019, 2021)
- Static Huffman principle: merge the two least probable symbols repeatedly; fixed probabilities known in advance. (2019)
- Channel capacity: \( C = \max I(X;Y) \), the maximum error-free rate. (2021, 2025)
- Channel coding theorem: if \( R \le C \), error probability can be made arbitrarily small. (2021)
Exam tip: Add one formula or tiny example in each answer to secure both marks.
-
Noise, fading and interference flip bits, so received data may differ from what was sent. Channel coding adds redundant bits so errors can be detected or corrected, giving reliable communication close to channel capacity.
Point FEC (forward error correction) ARQ (automatic repeat request) Action on error Receiver corrects it itself Receiver asks for retransmission Feedback channel Not needed Needed Code redundancy More (correction needs larger dmin) Less (detection only) Delay Constant Variable Use Satellite, broadcast, storage Internet (TCP), data links Code families: block codes (linear, cyclic, Hamming, BCH) and convolutional codes (tree/trellis).
Simple example: a single parity bit appended to 4 data bits detects (not corrects) any single error. (RTU 2021)
Exam tip: Draw the tree: error control, then FEC and ARQ, then block and convolutional.
-
Random error Burst error Bits corrupted independently at random positions A group of consecutive bits is corrupted Caused by thermal / white noise (AWGN) Caused by fading, lightning, scratches on disc, switching noise Modelled by BSC Channel has memory Corrected by Hamming, BCH codes Corrected by Reed-Solomon, Fire codes, interleaving Burst length b: span from the first to the last erroneous bit in the burst.
Interleaving: write data row-wise, send column-wise; a burst is spread into single errors in several codewords, which a random-error code can then correct.
(RTU Feb 2024, 2024)
Exam tip: Mention interleaving; it is the usual "extra" point.
-
An (n,k) block code maps each k-bit message into an n-bit codeword (n > k). It is linear if the mod-2 sum of any two codewords is also a codeword (so the all-zero word is always a codeword).
Parameters:
- \( k \) message bits, \( n - k = q \) parity (check) bits
- Code rate \( R = k/n \)
- \( 2^k \) valid codewords out of \( 2^n \) possible words
- Redundancy = \( (n-k)/n \)
Systematic layout: \( \mathbf{c} = [\,m_1 \ldots m_k \;\; p_1 \ldots p_{n-k}\,] \)
Example (7,4): message 1011 followed by parity 001 gives codeword 1011001; rate = 4/7.
Encoding: \( \mathbf{c} = \mathbf{m}\,\mathbf{G} \). Decoding check: \( \mathbf{r}\mathbf{H}^T = \mathbf{0} \) for a valid word.
(RTU 2025)
Exam tip: Draw a box with "k message bits" and "n-k parity bits" side by side.
-
Systematic code: message bits appear unchanged in the codeword (first k or last k positions) and the remaining n-k are parity.
\( G = [\,I_k \;\; P\,] \)
Non-systematic code: message bits are mixed into all positions; no separate message block.
Systematic Non-systematic Message visible in codeword Message hidden Simple encoding/decoding Needs extra step to extract message \( G = [I_k \; P] \) G has no identity block Same dmin possible Same code can be re-expressed in systematic form Types of linear block codes:
- 1. Repetition and single parity-check codes
- 2. Hamming codes
- 3. Cyclic codes (BCH, Reed-Solomon, CRC)
- 4. Systematic vs non-systematic (by structure)
(RTU 2022, Feb 2024, 2024, 2025)
Exam tip: State that every non-systematic code can be converted to systematic form by row operations.
-
Given: \( C_4 = D_1 + D_2 + D_3 \), \( C_5 = D_1 + D_2 \), \( C_6 = D_1 + D_3 \) (a (6,3) code).
Step 1: P matrix. Column j of P lists which data bits feed parity j; row i = what \( D_i \) contributes.
- \( D_1 \) is in C4, C5, C6 gives 111
- \( D_2 \) is in C4, C5 gives 110
- \( D_3 \) is in C4, C6 gives 101
\( G = [I_3 \; P] = \begin{bmatrix}1&0&0&1&1&1\\0&1&0&1&1&0\\0&0&1&1&0&1\end{bmatrix} \)
Step 2: codewords \( \mathbf{c} = \mathbf{m}G \):
m c wt 000 000000 0 001 001101 3 010 010110 3 011 011011 4 100 100111 4 101 101010 3 110 110001 3 111 111100 4 Step 3: \( d_{min} = 3 \), so it detects 2 and corrects \( t = \lfloor (3-1)/2 \rfloor = 1 \) error.
Exam tip: Always finish with \( d_{min} \) and \( t \); that is the "error correcting capability".
-
Generator matrix \( G \) (k x n): rows are k independent codewords; encoding \( \mathbf{c} = \mathbf{m}G \).
Systematic form: \( G = [\,I_k \;\; P\,] \), where P is k x (n-k).
Parity-check matrix \( H \) ((n-k) x n):
\( H = [\,P^T \;\; I_{n-k}\,] \)
Relations:
- \( G H^T = 0 \)
- \( \mathbf{c} H^T = \mathbf{0} \) for every codeword (this is the decoding check)
- Each row of H is a parity equation; each column corresponds to one code bit
Example (7,4): \( P = \begin{bmatrix}1&1&1\\1&1&0\\1&0&1\\0&1&1\end{bmatrix} \)
Mod-2 note: in GF(2) minus equals plus, so \( P^T \) needs no sign change.
(RTU 2025)
Exam tip: Always write dimensions (k x n and (n-k) x n); they are a quick consistency check.
-
\( G = \begin{bmatrix}1&0&0&0&1&1&1\\0&1&0&0&1&1&0\\0&0&1&0&1&0&1\\0&0&0&1&0&1&1\end{bmatrix} \)
Method: \( \mathbf{c} = \mathbf{m}G \) = mod-2 sum of the rows of G selected by the 1s in m.
Message 1011: rows 1, 3, 4
- Row 1: 1000111
- Row 3: 0010101
- Row 4: 0001011
- Sum: 1000111 + 0010101 = 1010010; + 0001011 = 1011001
Check: message part 1011, parity 001. ✓
Parity bits directly:
- \( p_1 = m_1 + m_2 + m_3 \)
- \( p_2 = m_1 + m_2 + m_4 \)
- \( p_3 = m_1 + m_3 + m_4 \)
For 1011: \( p_1 = 1+0+1 = 0 \), \( p_2 = 1+0+1 = 0 \), \( p_3 = 1+1+1 = 1 \), giving 001 ✓.
Exam tip: Do the mod-2 addition column by column; most lost marks come from ordinary addition.
-
Method: (1) check G is in the form \( [I_k \mid P] \); (2) write \( P^T \); (3) attach \( I_{n-k} \).
For the (7,4) code above: \( P = \begin{bmatrix}1&1&1\\1&1&0\\1&0&1\\0&1&1\end{bmatrix} \)
\( P^T = \begin{bmatrix}1&1&1&0\\1&1&0&1\\1&0&1&1\end{bmatrix} \)
\( H = \begin{bmatrix}1&1&1&0&1&0&0\\1&1&0&1&0&1&0\\1&0&1&1&0&0&1\end{bmatrix} \)
Verify: \( c = 1011001 \)
- Row 1 of H (positions 1,2,3,5): 1+0+1+0 = 0 ✓
- Row 2 (positions 1,2,4,6): 1+0+1+0 = 0 ✓
- Row 3 (positions 1,3,4,7): 1+1+1+1 = 0 ✓
So \( \mathbf{c}H^T = 000 \).
Column fact: all 7 columns of H are distinct and non-zero, so a single error is identifiable (it is a Hamming code).
Exam tip: If G is not systematic, convert first (next card).
-
Method: use row operations only (add one row to another, swap rows) in GF(2) until the left k x k block is the identity. The code stays the same because rows still span the same set of codewords.
Example (6,3): \( G = \begin{bmatrix}1&1&0&0&1&1\\0&1&1&1&0&1\\1&1&1&0&1&0\end{bmatrix} \)
- 1. \( R_3 \leftarrow R_3 + R_1 + R_2 \): 010100
- 2. \( R_1 \leftarrow R_1 + R_3 \): 100111
- 3. \( R_2 \leftarrow R_2 + R_3 \): 001001
- 4. Reorder rows: 100111, 010100, 001001
\( G_s = \begin{bmatrix}1&0&0&1&1&1\\0&1&0&1&0&0\\0&0&1&0&0&1\end{bmatrix} \)
So \( P = \begin{bmatrix}1&1&1\\1&0&0\\0&0&1\end{bmatrix} \) and \( H = [P^T \; I_3] \).
If the first k columns are not independent, swap columns (this gives an equivalent code).
Exam tip: Show every row operation on a new line; the process earns the marks.
-
Received word \( \mathbf{r} = \mathbf{c} + \mathbf{e} \) (e = error vector).
Syndrome: \( \mathbf{s} = \mathbf{r}H^T = \mathbf{e}H^T \) (since \( \mathbf{c}H^T = 0 \))
- \( \mathbf{s} = \mathbf{0} \): no error detected (error-free transmission)
- \( \mathbf{s} \ne \mathbf{0} \): error present; for a single error, \( \mathbf{s} \) equals the column of H at the error position
Decoding steps: (1) compute s; (2) look up the coset leader (error pattern) for s; (3) \( \hat{\mathbf{c}} = \mathbf{r} + \mathbf{e} \).
Standard array: a table with \( 2^{n-k} \) rows (cosets) and \( 2^k \) columns.
- First row: all codewords (first is the all-zero word)
- First column: coset leaders (minimum-weight error patterns)
- All words in a row share the same syndrome
(RTU 2022, 2024)
Exam tip: Define syndrome as "zero for valid codewords" in one line; it is a standard 2-mark question.
-
Code: (7,4) with \( H = \begin{bmatrix}1&1&1&0&1&0&0\\1&1&0&1&0&1&0\\1&0&1&1&0&0&1\end{bmatrix} \). Received R = 1001001.
Step 1: syndrome (each row of H dotted with R, mod 2):
- Row 1: \( 1+0+0+0 = 1 \)
- Row 2: \( 1+0+1+0 = 0 \)
- Row 3: \( 1+0+1+1 = 1 \)
\( \mathbf{s} = (1\,0\,1) \neq 0 \), so an error exists.
Step 2: compare s with the columns of H: column 3 is \( (1,0,1)^T \), so the error is in bit 3.
Step 3: error vector \( \mathbf{e} = 0010000 \)
Step 4: corrected \( \mathbf{c} = \mathbf{r} + \mathbf{e} = 1001001 + 0010000 = \mathbf{1011001} \) (message 1011).
Exam tip: (RTU 2022 prints a 6-bit received word for a (7,4) code; mention the length mismatch and solve with a 7-bit word.)
-
Hamming weight \( w(\mathbf{c}) \) = number of 1s in c.
Hamming distance \( d(\mathbf{x},\mathbf{y}) \) = number of positions in which x and y differ = \( w(\mathbf{x} + \mathbf{y}) \).
Minimum distance \( d_{min} \) = smallest distance between any two codewords.
For a linear code: \( d_{min} \) = minimum weight of the non-zero codewords = smallest number of columns of H that add to zero.
Capability:
- Detect up to \( s = d_{min} - 1 \) errors
- Correct up to \( t = \lfloor (d_{min} - 1)/2 \rfloor \) errors
- Detect s and correct t together if \( d_{min} \ge s + t + 1 \)
\( d_{min} \) Detects Corrects 2 1 0 3 2 1 5 4 2 Spheres picture: spheres of radius t around codewords must not overlap, so \( d_{min} \ge 2t + 1 \).
(RTU 2025)
Exam tip: Draw two circles at distance 3 touching; it shows t = 1 instantly.
-
A Hamming code is a single-error-correcting linear block code with
\( n = 2^m - 1 \), \( k = n - m \), \( d_{min} = 3 \) (m = 3 gives (7,4); m = 4 gives (15,11)).
Its H matrix has all \( 2^m - 1 \) non-zero m-bit columns, each exactly once. It is a perfect code.
Given: \( H = \begin{bmatrix}1&0&1&1&1&0&0\\1&1&0&1&0&1&0\\0&1&1&1&0&0&1\end{bmatrix} \)
Columns: 110, 011, 101, 111, 100, 010, 001: seven distinct non-zero 3-bit vectors, so \( d_{min} = 3 \) and it is a Hamming code.
Codewords from \( H = [P^T \; I_3] \): \( p_5 = d_1+d_3+d_4 \), \( p_6 = d_1+d_2+d_4 \), \( p_7 = d_2+d_3+d_4 \).
Message 1011 gives \( p_5 = 1 \), \( p_6 = 0 \), \( p_7 = 0 \), so c = 1011100.
Check: row 1 gives \( 1+1+1+1 = 0 \) ✓.
Applications: computer memory (ECC RAM, extended Hamming SECDED), satellite links, data storage.
Exam tip: Always say "all columns distinct and non-zero".
-
Step 1: choose parity bits r with \( 2^r \ge k + r + 1 \). For k = 11: r = 4 gives 16 >= 16 ✓ (r = 3 gives 8 < 15). So (15,11) Hamming code, rate 11/15.
Step 2: parity bits sit at positions 1, 2, 4, 8; position \( p \) checks all positions whose binary index has that bit set.
Demonstration on the smaller (7,4) code: positions 1..7 = \( p_1\, p_2\, d_1\, p_4\, d_2\, d_3\, d_4 \).
- \( p_1 \) covers 1,3,5,7; \( p_2 \) covers 2,3,6,7; \( p_4 \) covers 4,5,6,7
- Data 1011: \( p_1 = 1+0+1 = 0 \), \( p_2 = 1+1+1 = 1 \), \( p_4 = 0+1+1 = 0 \)
- Codeword: 0110011
Error at position 5: received 0110111. Recheck: \( p_1 \)-group = 0+1+1+1 = 1, \( p_2 \)-group = 1+1+1+1 = 0, \( p_4 \)-group = 0+1+1+1 = 1. Syndrome \( (p_4 p_2 p_1) = 101 = 5 \): flip bit 5 and the codeword is restored.
Exam tip: The syndrome number itself is the error position; say this line.
-
- Syndrome for error-free transmission? The zero vector, \( \mathbf{s} = \mathbf{r}H^T = \mathbf{0} \). (2022, 2024)
- Types of linear block code? Systematic and non-systematic; Hamming, cyclic, parity-check, repetition. (Feb 2024, 2024)
- Random vs burst error: random = independent isolated bit errors; burst = run of consecutive corrupted bits. (Feb 2024, 2024)
- Standard array: table of \( 2^{n-k} \) cosets; first row codewords, first column coset leaders; used for syndrome decoding. (2024)
- Minimum distance: smallest Hamming distance between any two codewords; corrects \( \lfloor (d_{min}-1)/2 \rfloor \) errors. (2025)
- Code rate of (7,4): 4/7. Number of codewords: \( 2^4 = 16 \).
Exam tip: Part B/C patterns to practise: codewords from G, H from G, syndrome decoding, Hamming (7,4) check.
-
A Galois field GF(q) is a finite set of q elements closed under addition and multiplication, where every non-zero element has a multiplicative inverse. q is a prime (GF(p)) or a prime power (GF(\( p^m \))).
Properties:
- 1. Closure under + and x
- 2. Associative and commutative for + and x; distributive law holds
- 3. Additive identity 0 and multiplicative identity 1
- 4. Every element has an additive inverse; every non-zero element has a multiplicative inverse
- 5. Number of elements is \( p^m \)
GF(2) tables (mod 2):
+ 0 1 0 0 1 1 1 0 x 0 1 0 0 0 1 0 1 In GF(2) addition is XOR, multiplication is AND, and \( -1 = 1 \).
(RTU 2019, 2022, Feb 2024, 2024, 2025: asked in 5 of 6 papers.)
Exam tip: Write "finite field" plus any two properties for a 2-mark answer.
-
Construction: take a primitive polynomial of degree 3 over GF(2), \( p(x) = x^3 + x + 1 \), and let \( \alpha \) be a root: \( \alpha^3 = \alpha + 1 \). Every non-zero element is a power of \( \alpha \).
Power Polynomial Binary (\( \alpha^2 \alpha^1 \alpha^0 \)) 0 0 000 \( \alpha^0 \) 1 001 \( \alpha^1 \) \( \alpha \) 010 \( \alpha^2 \) \( \alpha^2 \) 100 \( \alpha^3 \) \( \alpha + 1 \) 011 \( \alpha^4 \) \( \alpha^2 + \alpha \) 110 \( \alpha^5 \) \( \alpha^2 + \alpha + 1 \) 111 \( \alpha^6 \) \( \alpha^2 + 1 \) 101 \( \alpha^7 \) 1 001 (cycle repeats) Multiplication is easy with powers: \( \alpha^i \cdot \alpha^j = \alpha^{(i+j) \bmod 7} \). Addition uses the binary form.
Example: \( \alpha^3 + \alpha^5 = 011 + 111 = 100 = \alpha^2 \).
Exam tip: Remember \( \alpha^3 = \alpha + 1 \); the whole table follows from it.
-
Coefficients are taken mod 3 (elements 0, 1, 2).
Given: \( f(x) = 2 + x + x^2 + 2x^4 \), \( g(x) = 1 + 2x^2 + 2x^4 + x^5 \)
Addition: add like powers, reduce mod 3.
- Constant: \( 2+1 = 3 = 0 \)
- \( x \): \( 1+0 = 1 \)
- \( x^2 \): \( 1+2 = 0 \)
- \( x^4 \): \( 2+2 = 4 = 1 \)
- \( x^5 \): 1
\( f + g = x + x^4 + x^5 \)
Multiplication: multiply term by term, collect powers, reduce mod 3.
- Constant: \( 2 \times 1 = 2 \)
- \( x \): \( 1\cdot 1 + 2\cdot 0 = 1 \)
- \( x^2 \): \( 2\cdot 2 + 1\cdot 0 + 1\cdot 1 = 5 = 2 \)
- continue for \( x^3 \ldots x^9 \) in the same way
\( f \cdot g = 2 + x + 2x^2 + 2x^3 + 2x^4 + x^5 + x^6 + x^7 + x^8 + 2x^9 \)
(degree = 4 + 5 = 9 ✓)
General rules: deg of sum is at most max of degrees; deg of product is the sum of degrees. Over GF(2) simply use XOR on coefficients.
Exam tip: Tabulate partial products by power of x; mod-3 reduction at the end avoids slips.
-
A cyclic code is a linear block code in which every cyclic shift of a codeword is also a codeword:
\( (c_0, c_1, \ldots, c_{n-1}) \Rightarrow (c_{n-1}, c_0, \ldots, c_{n-2}) \).
Polynomial form: \( c(x) = c_0 + c_1 x + \cdots + c_{n-1}x^{n-1} \). A shift by one place is \( x\,c(x) \bmod (x^n + 1) \).
Properties:
- 1. Linear: sum of two codewords is a codeword
- 2. Cyclic shift of a codeword is a codeword
- 3. Every codeword polynomial is a multiple of the generator polynomial \( g(x) \)
- 4. \( g(x) \) is a factor of \( x^n + 1 \) and has degree \( n - k \)
- 5. Encoding/decoding by simple shift registers with feedback
Example: for \( g = 1 + x + x^3 \), codeword 1100101 shifts right to 1110010, then 0111001; all are valid codewords.
Applications: CRC error detection, BCH and Reed-Solomon codes.
(RTU Feb 2024, 2025)
Exam tip: Mention "\( x^n + 1 \)" in every cyclic-code answer; it is the key relation.
-
Generator polynomial of an (n,k) cyclic code:
- 1. Unique, monic polynomial of minimum degree \( n - k \) among non-zero codewords
- 2. \( g(x) \) divides \( x^n + 1 \)
- 3. Constant term \( g_0 = 1 \)
- 4. Every codeword: \( c(x) = m(x)\,g(x) \)
Parity-check polynomial: \( h(x) = \dfrac{x^n + 1}{g(x)} \), degree k.
Check for (7,4): \( x^7 + 1 = (x+1)(x^3+x+1)(x^3+x^2+1) \), so \( g(x) = x^3 + x + 1 \) works and \( h(x) = x^4 + x^2 + x + 1 \).
Intersection (RTU 2021): \( C_1 \cap C_2 \) is cyclic. A word is in both codes only if it is a multiple of both \( g_1 \) and \( g_2 \), so
\( g_{\cap}(x) = \text{LCM}\,[\,g_1(x),\, g_2(x)\,] \)
(The sum \( C_1 + C_2 \) has generator GCD\( (g_1, g_2) \).)
Code rate: \( R = k/n = (n - \deg g)/n \).
Exam tip: "LCM for intersection, GCD for sum" is a one-line mark.
-
Non-systematic encoding: \( c(x) = m(x)\,g(x) \), with \( m(x) \) of degree at most 2.
(Check: \( x^6 + 1 = (x^3+1)^2 \) is divisible by \( 1 + x^2 = (1+x)^2 \) ✓)
m(x) c(x) = m(x)g(x) Codeword (c0..c5) wt 0 0 000000 0 1 \( 1 + x^2 \) 101000 2 \( x \) \( x + x^3 \) 010100 2 \( x^2 \) \( x^2 + x^4 \) 001010 2 \( 1 + x \) \( 1 + x + x^2 + x^3 \) 111100 4 \( 1 + x^2 \) \( 1 + x^4 \) 100010 2 \( x + x^2 \) \( x + x^2 + x^3 + x^4 \) 011110 4 \( 1 + x + x^2 \) \( 1 + x + x^3 + x^4 \) 110110 4 \( d_{min} = 2 \): it can detect 1 error and correct 0 errors (\( \lfloor (2-1)/2 \rfloor = 0 \)).
Exam tip: Check cancellation of equal powers mod 2 (e.g. \( x^2 + x^2 = 0 \)) in each product.
-
Method (g(x) = 1 + x + x^3, (7,4), message 0101):
- 1. \( m(x) \): bits \( m_0 m_1 m_2 m_3 = 0101 \) gives \( m(x) = x + x^3 \)
- 2. Multiply by \( x^{n-k} = x^3 \): \( x^3 m(x) = x^4 + x^6 \)
- 3. Divide by \( g(x) = x^3 + x + 1 \) (mod 2) and keep the remainder:
- \( x^6 + x^4 \div (x^3+x+1) \): quotient term \( x^3 \), subtract \( x^6 + x^4 + x^3 \), leaving \( x^3 \)
- \( x^3 \): quotient term 1, subtract \( x^3 + x + 1 \), leaving \( x + 1 \)
- 4. \( b(x) = 1 + x \) (parity)
- 5. \( c(x) = b(x) + x^3 m(x) = 1 + x + x^4 + x^6 \)
Codeword (parity first): \( c_0 \ldots c_6 \) = 1100101 (parity 110, message 0101).
Non-systematic check: \( m(x)g(x) = (x + x^3)(1 + x + x^3) = x + x^2 + x^3 + x^6 \), i.e. 0111001.
Exam tip: The remainder step is the whole answer; show the long division clearly.
-
(7,4), \( g(x) = 1 + x + x^3 \):
Non-systematic G: rows are \( g,\; xg,\; x^2 g,\; x^3 g \):
\( G = \begin{bmatrix}1&1&0&1&0&0&0\\0&1&1&0&1&0&0\\0&0&1&1&0&1&0\\0&0&0&1&1&0&1\end{bmatrix} \)
Systematic G (parity first): row i = \( x^{3+i} \bmod g(x) \) followed by \( x^{3+i} \):
Row \( x^j \bmod g \) Parity Message part 1 \( x^3 \to 1 + x \) 110 1000 2 \( x^4 \to x + x^2 \) 011 0100 3 \( x^5 \to 1 + x + x^2 \) 111 0010 4 \( x^6 \to 1 + x^2 \) 101 0001 Parity-check matrix: \( h(x) = 1 + x + x^2 + x^4 \). Take its reciprocal \( h^*(x) = 1 + x^2 + x^3 + x^4 \) and shift it:
\( H = \begin{bmatrix}1&0&1&1&1&0&0\\0&1&0&1&1&1&0\\0&0&1&0&1&1&1\end{bmatrix} \)
(Verified: \( G H^T = 0 \).)
Exam tip: Coefficient order (low degree first) matters; state it.
-
Circuit: a 3-stage (n-k) shift register of flip-flops \( D_0, D_1, D_2 \).
- Feedback from the last stage \( D_2 \)
- An XOR at the input of \( D_0 \) (tap \( g_0 = 1 \)) and one at the input of \( D_1 \) (tap \( g_1 = 1 \)); no tap for \( g_2 = 0 \)
- Gate (closed for 4 message clocks) and switch (message position, then parity position)
Operation: For the first k = 4 clocks, the message bits (highest degree first) go to the output and into the register with the gate closed. Then the gate opens and the switch moves to the register; the 3 parity bits shift out.
Trace for message 0101 (input order 1, 0, 1, 0; state = \( D_0 D_1 D_2 \)):
Clock Input Feedback State start 000 1 1 1 110 2 0 0 011 3 1 0 001 4 0 1 110 Register = 110 = parity \( 1 + x \) ✓ (same as division). Codeword 1100101.
(RTU 2019, 2025)
Exam tip: Draw the register with the XOR before \( D_1 \); that is where g(x) shows up.
-
Syndrome polynomial: \( s(x) = r(x) \bmod g(x) \). It is zero iff r(x) is a valid codeword. It depends only on the error: \( s(x) = e(x) \bmod g(x) \).
Circuit: the same (n-k)-stage division register as the encoder, with the received bits fed in at the input (highest degree first) with no gate. After n clocks the register holds s(x).
Decoding steps: (1) compute s(x); (2) if s = 0 accept; (3) find the error pattern from the syndrome table; (4) add it to r(x).
Syndrome table for \( g = 1 + x + x^3 \) (single errors):
Error at \( x^i \bmod g \) Syndrome \( x^0 \) 1 100 \( x^1 \) \( x \) 010 \( x^2 \) \( x^2 \) 001 \( x^3 \) \( 1 + x \) 110 \( x^4 \) \( x + x^2 \) 011 \( x^5 \) \( 1 + x + x^2 \) 111 \( x^6 \) \( 1 + x^2 \) 101 Example: sent 1100101, bit \( c_3 \) flipped gives \( r(x) = 1 + x + x^3 + x^4 + x^6 \). Syndrome = 110 = \( x^3 \) pattern, so the error is at \( x^3 \); add \( x^3 \) back to correct.
(RTU 2025)
Exam tip: Mention "cyclic shift of the syndrome" (Meggitt decoder) when the question says "explain decoder".
-
Feature General LBC Cyclic code Description Needs full G matrix (k x n) Needs only g(x) (n-k+1 coefficients) Encoding Matrix multiplication Shift register with feedback Syndrome decoding Look-up table of \( 2^{n-k} \) entries Division circuit and a small table (use cyclic shifts) Hardware More complex Simple, low cost Burst errors Poor Good burst detection (CRC) Algebra Linear algebra Polynomial algebra over GF(2) Families built on cyclic codes: BCH (multiple random errors), Reed-Solomon (burst errors, CDs, QR codes), CRC (Ethernet, ZIP).
Limitation: needs n and g(x) chosen so that g(x) divides \( x^n + 1 \); not every (n,k) exists.
(RTU Feb 2024)
Exam tip: "Because encoding and syndrome need only a shift register" is the one-line reason.
-
- Galois field: a finite field of \( p^m \) elements with +, x, additive and multiplicative inverses. (2019, 2022, Feb 2024, 2024, 2025)
- Two properties of GF: closure under + and x; every non-zero element has a multiplicative inverse (also commutative, associative, distributive).
- Cyclic code: linear block code where every cyclic shift of a codeword is a codeword. (Feb 2024)
- Generation of a cyclic code: \( c(x) = m(x)g(x) \), with \( g(x) \) a factor of \( x^n + 1 \) of degree n-k. (Feb 2024)
- Two properties: linearity and cyclic-shift closure; codewords are multiples of g(x). (2025)
- Code rate: \( k/n \); d_min for (6,3), g = 1 + x^2: 2.
Exam tip: In Part B/C: practise the three recurring computations: codewords by multiplication, systematic by division, G and H from g(x).
-
A convolutional encoder is a shift register with modulo-2 adders that produces n output bits for every k input bits; each output depends on the current and previous input bits (the code has memory).
Parameters:
- Code rate \( r = k/n \) (here 1/2)
- Constraint length K = number of shift-register stages + 1 = number of bits that affect an output (K = 3)
- Memory \( m = K - 1 = 2 \) (number of flip-flops)
- Dimension (n, k, K) = (2, 1, 3)
- Number of states = \( 2^{K-1} = 4 \)
Generator sequences: \( g^{(1)} = 111 \), \( g^{(2)} = 101 \) (or \( g^{(1)}(D) = 1 + D + D^2 \), \( g^{(2)}(D) = 1 + D^2 \)).
Outputs: \( v_1 = u_t + u_{t-1} + u_{t-2} \), \( v_2 = u_t + u_{t-2} \). The commutator sends \( v_1, v_2 \) alternately.
(RTU 2022, 2025)
Exam tip: Write the dimension (n, k, K) and the 4 states; these earn the "(ii)/(iii)" marks.
-
Block code Convolutional code Message divided into fixed blocks of k bits Continuous stream, no blocks Output depends on current block only Output depends on current and previous bits (memory) Memoryless Has memory (K-1 registers) Described by (n,k), G, H Described by (n,k,K) and generator sequences Syndrome decoding Viterbi / sequential decoding Block synchronisation needed Better for streaming data Advantages:
- Simple encoder, good performance at low rates
- Works well with soft-decision Viterbi decoding
- Continuous operation
Disadvantages:
- Decoder is complex (Viterbi complexity grows as \( 2^{K-1} \))
- Error propagation if the decoder loses track
- Not suited to burst errors
(RTU 2021, Feb 2024)
Exam tip: Write "memory" in the first row of the table; it is the key difference.
-
Encoder: \( g^{(1)} = 111 \), \( g^{(2)} = 101 \), registers initially 0. Output for each input bit u: \( v_1 = u + s_1 + s_2 \), \( v_2 = u + s_2 \) (\( s_1, s_2 \) = previous two inputs).
Message 100110 (modelled on RTU 2019):
t u State \( s_1 s_2 \) \( v_1 \) \( v_2 \) Output 1 1 00 1 1 11 2 0 10 1 0 10 3 0 01 1 1 11 4 1 00 1 1 11 5 1 10 0 1 01 6 0 11 0 1 01 Code sequence: 11 10 11 11 01 01.
For message 10011 (RTU 2022): 11 10 11 11 01; append K-1 = 2 zeros to flush the register: next outputs 01 11. Full: 11 10 11 11 01 01 11.
Exam tip: If the diagram is given, first read the tap connections as generator sequences; then use the same table.
-
States = contents of the two memory cells \( (s_1 s_2) \): 00, 01, 10, 11. Each state has two outgoing branches (input 0 and input 1), labelled input/output.
From Input 0 Input 1 00 00 (out 00) 10 (out 11) 10 01 (out 10) 11 (out 01) 01 00 (out 11) 10 (out 00) 11 01 (out 01) 11 (out 10) Next state: the input enters \( s_1 \), and the old \( s_1 \) moves to \( s_2 \).
Uses: to find the output sequence by walking the diagram, and to find free distance and the transfer function.
Limitation: a state diagram does not show time, so it cannot trace decoding.
(RTU Feb 2024, 2024, 2025)
Exam tip: Draw 4 circles, 8 arrows, with a self-loop on 00 (0/00) and on 11 (1/10).
-
Trellis diagram: the state diagram unrolled in time. Each column is one time step with the 4 states as nodes; a solid line is an input 0 branch and a dashed line an input 1 branch, with the output bits written on each branch.
Steady-state: after the first K-1 = 2 steps every node has 2 incoming and 2 outgoing branches.
State diagram Trellis diagram Time-independent; one node per state Time-indexed; nodes repeated at each step Compact Larger Finding output sequences, \( d_{free} \), transfer function Viterbi decoding Loops show repeats Each path = one input sequence Example path: input 1 0 1 1 gives states 00, 10, 01, 10, 11 with outputs 11, 10, 00, 01.
(RTU Feb 2024, 2024, 2025)
Exam tip: Mark the solid = 0, dashed = 1 convention in a legend.
-
Code tree: every node has two branches; upper = input 0, lower = input 1, with the 2 output bits written on the branch. After L inputs the tree has \( 2^L \) paths, so it grows exponentially.
Branch outputs for the first three inputs:
Input u1 u2 u3 Output 000 00 00 00 001 00 00 11 010 00 11 10 011 00 11 01 100 11 10 11 101 11 10 00 110 11 01 01 111 11 01 10 Remark: after the 3rd level the tree repeats itself (nodes with the same state have identical subtrees); that observation leads to the trellis, which is far more compact.
Exam tip: The first two levels have only the states you reach from 00; draw them accurately.
-
Viterbi decoding is a maximum-likelihood decoding algorithm that finds the most probable transmitted path through the trellis.
Algorithm (hard decision):
- 1. Start at state 00 at time 0 with path metric 0
- 2. At each step, for each branch compute the branch metric = Hamming distance between received pair and branch output
- 3. At each state, add the branch metric to the previous path metric for the two incoming paths, compare, keep the smaller (the survivor) and discard the other
- 4. Repeat for all time steps; with tail bits end at state 00
- 5. Trace back the survivor path to read the input bits
Key idea: the best path to a state never needs the discarded paths, so work is \( 2^{K-1} \) comparisons per step instead of exponential.
Surviving path: the path retained at a node because it has the smallest metric.
(RTU 2019, 2022, Feb 2024, 2024, 2025)
Exam tip: Always draw the trellis with path metrics written at every node, and strike out the discarded branches.
-
Received (with two channel errors) = 11 10 10 01 11 11. (The sent sequence for 1011 + 2 tail zeros is 11 10 00 01 01 11.)
Path metrics (min accumulated Hamming distance) after each step:
Step Received 00 01 10 11 1 11 2 - 0 - 2 10 3 0 3 2 3 10 1 3 1 2 4 01 2 2 2 1 5 11 2 2 2 2 6 11 2 Trace back from state 00 (metric 2): states 00, 10, 01, 10, 11, 01, 00 with inputs 1, 0, 1, 1, 0, 0.
Remove the 2 tail bits: decoded message = 1011 ✓, and the 2 errors were corrected (the minimum metric 2 counts them).
Exam tip: The final metric equals the number of corrected bit errors; mention it.
-
Free distance \( d_{free} \) = minimum Hamming weight of any non-zero path that leaves state 00 and returns to 00.
For the (111, 101) encoder: path 00 to 10 to 01 to 00 for input 1 0 0.
- Branch outputs: 11, 10, 11 give weights 2 + 1 + 2 = 5
- So \( d_{free} = 5 \)
Error-correcting capability: \( t = \lfloor (d_{free} - 1)/2 \rfloor = 2 \) errors in a constraint span.
A larger \( d_{free} \) means better error-correcting performance.
How to find it: (1) break the state diagram at state 00 into start and end nodes; (2) label branches by \( D^{\text{weight}} \); (3) find the minimum-power path.
Comparison: the 2-bit-error pattern fits inside the correcting capability, which is why the Viterbi example before corrects 2 errors.
Exam tip: Give the explicit minimum-weight path with its input; it proves the value.
-
The transfer function \( T(D) \) of the encoder describes all paths that leave state 00 and merge back to 00, grouped by output weight.
Method:
- 1. Split state 00 into a start node (a) and an end node (e)
- 2. Label each branch \( D^{w} \), where w = weight of its output
- 3. Write state equations and solve for \( T(D) = X_e / X_a \)
For the (111, 101) code:
\( T(D) = \dfrac{D^5}{1 - 2D} = D^5 + 2D^6 + 4D^7 + \cdots \)
Reading it:
- Smallest power = \( d_{free} = 5 \)
- Coefficients count paths: 1 path of weight 5, 2 of weight 6, 4 of weight 7
Uses: compute \( d_{free} \), and find upper bounds on bit-error probability (with N and J variables, count input weight and length).
(RTU Feb 2024, 2024)
Exam tip: Always state: "power of D = output weight; exponent of lowest term = free distance".
-
Sequential decoding explores the code tree one path at a time, in contrast to Viterbi, which examines all paths.
Working (Fano / stack algorithm):
- 1. Move forward along the most probable branch (smallest metric, best match with received bits)
- 2. If the path metric drops below a threshold, back up and try the next best branch
- 3. Continue until the end of the tree is reached
- 4. Output the inputs along the path
Point Viterbi Sequential Search All \( 2^{K-1} \) states per step One path at a time Complexity Grows with \( 2^{K-1} \) Almost independent of K Constraint length used Small (up to about 10) Large (K around 40) Decoding time Fixed Variable (more when noisy) Weakness Memory/complexity Buffer overflow in noise Applications: deep-space links with long constraint length codes.
(RTU Feb 2024, 2024)
Exam tip: Write "variable decoding time, buffer overflow" as the main drawback.
-
- Viterbi decoding: maximum-likelihood decoding that keeps one survivor per state on the trellis. (2019)
- Surviving path: the path with the smaller metric retained at a trellis node; the other is discarded. (2022)
- Convolution code over other codes: uses memory so works on a continuous stream, simple encoder, good with soft-decision decoding. (Feb 2024)
- State vs trellis diagram: state diagram has one node per state (no time); trellis unfolds it in time. (Feb 2024, 2024)
- Convolutional encoder: shift register plus modulo-2 adders giving n outputs per k inputs, with memory. (2025)
- Three representations: state diagram, code tree, trellis diagram. (2025)
- Code rate / constraint length (RTU 2022 type): rate = k/n = 1/2; K = 3; dimension (2, 1, 3).
Exam tip: Practise one full encoder-output table and one Viterbi table; that covers both Part B and Part C.
No card matches that search.
1/70
0
0:00
Question
Click the card or press Space to flip
Answer
Diagram for this card
Diagram
Handwritten diagram
Run complete
0 nailed · 0 in the pile · 0:00 · best combo 0
Scroll to zoom · drag to pan · Esc to close
Shortcuts
- S
- Start the run
- Space
- Show me the answer
- ← →
- Previous / next card
- 1 2
- Not yet / Nailed it
- D
- Open the diagram
- F
- Diagram full screen
- /
- Search the deck
- Esc
- Close whatever is open