Code 1: Not a prefix code.
Code 2: A prefix code.
Code 3: Uniquely decodable, but not a prefix code; identifying the next codeword's start is difficult.
For example, Code 2:
0101110111 โ 0/10/111/0/111 โ uniquely decodable.
Decision tree:
A commonly used compression method that
compresses data
by assigning short codewords to frequent symbols and longer codewords to rare symbols.
They are prefix codes.
The codeword length for each symbol approximately matches the information it conveys.
Huffman coding is highly effective when the probability distribution is known and accurate.