Text Compression with Huffman Coding

  Рет қаралды 124,236

Estudy

Estudy

Күн бұрын

Пікірлер: 119
@SensCodingStudio
@SensCodingStudio 7 жыл бұрын
Why i paid 50k for college is beyond me when this explanation is free and is better than how my professor explained it
@Stofzuigerr1
@Stofzuigerr1 6 жыл бұрын
Because he doesn't hand out your certificate unfortunately.
@zerocode1504
@zerocode1504 6 жыл бұрын
Is this static or dynamic huffman?
@OwzaB
@OwzaB 6 жыл бұрын
Even better than my Course prescribed textbook.
@GoodNewsJim
@GoodNewsJim 3 жыл бұрын
Heads up, University is only for people who don't know how to learn since lectures came online since 2003. If you know how to learn, you can be a polymath in the time people go to uni for stuff. If you want to be a slave to student loans, by all means go to uni if you're into that kind of kink. If you're smart, just learn online.
@jamalmydeen8446
@jamalmydeen8446 2 жыл бұрын
i paid 4L indian rupeee
@suzanbobette2580
@suzanbobette2580 7 жыл бұрын
Best explanation of Huffman coding!! Thank you! Great pace and simple explanation. Great job!!!
@furkanfrost
@furkanfrost Жыл бұрын
this was the best text compression teaching video ive ever watched thanks for helping
@celestinomacie9589
@celestinomacie9589 2 жыл бұрын
I am amazed! I am a college student in Mozambique and I've been struggling to understand the Huffman Coding. Thank you for the simplicty of how you explain things
@pannerbiryani3002
@pannerbiryani3002 5 ай бұрын
This is good explanation!! you explained it so simply. we need more explanation videos of this format!!
@bluesystemjackson
@bluesystemjackson 6 жыл бұрын
Learned more in 6 minutes than in two entire lectures and two tutorial classes at university. Why do Profs and teachers make it so hard, when it can be explained so easily?
@ExZeMIP
@ExZeMIP Жыл бұрын
Better to have 2 lectures wasted on something simple, than 2 lectures fully packed with content, no?
@Farrukhw
@Farrukhw 6 жыл бұрын
Finally, I got some clear understanding of building the tree using smallest frequency values.. Thanks a bunch... Greetings from Pakistan...
@gabrielangel1996
@gabrielangel1996 6 жыл бұрын
Thats the easiest and Best explanation on the subject. Thank you very much sir
@UsmanArshad-qv5nt
@UsmanArshad-qv5nt Жыл бұрын
What a stupendous, winsome, elegant, and terse explanation!
@JamieJaftha
@JamieJaftha 7 жыл бұрын
Thank you so much!! Now I understand Huffman coding much better than before.
@ZackDiD
@ZackDiD 3 жыл бұрын
man, you are a genius. your explanation is better than some professors
@任安明
@任安明 7 жыл бұрын
finally,i understand Huffman code
@wardamtn
@wardamtn 7 жыл бұрын
You have saved my life. thank you so much. Such an easy explanation.
@ndm99999
@ndm99999 5 жыл бұрын
sir, its too easy to understand thank you so much ,love from sri lanka
@Kurasz666
@Kurasz666 4 жыл бұрын
Thanks man, cheers from IT student in Poland
@jakub6514
@jakub6514 4 жыл бұрын
Same situation here :P This guy up there, explained it to me in 6 minutes, when my professor wasn't able to do this is 6 months...
@jasinsworld3095
@jasinsworld3095 9 күн бұрын
Best video on this topic
@davidbachy5627
@davidbachy5627 Жыл бұрын
The best explanation yet!!!
@piyushukla22
@piyushukla22 7 жыл бұрын
Honestly speaking, this is the best video available on huffman coding throughout youtube Although I have a small doubt about... how to trace back to the original message from the encoded one ;) If someone could give a little brief. Thanks in advance!!
@zerocode1504
@zerocode1504 6 жыл бұрын
Is this static or dynamic huffman?
@vapula87
@vapula87 4 жыл бұрын
You have to rebuild the tree so that the values are in the exact same place. Then you use the bits to go right or left in the tree.
@GurdevSeepersaud
@GurdevSeepersaud 2 жыл бұрын
Wow that was actually pretty interesting
@cangozpinar
@cangozpinar 2 ай бұрын
Beautifully explained thank you
@mortred4144
@mortred4144 3 жыл бұрын
Thanks, you explained it better than my professor.
@Dacarns
@Dacarns 4 жыл бұрын
This is the best example I could find. Thank you!
@manikantap7865
@manikantap7865 Жыл бұрын
Good explanation sir😊
@puskk1419
@puskk1419 6 жыл бұрын
Best explanation...!! Thanks
@maazbukhsh7511
@maazbukhsh7511 7 жыл бұрын
finally, i understand what Huffman coding is
@tomq6491
@tomq6491 9 ай бұрын
Great video and well explained. Just one thing I would say about the ASCII coding, one of its 8 bits is used for parity check so perhaps it would be more fair to consider the ASCII characters as 7 bits. It would still be a great example of lossless compression though.
@yassinal-nuaimee1204
@yassinal-nuaimee1204 4 жыл бұрын
Great explanation👌🏼
@02smn
@02smn 2 жыл бұрын
Thank you! Great explanation. Subbed because of this great teaching video.
@kritikabagmar7976
@kritikabagmar7976 6 жыл бұрын
Good explanation.. Thanks
@vitragb5908
@vitragb5908 4 жыл бұрын
Finally got it Nicely explain
@vincentverdugo
@vincentverdugo 4 жыл бұрын
The best explanation
@lukem6030
@lukem6030 4 жыл бұрын
This video helped a lot thank you so much :) .
@RamKumar-ox3bs
@RamKumar-ox3bs 5 жыл бұрын
Easy to digest 😁😁 Thanks
@confessions92
@confessions92 6 жыл бұрын
Best explanation I found on youtube!! :D
@chrysleague
@chrysleague 4 жыл бұрын
This demonstration was really great! My only complaint is I think it's unfair to compare the 46 bits with Huffman tree to 136 with ASCII at 8 bits per character. Those 8 bits are supporting up to 256 distinct characters, while the Huffman tree only accommodates 8 characters. So if we only need to encode the characters used in the message (ISPRMVE_), we could do that with just 3 bits per character. Then this fixed-size encoding would be 17×3=51 bits. So the Huffman tree still yields a savings, but it's more like 47/51 ~= 92% of the length of the original. [Full disclosure: I also have an explainer video about Huffman coding, and teach it pretty regularly.]
@TashingaPemhiwa
@TashingaPemhiwa 3 жыл бұрын
But you'd still need to send a mapping (full ASCII code to Huffman code), along with the encoded data, resulting in the transmitted data being longer than the original data (for this particular example)
@McMxxCiV
@McMxxCiV Жыл бұрын
Doesn't the dictionary also need to be saved, with the letters in their original 8 bit form for a total of 64 and the codes adding up to 26, making compressed text + dictionary add up to 136 again?
@YTM4niac
@YTM4niac 7 жыл бұрын
Actually.. you explained it the best! Thanks :)
@ahmadrezabolghad9811
@ahmadrezabolghad9811 3 жыл бұрын
Thank you so much, this technique is very easy
@dionrl435
@dionrl435 Жыл бұрын
2:29 how come u didn’t join pr4 and the one to the right of it?
@bloopyikes7177
@bloopyikes7177 4 жыл бұрын
how would the receiving computer or whatever know how to translate the message though? would the binary values for all of the characters be sent too?
@rustycherkas8229
@rustycherkas8229 3 жыл бұрын
Kudos to the presentation, but... for a newbie like me there are some questions remain. The original string (used for demonstration only, I understand) is only 17 characters long, and chosen to show some recurring characters. The 'dictionary' for this message would contain 8 entries (1 byte each), and the 'paths' for each entry would fit into 8 bits (1 byte), so nothing is gained in this example... A much larger block of English text would benefit from the compression, obviously, but I wonder if protection is needed for long long branches on making Huffman trees?
@technoplus9877
@technoplus9877 5 жыл бұрын
You !!!! please(100X) i love you ....What amazing explanation.... THNKS
@shattikbandyopadhyaa1787
@shattikbandyopadhyaa1787 3 жыл бұрын
thank you! from Bangladesh
@dochollywood
@dochollywood 7 жыл бұрын
Clear and concise. Thanks!
@susybucket-le6vy
@susybucket-le6vy 8 ай бұрын
great video
@jamoliddinz
@jamoliddinz 4 жыл бұрын
thank you, that was really easy to understand.
@ndm99999
@ndm99999 5 жыл бұрын
please i need help , if there are a simple letter ,imagine it is 'm' what is value? is it equal to capital 'M' value ? or do we want to find it ?
@DavidaThatch
@DavidaThatch Жыл бұрын
So so good; thank you!
@lajoskicsi6910
@lajoskicsi6910 3 жыл бұрын
Does the mapping table also take place? The 46 bits probably do not contain it, right? How the receiver decodes it?
@Saul-ju4zd
@Saul-ju4zd 3 жыл бұрын
Great explanation, thanks.
@bono95zg
@bono95zg 6 жыл бұрын
And how do you reconstruct it? You have to save the table also but then for this example you didnt save space...
@carelceri4428
@carelceri4428 3 жыл бұрын
Very clear. Thank you sir
@mixupthings
@mixupthings 4 жыл бұрын
superb
@rootMySql
@rootMySql 6 жыл бұрын
I need it! Thanks for this video:)
@latedeveloper7836
@latedeveloper7836 3 жыл бұрын
5:17 Compression Ratio
@diegosanchez6704
@diegosanchez6704 10 ай бұрын
Thank you!
@uchaopham9147
@uchaopham9147 2 жыл бұрын
Did the huffman code provide the best solution? I mean in this example, can we use shorter unused bit for M, V..., like 10, 01 or 11, the total bits must be lower. Thank you for your explanation
@chromzepher
@chromzepher 2 жыл бұрын
Doing that would result in situations where you could end up with ambiguous combinations. Take representing M as 10 like your example. If I receive a string of bits 10100100 it's impossible for the receiver to tell is that's mmsi (10 10 01 00) or mpp (10 100 100) as all the computer has is the limited dictionary we gave it and the string of bits. Using the full dictionary provided and assuming M was given a value of 10 instead of 1100. When we try to write out Mississippi we get 100001010001010010010000. When the receiver gets this text we can assume it organizes letter by checking the string number by number until it hits an invalid combination then it steps back one and puts a break there. As it runs through this string it will see 1 then 0 and think I know this is an M but if the next number is 0 it is also a P so it checks, finds a 0, then checks the next, finds another 0 but knows there's nothing for 1000 but there is something for 100 so it thinks the first letter is 100 and moves on. If we run it through without any context the computer will try to break it up as pirissippi (100 00 101 00 01 01 00 100 100 00)
@rumishruu7394
@rumishruu7394 5 жыл бұрын
Thank you very u saved my life
@kodagabriel
@kodagabriel 6 жыл бұрын
THE BEST!!
@tzr6k
@tzr6k 6 ай бұрын
thank you!
@giacomobiancalana6949
@giacomobiancalana6949 7 жыл бұрын
I'm not so sure, but for this example, without the Huffman coding, you can represent the letters with only 3 bit (8 characters = 2^3), not 8. 3 is the number of bits with which you have to calculate the percentage. So 3 bits x 17 total characters = 51 . (46/51)*100= 90.2, so the saving is only about 10%. You can't say that you need 8 bit to trasmit/represent each character without the Huffman coding, because in this case you have to use them also with it, which is useless.
@luanbaviloni6714
@luanbaviloni6714 7 жыл бұрын
But Huffman Coding is used mostly for text compression, so if you consider that any character of ASCII table can be used in the uncompressed text, the length of 8 bits has to be considered.
@grmvishnu7893
@grmvishnu7893 3 жыл бұрын
Can you share the code for this ? @Estudy
@12bucukfalandim
@12bucukfalandim 6 жыл бұрын
adamsın corç :d
@somebrotherfromgermany
@somebrotherfromgermany 5 жыл бұрын
asdfadsfgasgs
@klaragiceva8775
@klaragiceva8775 5 жыл бұрын
best explanation !!!!!!!!
@jarrydpatel9650
@jarrydpatel9650 5 жыл бұрын
Great Video, Thank you..
@helloyou191
@helloyou191 5 жыл бұрын
what software do you use for the dashboard ?
@ade-joshe
@ade-joshe 6 жыл бұрын
Nice and precise
@raymondfosu7821
@raymondfosu7821 3 жыл бұрын
"I love you telecommunication and network" Can someone solve this using Huffman's tree and Huffman's code
@ethanbai5712
@ethanbai5712 6 жыл бұрын
Great explanation. Thanks! One question: when building the tree, why did you choose to add PR4 and MVE_ instead of PR4 and S4? MVE_ and S4 have the same values of 4.
@harrymon0
@harrymon0 4 жыл бұрын
He's sticking with prioritizing the rightmost available sums when all else is equal. Try doing it the alternate way you've just outlined. Do you notice the potential to lose efficiency?
@mostafaaly9331
@mostafaaly9331 7 жыл бұрын
good one .....keep it up thank u :)
@amirezasobhdel7013
@amirezasobhdel7013 5 жыл бұрын
can you explain how the receiver device understands the encoded message?
@leosmi1
@leosmi1 4 жыл бұрын
I have the same doubt
@amit_go
@amit_go 2 ай бұрын
gem
@hyy3434
@hyy3434 4 жыл бұрын
Thanks for great explanation!
@tsepontimane4678
@tsepontimane4678 7 жыл бұрын
got it, thank you.
@gauravburad7404
@gauravburad7404 4 жыл бұрын
Thanks
@TheCCBoi
@TheCCBoi 7 жыл бұрын
Great video, if I could give you two thumbs up I would. Thank you!
@sabsab7504
@sabsab7504 7 жыл бұрын
if we have frequency 12,12,4,4 how result please help me
@bono95zg
@bono95zg 6 жыл бұрын
Combine 4 4, now ypu have 12,12,8. Then combine 12 and 8, now you have 12 20. An thn combine them and have 32
@vaelkokach2941
@vaelkokach2941 3 жыл бұрын
i think the calculation is wrong, lowest frequency should have the highest priority not the opposite
@22puru22
@22puru22 7 жыл бұрын
Best!!
@surajrock299
@surajrock299 4 жыл бұрын
Finally understand
@amansyanbusiness
@amansyanbusiness Жыл бұрын
You did a mistake it’s actually 43 bits
@getmymail4507
@getmymail4507 4 жыл бұрын
best knowladge received
@poonjaga4191
@poonjaga4191 4 жыл бұрын
So easly to understand
@Symmetryful
@Symmetryful 7 жыл бұрын
Sorry this might be unrelated but why does ASCII representation use 8 bits? As far as I can see, if you need to represent {a,...,z,A,...,Z} in binary code, surely you just need to minimise n subject to 2^n >= 52 (which yields n = 6). Then you can represent each letter uniquely, 6 bits each. Why use 8 bits?
@Drakkenstien
@Drakkenstien 7 жыл бұрын
6 bits doesn't actually give us enough room to work with, because there's a large variation of characters that can't be handled by a mere 6 bytes, including numerals, mathematical symbols, newlines, spaces, tabs, null, end of file characters, and so on. In fact, 8 bytes generally isn't enough either to include all the characters we need either, which is why Unicode was developed. As to why 8 bits per byte, it's mostly because it's the first power of two that can store a sufficient number of data to be flexible, while being small enough to be able to work around.
@nasrothepunisher5744
@nasrothepunisher5744 Жыл бұрын
It's 16caractère not 17..you cant count the espace
@linconnuoppoa5s
@linconnuoppoa5s Жыл бұрын
Why WE compress our language using our language when it IS to thé machine to compress it in its language . Why using A B C. .. when its simple tobuse 0 and 1
@patrickschnurbusch8319
@patrickschnurbusch8319 6 жыл бұрын
i think you did it wrong, looking at my class notes 0 should be on the right and 1 on the left
@vapula87
@vapula87 4 жыл бұрын
The number of edges is what is important, not whether you use 0 or 1 in a certain direction. It's the same number of bits.
@mp3311
@mp3311 5 жыл бұрын
Sir, but this is wrong. 8 should switch with 9. The smaller number goes in the left child and the bigger in the right...
@vapula87
@vapula87 4 жыл бұрын
It doesn't matter. The Huffman binary tree is correct if each parent's key is equal to the sum of its childrens' keys and all nodes with elements are leaf nodes.
@ganeshmantri191
@ganeshmantri191 7 жыл бұрын
R2 IS SUBSET OF V1
@giacomobiancalana6949
@giacomobiancalana6949 7 жыл бұрын
It is. In fact, for this coding, the only thing is don't be a prefix. Being a subset is ok.
@giacomobiancalana6949
@giacomobiancalana6949 7 жыл бұрын
Sorry for my English... I think that the actual sentence has to finish this way : "...is not to be a prefix".
@sadiahabib5506
@sadiahabib5506 7 жыл бұрын
I wonder who disliked
@brookburnham8331
@brookburnham8331 5 жыл бұрын
grade 9 people watch this
@ozairm036
@ozairm036 3 жыл бұрын
Wrong calculation
@sonofzerihune5901
@sonofzerihune5901 3 жыл бұрын
not visible at all, bad screen
Compressing text using Huffman trees worked example
15:48
Mr Dimmick's Computing Channel
Рет қаралды 47 М.
3.4 Huffman Coding - Greedy Method
17:44
Abdul Bari
Рет қаралды 1,7 МЛН
How to treat Acne💉
00:31
ISSEI / いっせい
Рет қаралды 108 МЛН
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 30 МЛН
Elegant Compression in Text (The LZ 77 Method) - Computerphile
8:43
Computerphile
Рет қаралды 495 М.
Python laid waste to my C++!
17:18
Sheafification of G
Рет қаралды 181 М.
How Computers Compress Text: Huffman Coding and Huffman Trees
6:30
Tom Scott
Рет қаралды 1,9 МЛН
Can You Beat Minecraft From One Grass Block?
35:27
Beppo
Рет қаралды 5 МЛН
Huffman Codes: An Information Theory Perspective
29:11
Reducible
Рет қаралды 240 М.
Use Arc Instead of Vec
15:21
Logan Smith
Рет қаралды 157 М.
Winning Google Kickstart Round A 2020 + Facecam
17:10
William Lin (tmwilliamlin168)
Рет қаралды 10 МЛН
How Huffman Trees Work - Computerphile
11:07
Computerphile
Рет қаралды 254 М.
How to treat Acne💉
00:31
ISSEI / いっせい
Рет қаралды 108 МЛН