Question: the language should be c + + Extend the Huffman tree by introducing another letter, namely ' * , to represent all non - alphabet

the language should be c++
Extend the Huffman tree by introducing another letter, namely '*, to represent all non-alphabet characters (including numbers, spaces, tabs, parenthesis, punctuation symbols, special characters, etc.). You may keep the frequencies of the alphabet letters the same; and assume that the frequency of the non-alphabet characters is \(25\%\). You may also assume that the encodings for upper-case letters are the same as the encodings of the lower-case letters.
From the extended Huffman tree, generate the code table. To be specific, your code table will have 27 entries (26 entries for the alphabet, and 1 for the non-alphabet).
Based on the code table, write a program to read and encode a text file that is as large as 1 MB . Save the coded text as a binary file. This becomes a file compressing program. How much is the size of the binary file?
the language should be c++
What to submit:
+ The Huffman tree program
+ A text file that contains the code table
+ The source text file ( should be around 1MB) where should i get that
+ The binary file
the language should be c + + Extend the Huffman

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!