ECE 242 HW 5: Probability Sequences, Decodable Codes, Prefix Codes, Assignments of Electrical and Electronics Engineering

A university homework assignment from the university of california, santa barbara, department of electrical and computer engineering, for the course ece 242, taught by k. Rose, during the winter 2009 semester. The assignment includes four problems related to probability sequences, constructing uniquely decodable codes over a four-letter alphabet, and finding minimum average length prefix codes for given probability distributions.

Typology: Assignments

Pre 2010

Uploaded on 09/17/2009

koofers-user-ew3-1
koofers-user-ew3-1 🇺🇸

10 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
UNIVERSITY OF CALIFORNIA, SANTA BARBARA
Department of Electrical and Computer Engineering
ECE 242 Winter 2009 Instructor: K. Rose
Homework Assignment #5
(Due on Wednesday 3/4/2009)
Reading: Review Chapters 8 and 9.
Problem # 1. Construct a probability sequence p= (p1, p2, . . .) 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 kidenotes the number of words of length iin the putative code.
code 1
code 2
code 3
code 4
k1k2k3k4k5k6
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,p2, and p3. Vector coding offers advantages even if the samples are independent.

Partial preview of the text

Download ECE 242 HW 5: Probability Sequences, Decodable Codes, Prefix Codes and more Assignments Electrical and Electronics Engineering in PDF only on Docsity!

UNIVERSITY OF CALIFORNIA, SANTA BARBARA

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.