The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 3 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
Using the frequency table shown below, build a Huffman Encoding Tree. Resolve
ties by giving single letter groups precedence over multiple letter groups, then
alphabetically. Do not worry about punctuation or capitalization.
Print out the tree by doing a preorder traversal. Print the resulting code. An
example is given below for a 3-letter alphabet. You may use any reasonable
format.
Â
605.202 Data StructuresLAB 3Using the frequency table shown below, build a Huffman Encoding Tree. Resolveties by giving single letter groups precedence over multiple letter groups, thenalphabetically. Do not worry about punctuation or capitalization.Print out the tree by doing a preorder traversal. Print the resulting code. Anexample is given below for a 3-letter alphabet. You may use any reasonableformat.X – 3The tree in preorder is: XYZ: 6, X: 3, YZ: 3, Y: 1, Z: 2Y – 1Z – 2The code is X = 0; Y = 10, Z = 11;In your write-up, consider whether you achieved any useful data compression withthis method. Compare to conventional encoding. How would your results beaffected by using a different scheme to break ties, for example, if you had givenprecedence to alphabetical ordering and then to the number of letters in thekey? What other structures did you use and why?Encode the following strings, plus several others of your choice:Sally sells seashells by the seashore.Peter Piper picked a peck of pickled peppers a peck of pickled peppers Peter Piperpicked.Houston, the Eagle has landed.Is that your final answer?Decode the following strings:010110010101100111110110111011000010101001101110110110001011001010110001011100011011111111110001000111111101011111011001111111000100011111000001010000001110010111A - 19B - 16C - 17D - 11XYZ:6X:3YZ:3Z:2Y:1
Attachments: