Exercise 7 Convert Your Document To PDF and Send To On or Before 27 Nov 2014 23:59

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 2

Chu Hai College of Higher Education

CSC163 Multimedia Information System Dr. H. Fu


Student Name: __________________ Student ID:__________ ______Mark:_________________

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.

Insert your answer here.

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:_________________

(c) Given a sequence


“EAAFFFFFDDDDDDBBBBBBBBCCCCCCCCCHHHHHHHHHHGGGGGGGGGGGG”,
find the Huffman code and the compression ratio. Suppose the coding scheme without compression is a fixed
length coding scheme as below.
Character Code
A 000
B 001
C 010
D 011
E 100
F 101
G 110
H 111

(d) Find the compression ratio if the distribution become


A:(2), B:(8), C:(9), D:(6), E:(1), F:(5), G:(12), H:(120)
supposing the sequence to be coded is
“EAAFFFFFDDDDDDBBBBBBBBCCCCCCCCCHH….HHHGGGGGGGGGGGG”.
120 ‘H’s

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy