| UNLV : Math : Corran Webster : Teaching : Teaching : Codes : Codes | Skip to content | |||||||||||||
Communication, Codes and CyphersCodes |
||||||||||||||
Contents
|
2.1 Instantaneously Decipherable CodesMost of the codes that we are dealing with in this course are not only uniquely decipherable, but are what we call instantaneously decipherable. These are codes that we are able to decipher as we go along - this is an important property for codes used in communication, since we don't want to have to wait for the whole message to arrive before we work out what it says. For simplicity, we will assume that instantaneously decipherable codes will be built by mapping individual characters from the source alphabet into words in the code alphabet, or codewords. The encoded form of the message is then just built up by concatenating the code words together. This is nothing surprising, since this is the way that Morse code works. It is also not a great restriction, since if we wanted to work with mappings of multiple blocks of characters, we can replace our source alphabet with the alphabet whose characters are those blocks. Example
Example
By an instantaneously decipherable code, we mean one that we can immediately tell when we have reached the end of the codeword for a character in the source alphabet. In other words, no codeword for a letter can be the start of the codeword for any other letter. Example
A simple way to guarantee that your code is instantaneously decipherable is to ensure that all your codewords have the same length. This is the approach taken by the ASCII code - every letter in the source alphabet is converted into a sequence of 7 binary digits. This approach is usually good for encryption and error-correcting codes, but it is far from optimal when compressing, since it does not allow more frequently used letters to have shorter codewords. |
|||||||||||||
|
|
||||||||||||||