00:01
All right, what we want to do here is first list the frequencies of the letters in increasing order.
00:04
So a would be 0 .08, b is 0 .1010.
00:11
C would be 0 .12.
00:15
D would be 0 .15, e, 0 .20, and f, 0 .35.
00:26
And then to build the hoffman tree, we combine the two letters with the lowest frequency.
00:31
At each step to create a binary tree.
00:35
Each combination forms a new node whose frequency is going to be the sum of the two nodes it combines, and then we repeat this until a single tree is formed.
00:46
So we combine 0 .08 and 0 .10, combine a and b.
00:51
That can give us a new node of 0 .18, and then combine c and d to get a new node of 0 .27.
00:59
The combined e, so 0 .20, and node 0 .18.
01:05
And that gives us a new node of 0 .38, and then combine f, so 0 .35, and then the node 0 .27, get a new node of 0 .62.
01:16
And then finally combine the remaining nodes.
01:18
That'll be 0 .38 and 0 .62, and that gives us 1 .00.
01:24
And the root of the tree...