Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1. Consider the sentence, THE DEVIL IS IN THE DETAILS. (a) Draw the frequency table and Huffman tree, using the algorithm in the supplementary ecture
1. Consider the sentence, "THE DEVIL IS IN THE DETAILS." (a) Draw the frequency table and Huffman tree, using the algorithm in the supplementary ecture notes, for the letters in the sentence. The table should have three columns: letter, frequency and code. For the initial contents of the priority queue, when letters have the same frequency, they are enqueued in lexicographical order. [10 points] (b) Compute the weighted leaf path length of the Huffman tree; that is, the number of bits required to encode the sentence. [5 points] (c) Calculate the average codeword length per letter when Huffman codes are used to encode the letters in the sentence. [5 points] (d) Calculate the entropy of the letters in this sentence. [5 points] (e) Using the Huffman codes generated for the sentence, encode the phrase "SEALS DIVE", leaving a whitespace between between words. [5 points] (f) Give the phrase obtained when 101011001101010 1101011001111 is decoded us- ing the codes generated for the sentence. [5 points]
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