Greedy Algorithms Quiz 1
Which of the following is true about Huffman Coding ?
A. Huffman coding may become lossy in some cases
B. Huffman Codes may not be optimal lossless codes in some cases
C. In Huffman coding, no code is prefix of any other code.
D. All of the above
C) is correct.
Huffman coding is a lossless data compression algorithm. The codes assigned to input characters are Prefix Codes, means the codes are assigned in such a way that the code assigned to one character is not prefix of code assigned to any other character. This is how Huffman Coding makes sure that there is no ambiguity when decoding.