114_1_image_proc_exam_solns_2010_Part2

# 114_1_image_proc_exam_solns_2010_Part2 - p p 1 p 2 p 3 p 4...

This preview shows pages 1–2. Sign up to view the full content.

EE114 Introduction to Speech and Image Processing Winter Quarter, 2010 Page 5 of 6 Solution: 1 0 1 1 0 0 0 2 0 1 0 4. Huffman Coding (25 points) Consider a set of symbols s 0 , s 1 , s 2 , s 3 , and s 4 , with associated respective probabilities p 0 , p 1 , p 2 , p 3 , and p 4 . Of course, p 0 +p 1 +p 2 +p 3 +p 4 =1. Suppose that two different Huffman codes for this symbol set are designed, using normal Huffman code design procedures. In both cases, the same set of probabilities p i is used. The resulting codes are shown below, and are both valid Huffman codes for this symbol set. Code 1 Code 2 s 0 0 00 s 1 100 010 s 2 101 011 s 3 110 10 s 4 111 11 Given the codes listed above, what can be determined about the relative values of the probabilities p 0 , p 1 , p 2 , p 3 , and p 4 ? For full credit, your answer must provide all the information that can be determined about the relationships among these five probability values (other than

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: p +p 1 +p 2 +p 3 +p 4 =1, which was already given). Solution: First we draw the code trees for code 1 and 2 Code 1 EE114 Introduction to Speech and Image Processing Winter Quarter, 2010 Page 6 of 6 s s 1 s 2 s 3 s 4 1 1 1 1 Code 2 s s 1 s 2 s 3 s 4 1 1 1 Looking at the trees, we can see that 1 2 3 4 p p p p p + ≤ + = because of the differences between the two trees (the code designer has the ability to associate ( 1 2 s s + ) either with s ,or with ( 3 4 s s + )). Note that this also implies that 3 4 1 p p p p = + and 3 4 2 p p p p = + ....
View Full Document

{[ snackBarMessage ]}

### Page1 / 2

114_1_image_proc_exam_solns_2010_Part2 - p p 1 p 2 p 3 p 4...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online