Question 1 Given that the messages y1, y2, y3, y4, y5 with the corresponding probabilities 0.4, 0.2, 0.2, 0.1, and 0.1 a) Construct a binary code by using a Shannon Fano Algorithm to determine?
I. Code efficiency ii. Redundancy of the code iii. Code tree
Question 2 a) Consider a Huffman’s Algorithm that uses a variable-length encoding scheme to compress the original text: GOOD DAY to determine the following?
I. Code tree ii. Codeword iii. Average code length
Question 3 a) Write a short note on the following and state any two (2) practical examples under each? I. Impact printer ii. Non-impact printer b) What is the difference between Additive Color and Subtractive Color and two (2) examples under each?
Question 2
a) Code:
D: 00, O: 01, Space: 100, A: 101, G: 110, Y: 111
i) Code tree:
II) Codeword:
11001010 01000010 11110000
III) Average code length:
Question 1
a)
iii) Code tree:
Code:
i) Code efficiency:
is the average codeword length
is the entropy per source symbol
is probability of symbol.
ii) Redundancy of the code:
Comments