This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: # 18 ECE 253a Digital Image Processing Pamela Cosman 11/17/10 HOMEWORK 5 Due Monday Nov 29 in class 1. Huffman coding In class weve talked about only binary Huffman codes, but one can use different output alphabets. For example, a ternary Huffman code is a code over an output alphabet with 3 symbols, which we could call a , b , and c . The design is done by combining, at each step, the three least probable symbols in the input alphabet, and assigning them the output symbols a , b and c . Consider a random variable X that takes six values with probabilities 0.5, 0.25, 0.1, 0.05, 0.05, 0.05. (a) Construct a binary Huffman code for this random variable. What is its average length? (b) Construct a quaternary Huffman code for this random variable. A quaternary code has 4 symbols in the output alphabet (call them a , b , c , and d ). What is the average length of the code? (c) One way to construct a binary code for the random variable is to start with a quaternary code and convert the symbols into binary using the mapping a 00, b 01, c 10, and d 11. What is the average length of the binary code for the random variable above constructed by this process? (d) For any random variable, X , let L H be the average length of the binary Huffman code for the random variable, and let L QB be the average length constructed by first building a quaternary Huffman code and converting it to binary. It can be shown thatbuilding a quaternary Huffman code and converting it to binary....
View Full
Document
 Fall '11
 Cosman
 Image processing

Click to edit the document details