
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

Department of Electrical and Computer Engineering
ECE 242 Winter 2009 Instructor: K. Rose
Homework Assignment #
(Due on Wednesday 3/4/2009)
Reading: Review Chapters 8 and 9. Problem # 1. Construct a probability sequence p = (p 1 , p 2 ,.. .) such that H(p) = ∞ (be creative!).
Problem # 2. In this problem you are to try to construct a uniquely decodable code over the four-letter alphabet A = { 0 , 1 , 2 , 3 } with prescribed codeword lengths. In the following matrix the symbol ki denotes the number of words of length i in the putative code.
code 1 code 2 code 3 code 4
k 1 k 2 k 3 k 4 k 5 k 6 3 3 3 3 4 0 2 7 3 3 5 0 1 7 3 7 4 0 0 7 3 11 3 4
In each of the four cases, construct the required code, or explain why such a code cannot exist.
Problem # 3. A discrete source with probability distribution
p = (. 2 ,. 15 ,. 15 ,. 1 ,. 1 ,. 1 ,. 1 , .1)
is to be encoded into a ternary prefix code with minimum average length. Construct two sets of codewords whose lengths have the same minimum average value, but different variances. State a reason or reasons why one or the other might be preferable in applications.
Problem # 4. Let p = (. 9 , .1) be the probability distribution of a discrete memoryless source. Find the minimum average length (in bits per original symbol) for a prefix code for p, p^2 , and p^3. Vector coding offers advantages even if the samples are independent.