Professional Documents
Culture Documents
Prefix Codes
Prefix Codes
Sequence is a set whose elements are arranged in order as the first element, second element
and so on. The number of elements contained in a sequence is called its length.
Binary sequences are used as codes for messages sent through transmitting channels.
Using this code if the message eat is to be transmitted. The coded form of message is given by
binary sequence 01101. But this binary sequence cannot be decoded correctly because
sequence 01101 can be decoded not only as eat but also rot, rar,eaar.
Then message eat is to be transmitted as binary sequence 0101100. It yields only eat and no
other message.
Here code 1 is assigned to a, code10 to n and code101 to t and code assigned to t contains the
code assigned to a and n as prefixes. This arises ambiguity while decoding. In the second
coding scheme the code of any letter is not a prefix of the code of any letter that’s why there is
no ambiguity in decoding.