00:02
So in this problem, we're given this listing of symbols and frequencies and asked to use huffman coding with these following symbols and frequencies listed.
00:19
And then we're asked what the average number of bits used to encode a character is.
00:27
So first of all, let's just build the huffman tree based on these frequencies.
00:33
So if we have a, which is a frequency of 8, because it's 0 .08, and b would be a frequency of 10, then together, that's a frequency of 18.
00:57
Okay.
00:59
And then let's put c at a frequency of 12 here, and d at a frequency of 15.
01:13
Over here and those come together to a frequency of 27 and let's put e here at a frequency of 20 so those come together to a frequency of 38 and let's put f here at a frequency of 35 and those come together to a frequency of 62 and then of course this all comes together to frequency of 100.
02:00
All right.
02:03
And so then what do we have? we have code words.
02:14
Word, a, is 0 -0 -0.
02:22
B, we'll call 0 -0 -1.
02:25
C, we'll call 100...