Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

9th Edition

0135188148, 978-0135188149, 9781642087611

More Books

Students also viewed these Databases questions

Question

What is the difference between Needs and GAP Analyses?

Answered: 1 week ago

Question

What are ERP suites? Are HCMSs part of ERPs?

Answered: 1 week ago