CS 600 Solutions to Test 1

1(a) Let p be the probability for tex2html_wrap_inline33 .
Then p n/2 + 4p n/2 = 1 must hold.
Solving that for p, p = 2/5n is obtained.
Hence if tex2html_wrap_inline41 , then it is 2/5n, adn if 2 > n/2, then it is 8/5n.

(b) Let T(i) be the average time to quicksort an array of length i.
Then tex2html_wrap_inline53
tex2html_wrap_inline55 .

(c) Eliminate 2/5n(T(1) + T(n-1)) using the same argument as in the textbook. Then since each T(i) appears twice in the summations,
tex2html_wrap_inline57
tex2html_wrap_inline59
= tex2html_wrap_inline61 by the hint.

2(a) Use a collection of sets (groups) of committees as a certificate.
To verify that a certificate is a correct solution, check conflicts (common members) for each pair of committees within each group. If there are m people and n committees, then there are tex2html_wrap_inline67 pairs and for each pair tex2html_wrap_inline69 conflict checks are necessary. Hence even by the brute force method tex2html_wrap_inline71 time is sufficient. Hence it can be verified in polynomial time. Hence it is in NP.

(b) An instance of the graph color problem is a pair of a graph G and a natural number k. Given that, an instance of the committee meeting scheduling problem can be constructed as follows:
Make a committee for each vertex of G, and let each edge of G represent a person (so there are m people if there are m edges in G). In addition if (u,v) is an edge of G, then put the person represented by the edge into committees u and v.

It can be easily proven that G is colorable with k colors if and only if the meetings of the committees can be scheduled in k time slots without conflicts.