Knowee
Questions
Features
Study Tools

Apply Huffman - Coding procedure for M-2.And find the coding efficiency.Given: [X]= [xl x2 x3 x4 x5 x6 x7 x8][P}-[0.1,0.25,0.15,0.05,0.15,0.1,0.05,0.15]

Question

Apply Huffman - Coding procedure for M-2.And find the coding efficiency.Given: [X]= [xl x2 x3 x4 x5 x6 x7 x8][P}-[0.1,0.25,0.15,0.05,0.15,0.1,0.05,0.15]

🧐 Not the exact question you are looking for?Go ask a question

Solution

To apply the Huffman coding procedure for M-2, we need to follow these steps:

Step 1: Arrange the symbols in decreasing order of their probabilities. Given: [X] = [x1 x2 x3 x4 x5 x6 x7 x8] [P] = [0.1, 0.25, 0.15, 0.05, 0.15, 0.1, 0.05, 0.15]

Arranging the symbols in decreasing order of their probabilities: [x2 x3 x5 x8 x6 x1 x4 x7] [0.25, 0.15, 0.15, 0.15, 0.1, 0.1, 0.05, 0.05]

Step 2: Combine the two symbols with the lowest probabilities and create a new symbol with the sum of their probabilities. [x2 x3 x5 x8 x6 x1 x4 x7] [0.25, 0.15, 0.15, 0.15, 0.1, 0.1, 0.05, 0.05]

Combine x7 and x4: [x2 x3 x5 x8 x6 x1 (x4x7)] [0.25, 0.15, 0.15, 0.15, 0.1, 0.1, 0.1]

Combine x6 and (x4x7): [x2 x3 x5 x8 (x6x4x7) x1] [0.25, 0.15, 0.15, 0.15, 0.2, 0.1]

Combine x1 and x5: [x2 x3 (x1x5) x8 (x6x4x7)] [0.25, 0.15, 0.25, 0.15, 0.2]

Combine x3 and (x1x5): [x2 (x3x1x5) x8 (x6x4x7)] [0.25, 0.4, 0.15, 0.2]

Combine x8 and (x6x4x7): [x2 (x3x1x5) (x8x6x4x7)] [0.25, 0.4, 0.35]

Combine (x3x1x5) and (x8x6x4x7): [(x2x3x1x5) (x8x6x4x7)] [0.65, 0.35]

Step 3: Repeat steps 2 until only two symbols remain.

Step 4: Assign 0 and 1 to the branches of the binary tree, with 0 representing the left branch and 1 representing the right branch.

Step 5: Assign the binary code to each symbol by traversing the binary tree from the root to the symbol.

The coding efficiency can be calculated by multiplying the probability of each symbol by the length of its corresponding binary code and summing them up.

This problem has been solved

Similar Questions

Use Huffman method to obtain the optimum code for the following dataABCDEF0.150.40.050.20.050.15

Youwrite an optimal huffman code for a:1 b:1 c:2 d:3 e:5 f:8 g:13 h:21

Discuss Huffman Algorithm in detail with suitable example.

A text is made up of the characters a, b, c, d, e each occurring with the probability 0.11, 0.40, 0.16, 0.09 and 0.24, respectively. The optimal Huffman coding technique will have the average length of:a.2.15b.2.26c.2.40d.2.16

Suppose the letters a, b, c, d, e, f have probabilities 1/2, 1/4, 1/8, 1/16, 1/32, 1/32 respectively. Which of the following is the Huffman code for the letter a, b, c, d, e, f?Group of answer choices110, 100, 010, 000, 001, 11111, 10, 011, 010, 001, 00011, 10, 01, 001, 0001, 00000, 10, 110, 1110, 11110, 111

1/2

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.