Please answer in Python or Java:   In this assignment, you will do an implementation of the Huffman Code. If you have the Data Structures book for this class, on pages 415-421 is the theory for encoding a String using the Huffman Code. There is also a PDF of these pages on the class website. Your task is to develop a proof of concept of the Huffman Code and demonstrate it by taking a String and encoding it.   The Huffman Code requires knowledge of a few data structure concepts discussed in class:   Priority Queues Binary Trees Recursion Arrays and/or Linked Lists   In your program, you will demonstrate an understanding of all these concepts by developing your own priority queue, node, binary tree, array and/or linked list, and use of recursion to support the Huffman Code encryption algorithm. Read through the theory of the Huffman Code in the text and then write a program that can take a String and encrypt it. For example, given a string “Hello World”, the program should apply the Huffman Code algorithm on that String to create the corresponding encrypted code sequence.   In addition, you must be able to show the various components that support creating the encrypted String. For the Huffman Code, this requires the following:   Creating a frequency table for each character of the String (I suggest this to be an array but can be done as a linked list) Creating a Huffman Tree from the frequency table (This will require use of a priority queue and a binary tree) Creating the Huffman Code table (This should be an array and will require use of recursion to build)   The program does not need to be interactive (but may be interesting for you to do so). You can hard code the String to encode such as the one used in the text and show the result as output. I may change the String in the code to test your work. For your program output though, you must be able to show the contents of each of the supporting components listed above. For example, in main, you may hard code a given String like “Hello World”. You then need to create structures and classes for each of the 3 components listed for the Huffman Code to work. This means you’ll need to display: A frequency table for all the characters of the “Hello World” string A Huffman tree from that frequency table (you do not need to show the priority queue used to build the tree unless you think it helps) A Huffman code table that shows the codes generated for each character

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Please answer in Python or Java:

 

In this assignment, you will do an implementation of the Huffman Code.

If you have the Data Structures book for this class, on pages 415-421 is the theory for encoding a String using the Huffman Code. There is also a PDF of these pages on the class website. Your task is to develop a proof of concept of the Huffman Code and demonstrate it by taking a String and encoding it.

 

The Huffman Code requires knowledge of a few data structure concepts discussed in class:

 

  • Priority Queues
  • Binary Trees
  • Recursion
  • Arrays and/or Linked Lists

 

In your program, you will demonstrate an understanding of all these concepts by developing your own priority queue, node, binary tree, array and/or linked list, and use of recursion to support the Huffman Code encryption algorithm. Read through the theory of the Huffman Code in the text and then write a program that can take a String and encrypt it. For example, given a string “Hello World”, the program should apply the Huffman Code algorithm on that String to create the corresponding encrypted code sequence.

 

In addition, you must be able to show the various components that support creating the encrypted String. For the Huffman Code, this requires the following:

 

  • Creating a frequency table for each character of the String (I suggest this to be an array but can be done as a linked list)
  • Creating a Huffman Tree from the frequency table (This will require use of a priority queue and a binary tree)
  • Creating the Huffman Code table (This should be an array and will require use of recursion to build)

 

The program does not need to be interactive (but may be interesting for you to do so). You can hard code the String to encode such as the one used in the text and show the result as output. I may change the String in the code to test your work. For your program output though, you must be able to show the contents of each of the supporting components listed above.

For example, in main, you may hard code a given String like “Hello World”. You then need to create structures and classes for each of the 3 components listed for the Huffman Code to work. This means you’ll need to display:

  1. A frequency table for all the characters of the “Hello World” string
  2. A Huffman tree from that frequency table (you do not need to show the priority queue used to build the tree unless you think it helps)
  3. A Huffman code table that shows the codes generated for each character
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY