Header Image
Creative Commons image courtesy of Flickr user StormPetrel1-
Recent Posts
Recent Comments
- In the Spotlight: MAT2540 – Discrete Structures and Algorithms II – The Open Road on Links
- OpenLab Workshop for Opening Gateways Fellows | 2018-2019 Opening Gateways Faculty Seminar on Final Exam Review
- Eric on Eric’s Final Review
- Kate Poirier on Hints/reminders from today’s class
- Kate Poirier on Final Exam Review
Archives
Categories
Meta
11.2 problem 20 for test review 2. Jose nunez
This entry was posted in Uncategorized. Bookmark the permalink.
Hi Jose, this looks pretty good but I do have a few comments.
In (b) and (c), you’ve included some leaves in your tree without labels. Technically, your trees should include only the edges and vertices that are necessary for your prefix code.
Also, it’s customary to let 0 indicate a left child and 1 indicate a right child. In your answer for (b) you’ve switched this in a few places, which makes your code harder to read…and it’s easier to make a mistake. Please keep to the 0-left and 1-right in the future.
Thanks professor for the advice