1(a) Let p be the probability for .
Then p n/2 + 4p n/2 = 1 must hold.
Solving that for p, p = 2/5n is obtained.
Hence if , 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
.
(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,
= 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 pairs and for each pair conflict checks are necessary. Hence
even by the brute force method 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.