Question: 1. Consider the sentence, A SANTA LIVED AS A DEVIL AT NASA and use the Huffman algorithm and conventions as specified in the supplementary notes

1. Consider the sentence, A SANTA LIVED AS A DEVIL AT NASA and use the Huffman algorithm and conventions as specified in the supplementary notes for these exercises.
(a) Generate the frequency table, with the columns letter, frequency, and codeword and draw the Huffman tree for the letters in the sentence.
(b) Calculate the entropy of the letters in this sentence and the average number of bits used to encode each letter.
(c) Using integers between 1 and 10 for the frequencies, give an example of letterfrequency pairs so that the Huffman tree in Figure 1 is generated.
(d) For text containing only the letters A, B, C, D and E with the fixed-length codes 001, 011, 100, 101 and 110, respectively, draw the binary tree representation of these codes. Explain whether or not these codes are optimal. If they are inoptimal, suggest how they can be improved and draw a tree for the improved codes.
1. Consider the sentence, "A SANTA LIVED AS A DEVIL AT NASA" and use the Huffman algorithm and conventions as specified in the supplementary notes for these exercises. (a) Generate the frequency table, with the columns letter, frequency, and codeword and draw the Huffman tree for the letters in the sentence. [10 points] (b) Calculate the entropy of the letters in this sentence and the average number of bits used to encode each letter. [5 points] (c) Using integers between 1 and 10 for the frequencies, give an example of letter- frequency pairs so that the Huffman tree in Figure 1 is generated. [5 points] Figure 1: A Huffman Tree (d) For text containing only the letters A, B, C, D and E with the fixed-length codes 001, 011, 100, 101 and 110, respectively, draw the binary tree representation of these codes. Explain whether or not these codes are optimal. If they are inoptimal, suggest how they can be improved and draw a tree for the improved codes. [5 points)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
