Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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. [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 made optimal and draw a tree for the optimal codes. [5 points] 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 made optimal and draw a tree for the optimal codes. [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