Skip to main content

Digital communication system; Shannon-Fano for six symbols

Short answer

A digital communication system comprises source, formatter, source encoder, channel encoder, modulator, channel, demodulator, channel decoder, source decoder, and formatter. For the given six symbols, Shannon-Fano coding yields codes: x1=00, x3=01, x2=10, x4=110, x5=1110, x6=1111. Average code length is 2.38 bits/symbol, entropy is 2.3601 bits/symbol, efficiency is 99.17%, redundancy is 0.83%.

Explain digital communication system with appropriate block diagram. A DMS has six symbols with probability of p(x₁) = 0.3, p(x₂) = 0.2, p(x₃) = 0.25, p(x₄) = 0.12 and p(x₅) = 0.08, p(x₆) = 0.05. Construct the Shannon-Fano code for X and calculate its efficiency and code Redundancy.

Digital communication system

A digital communication system sends information as a sequence of discrete symbols (usually bits) from a source to a user.

 Source -> Formatter -> Source  -> Channel -> Modulator
 (analog   (sample,    encoder    encoder        |
 /digital)  quantize)                            v
                                              Channel
                                            (noise added)
                                                 |
 User <- Formatter <- Source  <- Channel <- Demodulator
         (D/A)        decoder    decoder     /detector
  • Information source and formatter: produces the message; an analog message is sampled, quantized and coded (A/D conversion) into bits.
  • Source encoder: removes redundancy so the average number of bits per symbol is close to the entropy (Huffman, Shannon–Fano). This reduces bit rate and bandwidth.
  • Channel encoder: adds controlled redundancy (parity bits) so that errors caused by the channel can be detected or corrected (Hamming, cyclic, convolutional codes).
  • Modulator: maps the bits onto waveforms suited to the channel: line codes for baseband, ASK/FSK/PSK/QAM for bandpass.
  • Channel: wire, cable, fibre or radio link; it attenuates, distorts (ISI) and adds noise.
  • Demodulator/detector: recovers the bit stream from the noisy waveform, usually with a matched filter and a decision device.
  • Channel decoder, source decoder, formatter: reverse the encoding steps and deliver the message to the user.

Performance is measured by bit error probability and by bandwidth and power efficiency.

Shannon–Fano code

Probabilities add to 1. Procedure: list symbols in decreasing probability; split the list into two groups of nearly equal total probability; give 0 to the upper group and 1 to the lower group; repeat in each group until each has one symbol.

First split: {0.3, 0.25} = 0.55 and {0.2, 0.12, 0.08, 0.05} = 0.45.

Symbolpip_iStep 1Step 2Step 3Step 4Codelil_i
x10.300002
x30.2501012
x20.210102
x40.121101103
x50.08111011104
x60.05111111114

Entropy:

Symbolpip_ilog⁡2(1/pi)\log_2(1/p_i)pilog⁡2(1/pi)p_i\log_2(1/p_i)
x10.31.73700.5211
x20.22.32190.4644
x30.252.00000.5000
x40.123.05890.3671
x50.083.64390.2915
x60.054.32190.2161
Total12.3601
H(X)=∑pilog⁡21pi=2.3601 bits/symbolH(X) = \sum p_i\log_2\frac{1}{p_i} = 2.3601\ \text{bits/symbol}

Average code length:

Lˉ=∑pili=0.3(2)+0.25(2)+0.2(2)+0.12(3)+0.08(4)+0.05(4)=0.6+0.5+0.4+0.36+0.32+0.2=2.38 bits/symbol\begin{aligned} \bar L &= \sum p_i l_i = 0.3(2)+0.25(2)+0.2(2)+0.12(3)+0.08(4)+0.05(4) \\ &= 0.6+0.5+0.4+0.36+0.32+0.2 = 2.38\ \text{bits/symbol} \end{aligned}

Efficiency and redundancy:

η=HLˉ=2.36012.38=0.9917=99.17%γ=1−η=0.0083=0.83%\begin{aligned} \eta &= \frac{H}{\bar L} = \frac{2.3601}{2.38} = 0.9917 = 99.17\% \\ \gamma &= 1 - \eta = 0.0083 = 0.83\% \end{aligned}

Answer: codes x1=00x_1 = 00, x3=01x_3 = 01, x2=10x_2 = 10, x4=110x_4 = 110, x5=1110x_5 = 1110, x6=1111x_6 = 1111; Lˉ=2.38\bar L = 2.38 bits/symbol, efficiency = 99.17 %, redundancy = 0.83 %.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Communication Systems chapter 6 questions →