- 2073 Chaitra (CS II) · 6+4 marks
Importance of source coding; fixed vs Shannon-Fano (five symbols)
Short answer
Source coding removes redundancy, lowering bit rate, bandwidth, and power. For P={0.3,0.25,0.2,0.15,0.1}, entropy H=2.2282 bits/symbol. Fixed-length (3-bit) efficiency 74.27%; Shannon-Fano coding gives average length 2.25 bits/symbol, efficiency 99.03% and saves 0.75 bits per symbol.
Discuss the importance of source coding in Digital Communication System. A discrete memory less source emits five symbols with probabilities P = {0.3, 0.25, 0.2, 0.15, 0.1}, find coding efficiency for both fixed and Shannon-Fano coding and compare results.
Importance of source coding
Source coding converts the source output into a binary sequence using as few bits per symbol as possible, by removing redundancy. Its importance:
- Lower bit rate: the average code length approaches the entropy , so fewer bits are sent for the same information.
- Bandwidth saving: a lower bit rate needs less channel bandwidth, so more users or services fit in the same band.
- Power and energy saving: fewer bits means less transmitted energy, important in mobile and satellite links.
- Storage saving: compressed files (ZIP, JPEG, MP3) need less memory.
- Exploits statistics: variable-length codes give short words to frequent symbols and long words to rare ones.
- Theoretical guarantee: Shannon's source coding theorem, , shows how close a code can come to the limit; efficiency measures the code.
- Uniquely decodable prefix codes allow decoding without separators.
- Supports channel coding: removing useless redundancy leaves room to add useful redundancy for error control.
Numerical:
Entropy:
| Symbol | |||
|---|---|---|---|
| S0 | 0.3 | 1.7370 | 0.5211 |
| S1 | 0.25 | 2.0000 | 0.5000 |
| S2 | 0.2 | 2.3219 | 0.4644 |
| S3 | 0.15 | 2.7370 | 0.4105 |
| S4 | 0.1 | 3.3219 | 0.3322 |
| Total | 1 | 2.2282 |
(a) Fixed-length coding: 5 symbols need bits each (000 to 100).
(b) Shannon–Fano coding: first split {0.3, 0.25} = 0.55 vs {0.2, 0.15, 0.1} = 0.45; then {0.2} vs {0.15, 0.1}.
| Symbol | Step 1 | Step 2 | Step 3 | Code | ||
|---|---|---|---|---|---|---|
| S0 | 0.3 | 0 | 0 | 00 | 2 | |
| S1 | 0.25 | 0 | 1 | 01 | 2 | |
| S2 | 0.2 | 1 | 0 | 10 | 2 | |
| S3 | 0.15 | 1 | 1 | 0 | 110 | 3 |
| S4 | 0.1 | 1 | 1 | 1 | 111 | 3 |
Comparison
| Method | Efficiency | Redundancy | |
|---|---|---|---|
| Fixed length | 3 | 74.27 % | 25.73 % |
| Shannon–Fano | 2.25 | 99.03 % | 0.97 % |
Shannon–Fano uses 0.75 bit/symbol less (25 % fewer bits) and is almost at the entropy limit, while fixed-length coding wastes about a quarter of the bits.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Importance of source coding; Shannon-Fano vs fixed length (seven symbols) · Communication Systems, chapter 6
- Importance of source coding; Shannon-Fano vs BCD (four symbols) · Communication Systems, chapter 6
- Digital communication system; Shannon-Fano for six symbols · Communication Systems, chapter 6
- Digital communication system elements; Shannon-Fano coding · Communication Systems, chapter 6
- Source coding; Huffman for five symbols (0.3, 0.25, 0.2, 0.15, 0.1) · Communication Systems, chapter 6
- Source vs channel coding; Huffman for five symbols · Communication Systems, chapter 6
- Shannon-Fano code for eight symbols · Data Communication, chapter 8
- Shannon-Fano code for six symbols · Data Communication, chapter 8
- Source coding; fixed vs variable length codes · Data Communication, chapter 8