Your limit has been exceed. We have implemented this system because, We got difficulty on managing our servers. Please donate some amount to remove this limit.
Quota: 0 / 30Donate
Huffman algorithm is a technique of compressing data to reduce its size without losing any of the details. It is generally useful to compress the data in which there are frequently occurring characters.
Using the Huffman tree, we can compress the string to a smaller size.
Procedure for construction of Huffman tree
Let us take any four characters and their frequencies:
Now sort these characters according to their frequencies in non-decreasing order.
Here before using Huffman algorithm the total number of bits required is
= 2*(6+3+2+1) = 24 bits.
The tree constructed for the above example is shown below:
Now from variable length code we get following code sequence.
Thus after using Huffman algorithm the total number of bits required is
Click here to submit your answer.