-1

I was expecting a little help in my discrete maths problem. Is there any way to shorten up the binary tree or I have to construct for the whole data below.

  1. Construct a Huffman code for the letters of the English alphabet where the frequencies of letters in typical English text are as shown in this table.

Here is The data table

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
  • From the [help/on-topic]: *Questions asking for homework help **must include a summary of the work you've done so far to solve the problem, and a description of the difficulty you are having solving it**.* – Ken White Nov 25 '16 at 23:25

1 Answers1

0

For a true Huffman code and to satisfy the requirements of the exercise you do need a binary tree. There are alternative ways of doing it some discussed in https://en.wikipedia.org/wiki/Huffman_coding.

You could put all the low frequency letters in the same bin and just use a simple scheme for the 8 lowest frequency letters. So B=000, J=001, K=010, P=011, Q=100, V=101, X=110, Z=111. Just append these codes to the Huffman coding with BJKPQVXZ treated as a single character.

Salix alba
  • 7,536
  • 2
  • 32
  • 38