assignment4 - 1 Using the first Huffman code given A= 01 B...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
1. Using the first Huffman code given A= 01, B = 0000, C = 0001, D = 001, E = 1, decode the following bit strings. a. 000001001 b. 001101001 c. 000101001 Ans. 1) 000001001 i. The pointer follows the path labeled 0000 from the root of this tree to the letter B and is then reset to the root ii. The next bit, 01, leads immediately to the letter A iii. Finally, the path 001 leads to the letter D. 0000 01 001 B A D 2) 001101001 i. The pointer follows the path labeled 001 from the root of this tree to the letter D and is then reset to the root ii. The next bit, 1, leads immediately to the letter E iii. the pointer P next follows the path 01 to the letter A iv. Finally, the path 001 leads to the letter D. 001 1 01 001 D E A D 3) 000101001 i. The pointer follows the path labeled 0001 from the root of this tree to the letter C and is then reset to the root ii. The next bit, 01, leads immediately to the letter A iii. Finally, the path 001 leads to the letter D. 0001
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/21/2011 for the course CS 101 taught by Professor Martand during the Spring '10 term at Punjab Engineering College.

Page1 / 3

assignment4 - 1 Using the first Huffman code given A= 01 B...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online