Each symbol of an alphabet has its own unique codeword. The collection of codewords is known as a code. Codes are used in many computer applications. One such application is the compression and decompression of data. Another common application is used in the transmission of data.
Data is sent over phone lines or data cables as electrical signals .
To make the transmission as quick as possible, we like an efficient code with the shortest possible average codeword length. The probability of a symbol is the probability of finding it in a text. A prefix code is a code one where no codeword is also a prefix of some other codeword. If we take our example of the five letter alphabet from Table 1, we can generate a Huffman tree for it. The frequency can be given in the form of probabilities, percentages or any other numeric way.