Question: Task 1: Huffman's algorithm Constructing Huffman tree e o Write pseudocode of the Huffiman tree construction algorithm. o Analyse time etficiency of the algorthm .


Task 1: Huffman's algorithm Constructing Huffman tree e o Write pseudocode of the Huffiman tree construction algorithm. o Analyse time etficiency of the algorthm . Generating codewords o Given a Huffiman coding tree, write pseudocode of the algorithm that gets the codewords for all the characters. Analyse time efficiency of the algorithm. o Task 2: Encoder (Compression) Write a program that constructs a Huffman code for a given text and encode it. Specify your assumptions, data structure used in the implementation. Your program should prompt the user to enter the names of the text file and compressed file. Figure 1 shows a sample of the output where the user's inputs are printed in bold. Text file: project.txt Compressed file: project.huf Figure 1 Hint: You may implement the Huffiman's encoder based on the following steps: o o o o Build a frequency chart for all characters in your text. Build a Huffman tree. Make a list of all codewords. Encode your text using the list of codewords
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
