Question: Question 3 Design the adaptive Huffman coding with initial code assignment for the string AAD- CCDDDDB as follows New A B D 0 001 010


Question 3 Design the adaptive Huffman coding with initial code assignment for the string AAD- CCDDDDB as follows New A B D 0 001 010 011 100 If any character is to be sent the first time, it must be preceded by a special symbol, NEW. The initial code for NEW is 0. The count for NEW is always kept as 0 (the count is never increased); 1. What is the entropy n of the string? 2. Draw the adaptive Huffman trees which are built after sending each character. 3. Write down the codes sent to the decoder after each step. 4. Are the following procedures for adaptive Huffman coding correct or wrong? Correct the algorithm if needed. ENCODER DECODER Initial code while not EOF { get(C) encode(c) Initial code while not EOF { update_tree decode(c) update_tree output(c) } } 5. Apply the LZW compression on the string with the initial dictionary showing in table below: code String 1 A 2 B 3 4 D What is the output code and what is the compression ratio? Assume cach character or code is transmitted as a byte
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
