Topic: Digital Communications
Given source symbols $A(0.4)$, $B(0.3)$, $C(0.2)$, $D(0.1)$. What is the average codeword length using Huffman coding?
- A. 1.9 bits
- B. 2.0 bits
- C. 2.2 bits
- D. 1.8 bits
Answer: A. 1.9 bits
Explanation: Following the Huffman coding procedure:
1. Combine C(0.2) and D(0.1) -> Node CD(0.3).
2. Combine B(0.3) and CD(0.3) -> Node BCD(0.6).
3. Combine A(0.4) and BCD(0.6) -> Root(1.0).
Tracing back, the lengths are: A = 1 bit, B = 2 bits, C = 3 bits, D = 3 bits.
Average length $L_{avg} = (0.4 \times 1) + (0.3 \times 2) + (0.2 \times 3) + (0.1 \times 3) = 0.4 + 0.6 + 0.6 + 0.3 = 1.9$ bits.