Exercise 7 Convert Your Document To PDF and Send To On or Before 27 Nov 2014 23:59
Exercise 7 Convert Your Document To PDF and Send To On or Before 27 Nov 2014 23:59
Exercise 7 Convert Your Document To PDF and Send To On or Before 27 Nov 2014 23:59
Exercise 7
Convert your document to PDF and send to hongfu@chuhai.edu.hk on or
before 27 Nov 2014 23:59
1. (a) What is the entropy ( ) of the image below, where numbers (0, 20, 50, 99) denote the gray-level
intensities?
(b) Show step by step how to construct the Huffman tree to encode the above four intensity values in this image.
Show the resulting code for each intensity value.
(c) What is the average number of bits needed for each pixel, using your Huffman code? How does it compare to
?
Insert your answer here.
2. Consider an alphabet with two symbols A;B, with probability P(A) = x and P(B) = 1−x.
(a) Plot the entropy as a function of x. (You may use Scilab.)
(b) find x value(s) which lead(s) to the maximum entropy and explain your answer.
3. Suppose eight characters have a distribution A:(2), B:(8), C:(9), D:(6), E:(1), F:(5), G:(12), H:(10).
(a) Draw a Huffman tree for this distribution.
(b) Give the Huffman coding result by Huffcomp Toobox, and compare the QM with your result in 3(a).
SB= h= L= QM=
Chu Hai College of Higher Education
CSC163 Multimedia Information System Dr. H. Fu
Student Name: __________________ Student ID:__________ ______Mark:_________________