26.5k views
2 votes
Sue says that she ran the Huffman coding algorithm for the four characters, A, C, G, and T, and it gave her the code words, 0, 10, 101, 110, respectively. Give examples of four frequencies for these characters that could have resulted in these code words or argue why these code words could not possibly have been output by the Huffman coding algorithm.

1 Answer

1 vote

Answer:

10 is a prefix of 101, so in a stream you couldn't tell these a part. So this cannot be a valid Huffman code.

User Xeye
by
4.0k points