Computer Science Homework Help

IGLOBAL University Huffman Encoding Algorithm & Data Structures Question

 

Greedy algorithm:

1. Using Huffman encoding algorithm, encode the following message. Spaces are included.  

    PETER PIPER PICKED A PECK OF PICKLED PEPPER

    a. Draw all relevant diagrams – Tree and frequency table

    b. What is the size of this message [in bits]?

2.  Using Huffman encoding algorithm, encode the following message. Spaces are included.  

PETER FOX PICKED A PECK OF JAMAICAN PEPPERS

    a. Draw all relevant diagrams – tree and frequency table

    b. What is the size of this message [in bits]?

3. What is the time complexity of Huffman encoding algorithm?

4. What is greedy algorithms?  Explain (150 words)