How does a non-prefix-free code cause ambiguity when decoding 00 or 11?
A non-prefix-free code causes ambiguity because a received bit string can be segmented in more than one way into valid codewords. For Code 3, the received string 00 can be parsed as two copies of the codeword 0 (giving ) or as one copy of the codeword 00 (giving ). Similarly, 11 can be parsed as or .
Conditions
- Occurs when at least one codeword is a prefix of another codeword.
- Illustrated here for concatenated received strings under Code 3.
Reasoning, step by step
- Consider the received bit string 00 under Code 3.
- Identify that 0 is a valid codeword for and 00 is a valid codeword for .
- Segment 00 as 0 followed by 0, resulting in .
- Segment 00 as the single codeword 00, resulting in .
- Conclude that the receiver cannot uniquely determine the original symbol sequence.
Example
The lower table in the video shows 'x1x1 OR x3 --- confusion while decoding' for the received string 00, and 'x2x2 OR x4 --- confusion while decoding' for the received string 11.
Common misconceptions
- Assuming that the receiver can always choose the longest matching codeword greedily without error.
- Thinking that distinctness of codewords prevents decoding ambiguity.
Watch the explanation
Explore next
Answers are generated from source material and independently checked. Consult the original video or creator if something is unclear.