CS 600 Test I



September 30, 1997



1. Suppose that the algorithm RANDOMIZED-PARTITION(A,p,r) returns the index q which is larger than $\frac{n}{2}$ 4 times as often as that which is equal to $\frac{n}{2}$ or less for a set of arrays of n keys. Also suppose that each index within each of these two categories is equally likely. Answer the following questions.

(a) Compute the probability that q is equal to 2.
(b) Write a recurrence relation for average time T(n) for QUICKSORT(A,p,r) if its input is from this set of arrays.
(c) Find a tight upper bound for T(n) of (a).
You may use $1/n\Sigma_{q=1}^{n-1}T(q) = O(n \lg n) $ if necessary.



2. The committee meeting scheduling problem asks whether or not it is possible to schedule the meetings of committees in k time slots without any conflicts, where k is a natural number. Suppose that there are m committees and that there are altogether n people belonging to these committees. People can belong to any number of committees.



(a) Prove that the committee scheduling problem is in class NP.
(b) Prove that it is NP-Complete. Use "graph coloring problem" as a known NP-Complete problem.



 

S. Toida
1999-08-31