jtiernan2008
asked on
Please help understand this huffman coding tutorial (scanned lecture notes attached)
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.
page1.jpg
page2.jpg
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.
page1.jpg
page2.jpg
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
63 goes to the top because their combined frequency, 3340+2890=6250 is greater than any other entry