3.4 Huffman Coding - Greedy Method

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 มิ.ย. 2024
  • How to Compress a Message using
    Fixed sized codes
    Variable sized codes (Huffman Coding)
    how to decode
    PATREON : www.patreon.com/bePatron?u=20...
    Courses on Udemy
    ================
    Java Programming
    www.udemy.com/course/java-se-...
    Data Structures using C and C++
    www.udemy.com/course/datastru...
    C++ Programming
    www.udemy.com/course/cpp-deep...

ความคิดเห็น • 980

  • @carloss.3928
    @carloss.3928 4 ปีที่แล้ว +529

    My professor spent 1 1/2 hr to explain this. This man did it in 17 minutes. Thanks Professor Bari!

    • @giannisbraounis5861
      @giannisbraounis5861 3 ปีที่แล้ว +1

      Mine spent 2 hr ....

    • @not_intrested
      @not_intrested 3 ปีที่แล้ว

      Same

    • @Abhinav-eu5le
      @Abhinav-eu5le 3 ปีที่แล้ว +34

      time compression technique

    • @TashingaPemhiwa
      @TashingaPemhiwa 2 ปีที่แล้ว +12

      ...and I learnt it in 12, thanks to TH-cam 1.5X :D

    • @mathematics6199
      @mathematics6199 ปีที่แล้ว +8

      did your professor prove why this is better? if yes, then spending 1.5 hours is worthful,

  • @michaelbonnet590
    @michaelbonnet590 4 ปีที่แล้ว +2121

    Singh's Law: whatever you are trying to learn, a South Asian man somewhere on the internet explains it perfectly.

    • @snehashishsrivastava9018
      @snehashishsrivastava9018 4 ปีที่แล้ว +212

      Indian the term you are looking for is Indian

    • @michaelbonnet590
      @michaelbonnet590 4 ปีที่แล้ว +118

      @@snehashishsrivastava9018 sometimes they're Bangladeshi or Pakistani or otherwise

    • @thiccaxe
      @thiccaxe 4 ปีที่แล้ว +19

      *curry Singh’s law

    • @hemantsood9579
      @hemantsood9579 4 ปีที่แล้ว +44

      we indians always good with explaining

    • @abubakar205
      @abubakar205 4 ปีที่แล้ว +44

      @@snehashishsrivastava9018 I am Pakistani and agree with this statement

  • @aliz5972
    @aliz5972 3 ปีที่แล้ว +764

    I'm proud to say that i'm his regular student not only on TH-cam, on Udemy as well.

    • @rahularya7891
      @rahularya7891 3 ปีที่แล้ว +10

      data structure also available there?

    • @aliz5972
      @aliz5972 3 ปีที่แล้ว +4

      @@rahularya7891 g bhai

    • @wotizit
      @wotizit 3 ปีที่แล้ว +1

      @@aliz5972 teek

    • @anujakulkarni8988
      @anujakulkarni8988 3 ปีที่แล้ว

      @@aliz5972 How's the data structure course?

    • @aliz5972
      @aliz5972 3 ปีที่แล้ว +11

      @@anujakulkarni8988I can't ask for anything more than that. Content is Complete and precise and the teacher got some skills man. He is genius.

  • @sakshisrivastava7033
    @sakshisrivastava7033 ปีที่แล้ว +174

    If teaching is a work of art, then you are a master piece sir. Huge respect!!

  • @user-yv8ko3wy6t
    @user-yv8ko3wy6t 4 ปีที่แล้ว +676

    Sir, please teach my professors how to teach.

  • @purplegalaxy5265
    @purplegalaxy5265 3 ปีที่แล้ว +18

    I passed my DAA thanks to you Sir! Allaah azza wa jal aapko khoob kamyabi ata farmaye! Ameen!

  • @PoojaVerma-vz5bn
    @PoojaVerma-vz5bn 4 ปีที่แล้ว +145

    He is the best person who explain each nd evry doubt without asking. Thank u sir 😊

  • @hollyj8650
    @hollyj8650 2 ปีที่แล้ว +13

    After I watched this, I did my discussion on my class related to this topic, many classmates thanked me for a clear explanation. Thank you sir. You helped me and classmates too.

  • @poojabennabhaktula4883
    @poojabennabhaktula4883 5 ปีที่แล้ว +130

    Teaching is an art and you are the master of it🙏 thankyou sir you made my DAA concepts clear.

  • @manojvarmagottumukkala701
    @manojvarmagottumukkala701 5 ปีที่แล้ว +44

    Never thought learning algorithms would be fun .Thanks ,sir for demystifying algorithms

  • @AnayShrikar
    @AnayShrikar 6 ปีที่แล้ว +20

    I am glad to see a video actually dwelling into the concepts used behind any algorithm implementation. It's hard to find such videos on TH-cam. Great work Sir :)

  • @tppt3987
    @tppt3987 4 ปีที่แล้ว +150

    Huffman Coding starts @ 8:46 .

  • @steveo5946
    @steveo5946 2 ปีที่แล้ว +5

    My plans for studying for my Algorithm Analysis class from now on...
    Step 1 - Read the syllabus to find the topics my professor will talk about in the upcoming lecture.
    Step 2 - Watch Mr. Bari's videos on topics from step 1.
    Step 3 - Read book for some more info on topics from step 1.
    Step 4 - Attend my lecture, and desperately try to stay conscious.
    Thanks for another great video. +1 cookie for you!

  • @SaurabhSingh-kz5jv
    @SaurabhSingh-kz5jv 6 ปีที่แล้ว +5

    I am following your videos since months, they're really classic.
    Thanks a lot for making such classic videos.

  • @nicolausoares5447
    @nicolausoares5447 3 ปีที่แล้ว +2

    I'm a Brazilian student of computing systems and I learn a lot more with you than with any other teatcher in here

  • @badarikrishna3169
    @badarikrishna3169 4 ปีที่แล้ว +43

    I've been binge watching his videos, it's so addictive 😂
    I keep on reminding myself about the stature he carries, the command he brings, that professor element is something special which will keep you attentive..!! 🙌

    • @paragggoyal1552
      @paragggoyal1552 ปีที่แล้ว

      dude! same. It's like watching a movie.

  • @logicboard7746
    @logicboard7746 3 ปีที่แล้ว +16

    I can’t believe you are such a good teacher, Sir. You remind me of my digital electronics teacher in my undergrad school

  • @yagzyalcntas553
    @yagzyalcntas553 5 ปีที่แล้ว +6

    i took multimedia class and learned this from your video 1 day before exam got 85 then i didnt study for final and didnt do project and got D, then i took the course again and relearned this from your video got B from course. now i am preparing for master degree interview and reviewing again from same video of yours :D thanks for helping me out all these years :)

  • @sandeshparajuli5346
    @sandeshparajuli5346 2 ปีที่แล้ว +1

    Best Lecture On TH-cam For Huffman Coding.

  • @matthewg4882
    @matthewg4882 2 ปีที่แล้ว +3

    I love you man, i come from my lecture confused and in 1 video I completely understand everything. You have a gift, thank you for sharing it with the world!

  • @harinarayanjha5763
    @harinarayanjha5763 5 ปีที่แล้ว +5

    After watching few videos on Huffman Coding, I can definitely say that this is the BEST video for the topic.... GREAT DEMONSTRATION...!!!!! (y)

  • @shrayasichakraborty2375
    @shrayasichakraborty2375 4 ปีที่แล้ว +6

    I never fast forward your videos,everything you say Sir,is valuable.

  • @eugeniaancilla351
    @eugeniaancilla351 ปีที่แล้ว

    Your explanation of Huffman coding really helps me understand the topic better. I really like your approach to explaining the topic, where you used a simple example for the coding and decoding steps. Your explanation makes this complicated topic look so simple, thank you for the clear explanation!

  • @esther.vemberly
    @esther.vemberly ปีที่แล้ว

    Thank you for the explanation about Huffman coding! The pace and the way you explain it are so clear and help me to understand the topic better. I've been watching your youtube videos to understand Computer Science better and it's never failed to amaze me how you explain difficult concepts in simple examples!

  • @bunwat223
    @bunwat223 4 ปีที่แล้ว +8

    I'm a self-taught programmer , your videos help me alot . Thank you Sir 😊😊😊

  • @sachin7760
    @sachin7760 5 ปีที่แล้ว +3

    Mind blowing style and teaching. So soothing and calming

  • @seanwijaya2404
    @seanwijaya2404 ปีที่แล้ว +2

    The way you explain huffman coding makes it very easy to learn and understand. With the help of the simple examples and exercise it also helps me understand the concept better. After watching this video, I instantly understand about huffman coding and how to decode and compress a message.

  • @shawnyasha7715
    @shawnyasha7715 ปีที่แล้ว +1

    I really Like how you explain Huffman coding very simply and make it for me really easy to understand in one go without having to repeat the video to understand. my favorite part is when you explain how to determine the bit using a tree, and with that, I immediately understand how to compress a message using Huffman coding and also how to decode the message

  • @sumitbangarwa1615
    @sumitbangarwa1615 5 ปีที่แล้ว +17

    Thank you Sir, the way you explain is marvelous, i saw so many video's but still my concept was not clear but after watching your video i know better.. thanks a lot.. 🙏🏼

  • @timothyliundi1893
    @timothyliundi1893 ปีที่แล้ว +12

    Wow I have no idea that Huffman coding is actually quite easy. You explained it so well that I've never seen such a great lecture. Now I'm interested to decode a message as well as making a decoder tree/table just for fun and play with. What a lecture and keep up the good work!

  • @chacho1155
    @chacho1155 3 ปีที่แล้ว

    Best explanation I've found thus far. Thorough, concise and well articulated. Thank you, Abdul Bari! I got a midterm soon!

  • @blekekok
    @blekekok ปีที่แล้ว +2

    Now I understand how Huffman Coding works. Your explanation was very clear and simple, with great examples. Thanks

  • @sethhannah7191
    @sethhannah7191 5 ปีที่แล้ว +5

    Amazing sir! You've done a spectacular job explaining Huffman to me, I appreciate it!

  • @aakashvishwakarma2243
    @aakashvishwakarma2243 5 ปีที่แล้ว +5

    Sir me college me ek lecture nhi attend karta hun....teachers ko kudh nhi pata hota....unlog kya pada rahe han.....aap jaise logo ka video dekh dekh ke hi sikh raha hun....sir aap aise hi video banate rahiye

  • @shivranjankumar592
    @shivranjankumar592 5 ปีที่แล้ว +1

    Wonderful Explanation !!! Keep it up, Sir !! This Planet needs You.

  • @srivatsavg3729
    @srivatsavg3729 3 ปีที่แล้ว

    This is the best video on Huffman coding. I've been watching all your lectures. You are brilliant and your lectures are just beautiful to watch. Even though, I don't think we can thank you enough, thanks a lot for dedicating your time to help us.

  • @matSpiritLife
    @matSpiritLife 5 ปีที่แล้ว +264

    who has disliked this video? Please dont give dislikes to the videos of Abdul Sir.

    • @datascientist1171
      @datascientist1171 5 ปีที่แล้ว +11

      some assholes bro!

    • @rallokkcaz
      @rallokkcaz 5 ปีที่แล้ว +23

      Some people (mostly western folk) don't like heavy accents and differences in grammar when trying to learn complex topics. I've come across a lot of nearly unwatchable videos on TH-cam before but it's never (well it can be) the accent that makes it bad, it's the horrible, inaudible or distorted audio. This video is recorded well and the audio, although clipping a bit, is still intelligible.
      No dislike from me.

    • @dreamscapeai7
      @dreamscapeai7 5 ปีที่แล้ว +33

      Free and good content should not be given dislikes,
      Many assholes will not understand one line and rage dislike the video,
      really selfish according to me

    • @AamirKhan-zy5yt
      @AamirKhan-zy5yt 5 ปีที่แล้ว +5

      these are the fastest brain alive.

    • @TheGerakas
      @TheGerakas 4 ปีที่แล้ว +1

      Really stupid people that found these lectures difficult to follow.

  • @not_intrested
    @not_intrested 3 ปีที่แล้ว +41

    What?
    It was that easy 😶
    Our teacher explained it in 2 lectures and I slept through both of them as I was finding it difficult as heck!

    • @pritomtanvir
      @pritomtanvir 2 ปีที่แล้ว +1

      I know right!!

    • @theexplorer9012
      @theexplorer9012 4 หลายเดือนก่อน +1

      😂🎉

    • @rajime1645
      @rajime1645 หลายเดือนก่อน

      While teaching in class u will sleep due to lazy but if we want to clear in exam or forjob u will learn.

  • @PetBuddies
    @PetBuddies 2 ปีที่แล้ว +1

    17 minutes worth one full set of question. Thanks a bunch, Sir!!! Really appreciate your effort for making the world a better place for learners like us

  • @gilbertaurelio5534
    @gilbertaurelio5534 ปีที่แล้ว +1

    I'm so thankful for your simple and clear explanation to Huffman Coding with great examples that helps me to further understand. Thank you!

  • @nishtha27
    @nishtha27 6 ปีที่แล้ว +4

    Thank you very much sir, ths was the best huffman coding explanation i've ever seen.

  • @harryboparai4976
    @harryboparai4976 6 ปีที่แล้ว +5

    YOU are really a great teacher! Honestly i miss great Indian teachers like you up here in Canada!

  • @pedrojoao5786
    @pedrojoao5786 7 วันที่ผ่านมา

    Unbelievable explanation! Sr. deserves to be called a greater Teacher!

  • @quratulain1919
    @quratulain1919 2 ปีที่แล้ว +2

    I always feel like seeing you Sir, that he saved me. LOTS OF *RESPECT*

  • @saadebad4123
    @saadebad4123 5 ปีที่แล้ว +164

    ye to abdul bari hai ye to acha bacha hai .... thanks sir

  • @benajagilman50
    @benajagilman50 6 ปีที่แล้ว +6

    Best explanation on TH-cam. Thx.

  • @YaNykyta
    @YaNykyta ปีที่แล้ว

    Absolutely teaching power ! So simple, so understandible... so clear, so perfect! Congrats and thanks professor!

  • @parthphalke4444
    @parthphalke4444 ปีที่แล้ว

    I couldn't understand this concept that my professor had been teaching for over a week. I understood it thoroughly in 17 minutes. Thank You

  • @manirajs4658
    @manirajs4658 5 ปีที่แล้ว +8

    Hello Sir, I'm Maniraj. Your Teaching was Excellent.

  • @gousemohiddinmohhammed354
    @gousemohiddinmohhammed354 ปีที่แล้ว +4

    sir you are making me lazy by covering whole syllabus in a single day GREAT TEACHING

  • @katrielwidjaja2839
    @katrielwidjaja2839 ปีที่แล้ว +1

    I really like the way you explain Huffman coding in the video, the explanation is very simple and easy to understand and the examples you use in the video are really helpful, it helps me understand the topic better. Thank You!

  • @anirudhbhardwaj6834
    @anirudhbhardwaj6834 5 ปีที่แล้ว

    The way in which you explain everything is very simple to understand.
    Thank you Sir.

  • @nomanaslamkhan5000
    @nomanaslamkhan5000 3 ปีที่แล้ว +3

    Awesome explaination SIR. Really smooth and well explained.

  • @vinu525
    @vinu525 6 ปีที่แล้ว +3

    Fantastic explanation! Thank you for sharing sir.

  • @_asher
    @_asher 5 ปีที่แล้ว

    fullest explanation ive seen so far, very helpful! thanks

  • @bdacademia1261
    @bdacademia1261 5 ปีที่แล้ว +2

    Sir, you are one of the best teachers i have ever seen in my life, thank you very much sir for your video tutorial

  • @xhamadeex
    @xhamadeex 5 ปีที่แล้ว +16

    beautiful! Just beautiful! Thank you soooooooooooooooooooooooooo much!

  • @megzz9783
    @megzz9783 5 ปีที่แล้ว +3

    Best teacher ever, god bless you sir ❤

  • @vidushitandon6176
    @vidushitandon6176 22 วันที่ผ่านมา

    Thank you so much, sir. I have a test on data compression tomorrow and I had no idea about Huffman coding. I don't who else would have given a more succinct explanation and I understand this concept more clearly now. You are literally every computer science student's saviour. Thank you so much. Keep up the amazing work!! 🙏👏

  • @minhletruong2915
    @minhletruong2915 5 ปีที่แล้ว

    Thank you sir Abdul, I've read lots of documents about this algorithm but thanks to what you taught, I made sense all of it.

  • @terryn9450
    @terryn9450 5 ปีที่แล้ว +3

    Such a good teacher... this guy needs to be hire at a college

  • @AryanSharmaA
    @AryanSharmaA 6 หลายเดือนก่อน +9

    00:00 Huffman coding is a compression technique
    02:25 Message size can be reduced by using custom codes with fewer bits.
    04:34 Encoding messages using 3-bit codes
    06:44 Table and chart decoding reduces message size by 35-40%
    08:58 Huffman code generates variable size codes for characters based on their frequency.
    10:54 Variable size codes can be used for message encoding
    13:22 Huffman coding reduces message size
    15:33 Huffman coding can be decoded to get the original message in ASCII code.

  • @surajsahu5821
    @surajsahu5821 6 ปีที่แล้ว +1

    Your way of explanation is amazing...You tells everything about the topic which associate with other topics.Your starting is very effective of any topic that makes me your fan..You are an Effective Teacher.I am sharing your video with my friends.

  • @bloodedge201
    @bloodedge201 ปีที่แล้ว +1

    This guy a legend seriously. Thanks for your helpful courses! Keep up the good work Mister!

  • @aligoren
    @aligoren 6 ปีที่แล้ว +3

    Thanks a lot. You're really good teacher. I followed your channel.

  • @KnightDark1233
    @KnightDark1233 6 ปีที่แล้ว +3

    Thank you very much you are a very good teacher

  • @rahulunni4113
    @rahulunni4113 5 ปีที่แล้ว +2

    Thank you sir. You have helped me a lot. The way you explain all this is just amazing and easy to understand. Thanks again for helping out.

  • @geenstagni1060
    @geenstagni1060 2 ปีที่แล้ว

    Superb video sir! Thank you so much, your short video is not only concise but incredibly clear and explained everything I need to know for my midterm in 2 hours!

  • @maths4every1
    @maths4every1 6 ปีที่แล้ว +51

    Hi Sir,
    It was very difficult for me to get to know the difference between the algorithms and it's implementation..
    But after listening to your videos, I m master in solving those problems. Really I am grateful to you sir..
    Thank you so much for your wonderful teaching.. you teach us the very difficult concepts in a simple way..
    Really I am very thankful to you sir..
    I am struck up in heaps and heapsort concept.
    Please make a video on it sir..
    I didn't find that part. So asking sir..
    If it's already been done, please share the link sir..
    Thank you so much sir....

    • @maths4every1
      @maths4every1 6 ปีที่แล้ว +1

      Thank you sir..

    • @yagzyalcntas553
      @yagzyalcntas553 5 ปีที่แล้ว

      @@abdul_bari have you done the heap video sir?

    • @yagzyalcntas553
      @yagzyalcntas553 5 ปีที่แล้ว

      @@abdul_bari ok :(

    • @niksa28
      @niksa28 4 ปีที่แล้ว +2

      @@abdul_bari Beautiful video, sir. Are you familiar with Sloot encoding? He was able to compress a whole HD movie down to 4 kilobytes losslessly.
      He had a library of 370Mb, about 70Mb for each kind of data, movies, sound... He was obviously comparing data to data in his library, generating keys of minimal size which could regenerate the original on the remote computer from the same library.
      Only way this can be done even in theory is if he reduced big chunks of numbers to small mathematical expressions.
      For example number 302875106592253 can be shortened as 13^13. If numbers related to this one appear often, we can define it as letter a and then just express those other numbers as 2a, 3a etc.
      Multistage compression would allow for such extreme compression ratio. Exactly how he did it is not clear.

    • @ypv2408
      @ypv2408 4 ปีที่แล้ว

      @@abdul_bari video on amortized analysis plz

  • @amudaadeolubadmus6282
    @amudaadeolubadmus6282 ปีที่แล้ว +8

    The above example can be further reduced into 8.625 bytes(69 bits) from 20 bytes(160 bits)
    Input: BCCABBDDAECCBBAEDDCC
    [1.] Total number of ASCII characters = 20
    [2.] Each ASCII character take minimum of 8 bits( 8 bits = 1 byte)
    [3.] Required size = 20 * 8 = 160 bits ~ 20 bytes
    The compression algorithm,
    [Step 0] : Use a TreeSet
    [Step 1] : Create a bit_level, and all possible pattern (assume the level start by 1)
    when bit_level = 1
    It means, the bit can only take two forms( either [1 or 0]) (i.e 2^1)
    [Step 2] : Check character existence in Step [0], doesn't exist goto Step[3], else goto step[4]
    [Step 3] : Character doesn't exist, and bit_pattern hasn't been exhausted

    Key that character( perhaps using a DLL--> DoublyLinkedList) with the unused bit pattern
    B

    • @ujin981
      @ujin981 ปีที่แล้ว

      The codes you propose lack a prefix property because BC will not be distinguishable from A.

    • @amudaadeolubadmus6282
      @amudaadeolubadmus6282 ปีที่แล้ว

      Please recheck properly.

    • @ujin981
      @ujin981 ปีที่แล้ว

      @@amudaadeolubadmus6282 Please have a look at what the prefix property actually is. And maybe even thank me.

    • @amudaadeolubadmus6282
      @amudaadeolubadmus6282 ปีที่แล้ว

      @@ujin981
      Can I assume this is what you're referring to by Prefix Property?
      "(computing theory) A coding system that uses (typically variable-length) codes that are distinguished by their "prefix property", which requires that there is no code word in the system that is a prefix (initial segment) of any other code word in the system."

    • @ujin981
      @ujin981 ปีที่แล้ว

      @@amudaadeolubadmus6282 Yes. Correct. Now you can comprehend that in your example BC is the prefix of A and therefore the proposed codes are not prefix-free.

  • @mahmoudessamsharshira1475
    @mahmoudessamsharshira1475 3 ปีที่แล้ว

    Each time I repeat this video, I remember how amazing is your explanation! thank you Sir

  • @sepi4
    @sepi4 6 ปีที่แล้ว

    Your videos have helped me a lot in my algorithm courses. Thanks!

  • @SarbbottamBandyopadhyay
    @SarbbottamBandyopadhyay 5 ปีที่แล้ว +4

    If anyone is practicing along, the position of B and A in the optimal merge tree got swapped at 16:10.

    • @vivek8438
      @vivek8438 2 ปีที่แล้ว

      Yeah but still it is correct

    • @aryanpunia5604
      @aryanpunia5604 ปีที่แล้ว

      @@vivek8438 No. It is wrong.

  • @SRNR_PODCAST.
    @SRNR_PODCAST. 3 ปีที่แล้ว +5

    friend :- there is a movie name kgf, hero occupied the gold mine,by killing garuda and won lots of hearts.
    mee :- there is a youtube channel name Abdul bari, Narasimha(mee) covered all videos in his channel, And solved all problems and placed in google.
    friend :- you won my heart tooo and yaa that's a greedy method...
    meee :- KGF bgm Starts...................................................................................................

  • @SJain101
    @SJain101 4 ปีที่แล้ว +1

    The best set of lectures ever made. Sir, kindly make videos on Java as well.

  • @aubreysitepu5249
    @aubreysitepu5249 ปีที่แล้ว +2

    This video about Huffman Coding is very easy to understand! I really like the part when you show that we can also use tree other than table since it's simpler and yet very interesting. Thank you for making this video sir!

  • @xarenwo
    @xarenwo 5 ปีที่แล้ว +3

    Hi, isn't (5) and 4(D) supposed to be inverted under 9?
    5 is bigger than 4(D) but stays on the left.
    Shouldn't it be 4(D) to the left and 5 to the right of 9 ?
    9
    / \
    D(4) 5
    By doing those changes, and after calculating the values using software, i get the following codes
    d:00
    e:010
    a:011
    b:10
    c:11
    Thank you

    • @matteoturini7145
      @matteoturini7145 9 หลายเดือนก่อน

      Is the same problem I got

    • @matteoturini7145
      @matteoturini7145 9 หลายเดือนก่อน

      in 4 anni e l'avrai risorto

  • @madsamurai1296
    @madsamurai1296 23 วันที่ผ่านมา +3

    sir the technique you showed is wrong as in huffman tree the smaller node should be on the left side , here you placed 4 to the right of 5 which changed the code of the element d which is wrong

  • @calvintjoaquinn1924
    @calvintjoaquinn1924 ปีที่แล้ว +1

    Your explanation really made me understand Huffman Code. Thanks for helping me learn this.

  • @juandelahoz4577
    @juandelahoz4577 2 ปีที่แล้ว +2

    You explained this so quickly yet I understood better than in my teacher's 2 hour class

  • @arpansarkar7924
    @arpansarkar7924 5 ปีที่แล้ว +5

    sir if in the message like
    "Huffman coding is cool" this has spaces in it. Will the spaces is counted? pls reply sir

    • @arpansarkar7924
      @arpansarkar7924 5 ปีที่แล้ว +1

      @@abdul_bari thanks sir you saved my sem i am also a student of you in udemy

    • @QuanNguyen-og6pq
      @QuanNguyen-og6pq 4 ปีที่แล้ว

      @@arpansarkar7924 a space is just a character, like any other character

  • @lokeshselvam2060
    @lokeshselvam2060 6 ปีที่แล้ว +14

    8.37 huffman code

  • @alica5796
    @alica5796 ปีที่แล้ว

    Thank you for the clear explanation about Huffman Coding, Mr. Abdul Bari! It was excellent, really helps me to understand the concept better since you made the complex concept of Huffman coding become simpler. My favorite moment from this video is when you use a case to introduce and explain the greedy method in the beginning of the video, as well as when to illustrate the greedy method using the optimal pattern tree graph. This is a must-watch video as a computer science student!

  • @odinson4184
    @odinson4184 3 หลายเดือนก่อน

    Great explanation. Other videos try to explain it using a trick, but they clearly don't understand what's going on. This video clearly explains the greedy choice!

  • @mahmudsajib8648
    @mahmudsajib8648 หลายเดือนก่อน +3

    Your tree construction is wrong. The left side should be 4 and right side should be 5 while creating node 9.

  • @ShoaibRajpoot
    @ShoaibRajpoot 5 ปีที่แล้ว +3

    16:11 A replace by B ...
    how?
    before 16:11 A repeats 3 times and B repeats 5 times...

    • @FarbodNajafi
      @FarbodNajafi 5 ปีที่แล้ว +1

      That's another txt. so numbers should be changed.

    • @AamirKhan-zy5yt
      @AamirKhan-zy5yt 5 ปีที่แล้ว +1

      concentration level = 9999 😄😄

    • @ShoaibRajpoot
      @ShoaibRajpoot 5 ปีที่แล้ว

      @@AamirKhan-zy5yt bhai mera ppr tha full tnsn mn prh rha tha is ne or de di

  • @Zahurafzal
    @Zahurafzal 4 ปีที่แล้ว

    Really Really amazing Explanation of the huffman Coding. After hours of pounding over other sites this video made this algoithm extremely clear and easy to understand and implement. Thank you.

  • @nathanraditya7288
    @nathanraditya7288 ปีที่แล้ว

    I had a hard time understanding the coding table but you explained it very well, thank you!

  • @ravikiran7781
    @ravikiran7781 5 ปีที่แล้ว +3

    i have a query. if we use Fixed size codes or Variable sized codes(huffman), the number bits to be sent for each characters are reduced for sure. While sending the table information, you mentioned
    character(8bits) + its fixed or variable sized codes( lets 2 bits for example). How can we send just 2 bits ?? I think we need to send the frequencies of each character again so that tree is reconstructed at the receiving end. But again if we send frequencies, in case of the huffman example it will be = 45(message) + 40(ascii characters) + 40(frequency count) = 125. The same is the case with Fixed. Can you please clarify on this?
    if it has to work the way you mentioned, my assumption is that this whole data A(01000010) A's Huffman(001) followed by B, C, D etc and the orignal data.
    But i believe we need to have some kind of delimiters between each pair( character, huffman code) and the before the original data.

    • @RanjeetKumar-bf4xf
      @RanjeetKumar-bf4xf 5 ปีที่แล้ว

      Hey Ravi, Your doubt is very genuine now read it carefully,
      Let say you want to send a message above illustrated example in encoded form with the same frequency as told by sir, now, two things you must keep in mind
      1. The same person writes the encoding and decoding message.
      2. Your objective is to read(encode) the message not to count the occurrence of a letter.
      --Your first doubt- You want to send the frequency of the letters with character+fixed or variable size code.
      ----------------You are sending the original table with encoded table with encoded message, the message will tell the length.( How go to second doubt).
      --Your second doubt is you want a delimiter to identify each encoded bits.
      ---------------See, when you will construct the tree, it will generate the each encoded bits in such a way that "No Huffman code of given character will be prefix of another Huffman code".
      Using this you will be able to extract each encoded message without any mistake.
      For illustration----
      In the above given problem
      A- 001
      B-10
      C-11
      D-01
      E-000
      Here you can not find a single encoded character which is the prefix in any other encoded character.
      Hope it will help you.
      Thanks

  • @rownitakhanam5013
    @rownitakhanam5013 3 ปีที่แล้ว +4

    There is a mistake in last part.The tree is diiferent from the previously drawn tree.

  • @AmanRaj-bt2kr
    @AmanRaj-bt2kr 23 วันที่ผ่านมา +1

    I was watching it everywhere on others channel but not able to understand clearly...
    But somehow i have got your video and ultimately i can say that my concept has been cleared...
    Thank u so much !

  • @asterynn941
    @asterynn941 ปีที่แล้ว +1

    The explanation on the topic is concise and the way you explain it made it sound simple, thank you

  • @jinkaku1589
    @jinkaku1589 ปีที่แล้ว

    A very clear explanation regarding the topic! Keep up the amazing work!

  • @howtomo-cap5427
    @howtomo-cap5427 2 ปีที่แล้ว

    You are amazing, I cannot understand how this method works until I saw your video, thank you!

  • @michaelpeel3716
    @michaelpeel3716 3 ปีที่แล้ว

    Understandable, succinct , well presented - throw out your text books and listen to this man.

  • @maheshnarayan6440
    @maheshnarayan6440 5 ปีที่แล้ว +1

    Fantastic teaching style !!! Appreciate these videos !!! Thank you !!!

  • @jeffrbe
    @jeffrbe ปีที่แล้ว

    Very good explanation sir. I just realized in the first few minutes that this is how compressing data works. Really enjoy it.

  • @o8let506
    @o8let506 หลายเดือนก่อน

    Abdul, please keep doing what you are doing! You are a great teacher and a huge help to confused students. We all appreciate your teaching style very much. Well done!

  • @devanlucian1598
    @devanlucian1598 ปีที่แล้ว +1

    I really appreciate your explanation regarding Huffman coding, especially regarding the coding and decoding. The explnation of the tree was reallyceasy to understand becuase of the great explanations and presentation.

  • @wiernadicarneyprasetyo9391
    @wiernadicarneyprasetyo9391 ปีที่แล้ว

    A concept very well explained with clear voice. I can understand the scope of the problem in the introduction part. Thank you for the explanation.