Introduction to Huffman Coding
Vložit
- čas přidán 13. 04. 2014
- This video walks through the basic concepts of Huffman Coding. Huffman coding is a great algorithm for data compression and works by limiting the number of bits that are required by a character, this type of algorithm is very useful in such fields as bio-infomatics, that have a small number of letters but a large amount of data that needs to be compressed.
- Věda a technologie
3:20
Found this comment too late :/
Gods plan
wow thank you lol. glad I saw this
Is it necessary to start plotting the frequencies from bottom? I.e. from E and D rather then A and B ???
sir please tell me how can we calculate average number of bits to encode those symbols?
thanks bro for this tutorial it came in my exam for 10 marks exactly same question ........
Very clear. Thank you.
won't the binary tree will take some space? how and what values will that be?
This explains how to encode, but how do you decode?
Since no letter codes are prefixes of other letters, once you see a code that corresponds to a letter you can immediately turn that into a letter.
It's a good example but the final resualt it's shoud be 100 with the Huffman Code? thanks for the video
What are you talking about
it looks this is not following the binary tree property. Ideally the largest values should be in right child nodes. Can you please share if Huffman coding will not follow the binary tree property?
@4:46 wrong! you should not say, just plus 22 + 16. because you should say, compare among 24, 22,16, the 22 ,16 are smallest, thats how you pcik 22 ,16 first.
I think he is correct and you are "wrong!". You don't compare three values in Huffman coding, you compare the next two in the priority queue which in this case were 16 and 22. This means 24 wasn't even in play yet. Then after combining 16 and 22, the only two left in the queue were 24 and 38 which were then combined.
it is wrong Huffman code follow binary tree characteristics .left sub tree is less and right is greater.
Huffman Code DOES NOT follow a binary tree. Never use a Binary Tree for a Huffman Code.
If you did that, you'd end up with all characters being encoded with the same length (or 1 bit less).
24 can be tied also with 22 why u tied wit with 38..
Because 22 was tied with 16. 16 is smaller than 24, so you don't tie 22 with 24. And once 22 was tied, no more ties for 22. 38 and 24 was the only choice left!
I expected you to be indian XD
Thats maths bro