7_HW7Solutions

# 7_HW7Solutions - c To answer this question it is most...

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

1 EE 211A Digital Image Processing I Fall Quarter, 2011 Handout 23 Instructor: John Villasenor Homework 7 Solutions Solutions: 1. Symbol Code Prob 0 0 0 0.95 1 1 0.05 1 Entropy = Ave. length = Efficiency = 0.286 = 28.6% Symbol Code Prob 00 0 0.9025 0 1 01 10 0.0475 0 1 10 110 0.0475 0 1 11 111 0.0025 Entropy = 0.573, Ave. length = 0.9025 + 2(0.0475) + 3(0.0475) + 3(0.0025) = 1.147, Efficiency = 49%. 2. a) log 2 (k) b) The Huffman code achieves entropy when k = 2 n and 2 n+1 so L-H = 0 in either case.

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: c) To answer this question, it is most intuitive if we describe k as follows k = 2 n + m, where m is an offset from a power of two. m is in the range 0 ≤ m ≤ 2 n We can draw the Huffman tree for a uniform source as follows: m # codewords of length n # codewords of length n+1 1 15 2 2 14 4 3 13 6 2 So we now can describe the average length of a Huffman codeword as follows: Average Length = Total Bits / number of symbols Efficiency = Entropy / Average Length 3...
View Full Document

{[ snackBarMessage ]}

### Page1 / 3

7_HW7Solutions - c To answer this question it is most...

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

View Full Document
Ask a homework question - tutors are online