An Introduction to Cryptology pp 47-53 | Cite as

# Huffman Codes

Chapter

## Abstract

It is clear from the previous chapter (in particular from (4.5) and (4.6)) that the security of a cryptosystem can be increased by reducing the redundancy in the plaintext. In Example 4.1 such a reduction has been demonstrated. In this chapter we shall describe a general method for what is called over all possible codes

*data compression*or*source coding*. Let a (plaintext) source*S*output independently chosen symbols from the set {*m*_{1},*m*_{2}, …,*m*_{n}}, with respective probabilities*p*_{1},*p*_{2}, …,*p*_{n}. A symbol*m*_{i}, 1 ≤*i*≤*n*, will be encoded into a binary string*c*_{i}of length*l*_{i}.The set {*c*_{1},*c*2, …,*c*_{n}} is called a*code C*for the source*S*. The idea of data compression is to use such a code that the expected value of the length of the encoded plaintext is minimal. Since the output symbols are independent we have to minimize the expected length per symbol$$ L = \sum\limits_i -1^n p_il_i$$

(5.1)

*C*for the source*S*. There is however an additional constraint. One has to be able to retrieve the individual messages from the concatenation of the succesive codewords. Not every code has this property. Indeed let*C*= {0,01, 10}. The sequence 010 can be made in two ways: 0 followed by 10 and 01 followed by 0. This ambiguity has to be avoided.### Keywords

Entropy Prefix## Preview

Unable to display preview. Download preview PDF.

## Copyright information

© Kluwer Academic Publishers 1988