Please help understand this huffman coding tutorial (scanned lecture notes attached)

Posted on 2009-05-02
Last Modified: 2013-11-15
Page one is the algorithm and page 2 is an example.

Off the example, I understand that the the Freq column is organised in descending order then the bottom probabilities are added then the number 8 is brought up to join the 0. But the third column confuses me... how come the 7 is brought down? also the same for the 4th part where the 2 is brought down? Then the 4 and 3 are brought down in the next part?

Also why on the 4th last 6 and 3 is put straight to the top? Why is this?

I cant see the reasons for this mentioned in the algorithm.
Question by:jtiernan2008
    LVL 84

    Expert Comment

    7 is brought down because when 0 8 and 1 are combined the total frequency is 1300, which is greater than the frequency of 7
    LVL 84

    Accepted Solution

    similarly, 2 is brought down because 2130 is greater than 1620
    and 6 , 3, and 4 are brought down because 3750 is greater than 2890 or 3340 or 3520
    LVL 84

    Expert Comment

    63 goes to the top because their combined frequency, 3340+2890=6250 is greater than any other entry

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Suggested Solutions

    Title # Comments Views Activity
    sql query help 7 71
    Graph 5 47
    Getting confirmation from the database when data is saved 5 45
    Graph function 4 40
    I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
    Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
    Video by: Steve
    Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now