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]= [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]
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.
Similar Questions
Use Huffman method to obtain the optimum code for the following dataABCDEF0.150.40.050.20.050.15
The following Message "B C C A B B D D A E C C B B A E D D C C", is given. Use Huffman algorithm to find the total size of the message
What is the average number of bits for each letter of the word "amazing" using Huffman coding algorithm? Select one:a.18/7b.19/7c.3d.20/7e.None of thesef.17/7
huffmann codes areSelect one:a. uniquely decodableb. lossless source coding techniquec. all of themd. variable length codes
Which of the following Technique is Lossy Compression Technique ?Select one:Huffman CidingJPEGDPCMArithmetic Coding
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.