(b) worst-choice data structure (in terms of efficiency) to represent S? Again, explain your answer in detail.
(b) phone number given the name or address.
Explain all answers in detail to get full credit.
(b) [3 points] Suppose only one of the windows could be blocked at any given time (and none of the doors could be blocked). What kind of data structure would you use to most efficiently enumerate (or list) all the probabilities of encountering a blocked exit? List the probabilities, to show that your answer is correct.
(b) [3 points] Write pseudocode for an algorithm that finds the solution to a given instance of the Towers of Hanoi problem, using the data structure chosen in Question 4a).
(b) [1 point] Draw a diagram of this data structure for m = 4 and 1 < i < m+1.
(c) [2 points] For prespecified (integer) values of m and k, such that 1 < ni < k, what is the upper bound on the total number of choices of moves (i.e., the largest number of objects in the tree)? Express your answer theoretically, as a function of m and k.
(b) [2 points] What algorithm that we discussed in class should you use to determine if N is sparsely or densely connected? Explain your answer in detail.
Copyright © 1999 by Mark S. Schmalz.