There are four questions for 100 total points. All are based on lectures 16-20, and thus on Chapters 7 and 8 of the Adler notes.
Students are responsible for understanding and following the academic honesty policies indicated on the course main page.
Problem 4.1 (50): One of my wife's colleagues is working on a scheduling program for their high school. Here are three simplified versions of the problem he faces. In each case we have a set of s students, each of whom needs to take a courses. Each student has a set of options for each of the a courses and must take exactly one course from each set. There are c total courses each with a capacity (a maximum number of students it may have), and the courses are divided into t time slots. A student may not take more than one course in the same time slot. An optimal schedule is one where each student has a full schedule of a courses and all the conditions are met. You should think of c and s as the input size and think of a and t as constants. (At my wife's school, a is 6 and t is 9.)
Problem 4.2 (20) (cf. Kleinberg-Tardos exercise 8-37) Suppose you are given a highway network as an undirected graph where nodes are cities and edges represent links between cities. However, all the highways involved in the graph have tolls. Thus each edge is labeled not only with a distance but also with a monetary price. (In the real world, longer edges have larger tolls, but you may not assume any such relationship here.) Prove that the language {(G,s,t,d,p): G is such a graph, s and t are nodes, and there is a path from s to t with total distance at most d and total toll at most p} is NP-complete.
Problem 4.3 (10) (cf. Kleinberg-Tardos exercise 11.9) Recall that the 3-dimensional matching problem has as input three disjoint sets X, Y, and Z, each of size n, and a subset T of the direct product X times Y times Z. We say that a subset M of T is a matching if no element of (X union Y union Z) is contained in more than one element of M. The 3DM problem is whether there is a matching with n triples -- this problem is NP-complete.
A corresponding optimization problem is to take the same input and find a matching M that is large as possible. Find a poly-time algorithm that solves this problem within a factor of 3 -- that is, it finds a matching that has at least 1/3 as many triples as the best possible matching.
Problem 4.4 (20) The Adler notes point out that an NP-complete problem may be easy to solve on most cases if there is a probability distribution on the input. Here is an example. Consider the following input distribution Dε on n-vertex graphs, where ε is a constant with ε>0. We produce a random graph from Dε by independently deciding whether E(i,j) is true for every pair of (distinct) vertices i and j. We make E(i,j) true with probability ε.
Describe a deterministic, polynomial-time algorithm that will decide 3-colorability for these graphs most of the time. Specifically, let p(n) be the probability that your algorithm, run on a random n-vertex graph chosen using Dε, will get the right answer for 3-colorability. (Note that p(n) will depend on ε.) Prove that p(n) = 1 - o(1).
Last modified 28 April 2006