Question: CSCI 2110 Computer Science III Data Structures and Algorithms ASSIGNMENT NO. 3 Date given: Friday, October 27, 2017 Due: Wednesday, November 15, 2017 (11.55 p.m.)




CSCI 2110 Computer Science III Data Structures and Algorithms ASSIGNMENT NO. 3 Date given: Friday, October 27, 2017 Due: Wednesday, November 15, 2017 (11.55 p.m.) The objective of this assignment is to implement the Huffman coding algorithm using the binary tree data structure Problem Summary: Read a text file. Count the number of occurrences of each symbol (character) in the file. You can ignore the spaces and the newline returns, but count the alphabet, digits, and punctuations. Convert the frequencies into probabilities. Build a Huffman tree with the symbols and their probabilities. Derive the Huffman codes. Encode the text file with the codes. Decode the encoded text file and show that it is the same as the input text file Download the BinaryTree.java next to the assignment link. You may add extra methods or make appropriate changes to the methods if necessary. You may also add other classes Problem in Detail: In order to help you with the assignment, here's the Huffman algorithm step-by-step procedure (as discussed in the lectures). You are not obligated to follow this procedure. Any valid method of deriving Huffman codes is acceptable, but it must use the binary tree data structure Step 1: Read a text file and parse it into individual characters. Count the number of characters of each type to get the frequency of each character, that is, the number of times each character appears in the text file. You can ignore the spaces and the newline returns, but count the alphabet, numbers, and punctuations Here's a sample text file that you can use to test your program. This is the same file that will be used to mark your assignment. You can download it from the web page next to the assignment link POKEMON TOWER DEFENSE YOUR MISSION IN THIS FUN STRATEGY TOWER DEFENSE GAME IS TO HELP PROFESSOR OAK TO STOP ATTACKS OF WILD RATTATA. SET OUT ON YOUR OWN POKEMON JOURNEY, TO CATCH AND TRAIN ALL POKEMON AND TRY TO SOLVE THE MYSTERY BEHIND THESE ATTACKS. YOU MUST PLACE POKEMON CHARACTERS STRATEGICALLY ON THE BATTLEFIELD SO THAT THEY STOP ALL WAVES OF ENEMY ATTACKER!!! DURING THE BATTLE YOU WILL LEVEL UP AND EVOLVE YOUR POKEMON YOU CAN ALSO CAPTURE OTHER POKEMON DURING THE BATTLE AND ADD THEM TO YOUR TEAM. USE YOUR MOUSE TO PLAY THE GAME GOOD LUCK! CSCI 2110 Computer Science III Data Structures and Algorithms ASSIGNMENT NO. 3 Date given: Friday, October 27, 2017 Due: Wednesday, November 15, 2017 (11.55 p.m.) The objective of this assignment is to implement the Huffman coding algorithm using the binary tree data structure Problem Summary: Read a text file. Count the number of occurrences of each symbol (character) in the file. You can ignore the spaces and the newline returns, but count the alphabet, digits, and punctuations. Convert the frequencies into probabilities. Build a Huffman tree with the symbols and their probabilities. Derive the Huffman codes. Encode the text file with the codes. Decode the encoded text file and show that it is the same as the input text file Download the BinaryTree.java next to the assignment link. You may add extra methods or make appropriate changes to the methods if necessary. You may also add other classes Problem in Detail: In order to help you with the assignment, here's the Huffman algorithm step-by-step procedure (as discussed in the lectures). You are not obligated to follow this procedure. Any valid method of deriving Huffman codes is acceptable, but it must use the binary tree data structure Step 1: Read a text file and parse it into individual characters. Count the number of characters of each type to get the frequency of each character, that is, the number of times each character appears in the text file. You can ignore the spaces and the newline returns, but count the alphabet, numbers, and punctuations Here's a sample text file that you can use to test your program. This is the same file that will be used to mark your assignment. You can download it from the web page next to the assignment link POKEMON TOWER DEFENSE YOUR MISSION IN THIS FUN STRATEGY TOWER DEFENSE GAME IS TO HELP PROFESSOR OAK TO STOP ATTACKS OF WILD RATTATA. SET OUT ON YOUR OWN POKEMON JOURNEY, TO CATCH AND TRAIN ALL POKEMON AND TRY TO SOLVE THE MYSTERY BEHIND THESE ATTACKS. YOU MUST PLACE POKEMON CHARACTERS STRATEGICALLY ON THE BATTLEFIELD SO THAT THEY STOP ALL WAVES OF ENEMY ATTACKER!!! DURING THE BATTLE YOU WILL LEVEL UP AND EVOLVE YOUR POKEMON YOU CAN ALSO CAPTURE OTHER POKEMON DURING THE BATTLE AND ADD THEM TO YOUR TEAM. USE YOUR MOUSE TO PLAY THE GAME GOOD LUCK
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
