Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Q3. (15 points) Given an alphabet with n characters. Let the characters be numbered from 1 to n, and let the frequency of character i
Q3. (15 points) Given an alphabet with n characters. Let the characters be numbered from 1 to n, and let the frequency of character i be f-1/2 for i-1,2,..,n-1, with the last character n having frequency f-1/21. For example, if n-6, then the frequencies of the first five characters are 1/2, 1/4, 1/8, 1/16, 1/32, respectively, and the frequency of the last character is 1/32. Answer the following questions: a) (5 points) Show that the frequencies of all characters sum to 1 (as they should) for any n. b) (5 points) Show what the huffman encoding is for each character. In building the encoding tree, the larger frequency child should be on the left, and if there are two groups of characters with the same frequency, the one with the smaller index should be on the left. c) (5 points) What is the expected number of bits per character? Let the encoding length of characteri be denoted as l, then the expected or average number of bits for the encoding is computed as fi Use this formula to derive a closed form expression (for any n)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started