Question: Human Code. Suppose we have a text consisting only of a, b, c, d, e, f, g where each character appears with the following frequency:
Human Code.
Suppose we have a text consisting only of a, b, c, d, e, f, g where each character appears with the following frequency:
| a | b | c | d | e | f | g |
| 10 | 3 | 4 | 8 | 14 | 5 | 6 |
Note that the length of the text is 50.
(a) How many bits do we need to store the text le if using a xed-length code?
(b) Show the code built by the Human algorithm, both as a tree and as a list(character, codeword). When combining two trees, the tree with lowest root frequencybecomes the left child and the tree with the second-lowest root frequency becomes theright child. Left children are associated with the bit 0, right children with the bit 1.
(c) How many bits do we need to store the text le with this Human code?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
