Question: 9. a) Find the Huffiman code for the following symbols with the given frequencies. a-6, b- 2, d-1, m-5, s-10. Show the code tree. Show
9. a) Find the Huffiman code for the following symbols with the given frequencies. a-6, b- 2, d-1, m-5, s-10. Show the code tree. Show the symbols and their codes b) Encode the word madsbad into binary code using your Huffman code. Find the total number of bits in the Huffiman binary code of madsbad c) Decode the binary code 01110001011 if the Huffiman code is a-1, b-0101, c-011, m-00 p-0100. Reconstruct the code tree. Show the decoded text. 10. Consider the text file below. Determine all characters in the file and their frequencies Find the Huffiman code of each character. Find the total number of bits in the Huffman binary code of the file. Find the total number of bits in the file if the usual ASCII code is used where each character is encoded using 8 bits. Find the compression ra compression ratio is (total bits in Huffman coding)/(total bits in ASCII coding) tio. The California, the land of sunshine and roses with its genial climate, its skies as blue as the famed skies of Venice, and its pure life giving air, invites the lover of nature to take long tramps over hill and dale, mountain and valley, and to search out new trails in the rugged mountains. There is a quiet beauty in the broad sweep of the valley, a stately majesty in the towering mountains, and an element of strength in the broad sweep of the ocean
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
