Professional Documents
Culture Documents
WEEK 5
Because all possible sequences of N messages from this source have the same
composition, all the sequences (of N messages) are equiprobable, with probability
P ( S N ) . We can consider these long sequences as new messages (which are now
equiprobable). To encode one such sequence we need L N binary digits, where
1
= log
( )
By substitution:
1
= log = ( )
1 1
log ≤ bi ≤ 1 + log
( ) ( )
4. Calculate the factor (Fi) by direct accumulation of the probabilities till the n
symbol.
23
UNIVERSITY OF ANBAR LECTURE NOTES ON INFORMATION THEORY FOR 4th CLASS STUDENTS
COLLEGE OF ENGINEERING BY: NASER AL FALAHI ELECTRICAL ENGINEERING
=( )
Example: A source emits 7 symbols with probabilities { 0.3 , 0.2 , 0.15 , 0.12 , 0.1 , 0.08 ,
0.05} construct the Shannon code for this source.
Sol:
For example, C4
0.65*2 = 1.3, so, 1 will be assigned to the code, and the rest (0.3) will be multiplied again
by 2.
0.6*2=1.2, so, 1 will be assigned, & the rest (0.2) will be multiplied by 2
24
UNIVERSITY OF ANBAR LECTURE NOTES ON INFORMATION THEORY FOR 4th CLASS STUDENTS
COLLEGE OF ENGINEERING BY: NASER AL FALAHI ELECTRICAL ENGINEERING
The table below shows the validation of the above calculations along with all individual
codes.
H.W. Compare between Shannon code & Fano code in term of efficiency & redundancy
for the above source.
25