Data compression

EasyMedium
12345678910111213141516171819
Question 13
Medium

A student was asked to describe how a Huffman tree could be created for the string in Figure 1.

Figure 1

BANANA SPLIT

Her response was:

"I would count the frequency of each character in the string and write them in a table sorted by their order of appearance. For example, the character 'N' has the highest frequency in this string. Then, I would take the two characters with the largest frequencies and combine them into a new parent node. The frequency of this new parent node is calculated by subtracting the smaller frequency from the larger frequency. I would then repeat this process with the remaining largest nodes until the entire tree is built."

State four mistakes the student has made in her response.

[4]

Data compression Questions

  1. GCSE
  2. /Computer Science
  3. /Data compression