Question: 1. Huffman Coding: The objective of this problem is to design and develop a program for Huffman coding algorithm. The discrete source has an alphabet
1. Huffman Coding: The objective of this problem is to design and develop a program for Huffman coding algorithm. The discrete source has an alphabet X = {x1, x2, x3, x4, x5, x6, x7, x8, x9} with corresponding probabilities, P = {0.2, 0.15, 0.13, 0.12, 0.1, 0.09, 0.08, 0.07, 0.06}.
Write a program to implement the Huffman Coding Algorithm in Java (see the Lecture 3 PPT file for the algorithm steps). Include instructions how to run your program.
2. Then run the computer program to solve the Huffman Code for Printed English problem as below:
The possibilities of the letters of the alphabet occurring in the printed English are given in the table below (assume someone did this study):
| Letter | Probability | Letter | Probability | Letter | Probability |
| A | 0.0642 | B | 0.0127 | C | 0.0218 |
| D | 0.0317 | E | 0.1031 | F | 0.0208 |
| G | 0.0152 | H | 0.0467 | I | 0.0575 |
| J | 0.0008 | K | 0.0049 | L | 0.0321 |
| M | 0.0198 | N | 0.0574 | O | 0.0632 |
| P | 0.0152 | Q | 0.0008 | R | 0.0484 |
| S | 0.0514 | T | 0.0796 | U | 0.0228 |
| V | 0.0083 | W | 0.0175 | X | 0.0013 |
| Y | 0.0164 | Z | 0.0005 | Space | 0.1859 |
Determine the entropy of the printed English.
Determine a Huffman code for the printed English
Determine the average codeword length and efficiency of the Huffman code (comparing it to Shannons Source Coding Theorem).
Please show screenshots of results for both.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
