UD Codes
Contents
UD codes can only be interpreted in one way.
That is to say, that there is no ambiguity in turning a codeword back into its message.
Example One
Code with symbols A:0and B:00.
Codeword:000
000could be translated toAB,BAorAAA.
Therefore our codes are NOT uniquely decodable.Example Two
Code with symbols A:0and B:1.
Codeword:010
Uniquely decodable:ABAExample Three
Code with symbols A:11, B:01, C:011
Codeword:011101
Going left to right, we might be unsure if the first code isBorC.
However, the code is still uniquely decodable as we can decode it right to left.
Message:BAB