• Home
  • Textbooks
  • Foundations of coding: theory and applications of error-correcting codes
  • Huffman Codes

Foundations of coding: theory and applications of error-correcting codes

Jiri Adamek

Chapter 2

Huffman Codes - all with Video Answers

Educators


Chapter Questions

Problem 1

Find binary Huffman codes for the sources shown in Figure 5.
$$
\begin{array}{l|cccccccc}
\hline \text { Symbol } & \text { A } & \text { B } & \text { C } & \text { D } & \text { E } & \text { F } & \text { G } & \text { H } \\
\hline \text { Prob. (1 }{ }^{\text {st }} \text { source) } & \frac{1}{8} & \frac{1}{8} & \frac{1}{8} & \frac{1}{8} & \frac{1}{8} & \frac{1}{8} & \frac{1}{8} & \frac{1}{8} \\
\text { Prob. (2 }{ }^{\text {nd }} \text { source) } & 0.1 & 0.2 & 0.1 & 0.3 & 0.05 & 0.1 & 0.05 & 0.1 \\
\text { Prob. (3 } 3^{\text {rd }} \text { source) } & 0.15 & 0.15 & 0.15 & 0.15 & 0.1 & 0.1 & 0.1 & 0.1 \\
\hline
\end{array}
$$

Check back soon!

Problem 2

Find ternary and quaternary (three and four code symbols) Huffman codes for the sources shown in Figure 5.

Check back soon!

Problem 3

Find the smallest number of code symbols necessary to construct an instantaneous code of average length $L \leq 1.5$ for each of the three sources of Figure 5.

Check back soon!

Problem 4

Find all binary Huffman codes for the source consisting of symbols $A, B, C, D$ if $A$ is twice more frequent $\operatorname{than} B$ and $B$ is twice more frequent than either of $C$ and $D$.

Check back soon!

Problem 5

Describe binary Huffman codes of sources with equiprobable symbols
(1) if the number of source symbols is a power of 2 ,
(2) if it is not a power of 2.

Check back soon!
16:16

Problem 6

Describe binary Huffman codes of sources satisfying $p_1<p_{n-1}+p_n$ (where $p_1 \geq p_2 \geq \cdots \geq p_n$ are the source probabilities). Compare with Exercise 2E.

Bobby Barnes
Bobby Barnes
University of North Texas