404_HW9_F11 - UML CS Analysis of Algorithms 91.404 (section...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
UML CS Analysis of Algorithms 91.404 (section 201) Fall, 2011 Page 1 of 1 Homework Set #9 Assigned: Monday, 11/21 Due: Monday, 12/5 (start of lecture) This assignment covers textbook material in Chapters 12-13. Note: Partial credit for wrong answers is only given if work is shown. 1. (18 points) Chapter 12: Using the definitions on p. 1177 of our textbook for depth of a tree node and height of a tree, consider the set of keys K = < 2, 8, 1, 5, 6 > and the different possible insertion orders for the keys in K . Based on the different possible insertion orders and their resulting Binary Search Trees, answer the following questions. a) What is the minimum height of a Binary Search Tree constructed from K ? Show an insertion order for the keys in K that generates a Binary Search Tree of minimum height. Draw the corresponding Binary Search Tree. b) Are there any other insertion orders (beyond what you found in (a) above) for the keys in K that produce a Binary Search Tree of minimum height? If so, provide one such
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/13/2012 for the course CS 91.404 taught by Professor Dr.karendaniels during the Fall '09 term at UMass Lowell.

Ask a homework question - tutors are online