Note: This last homework is due, as usual, on Friday, but because this next Friday is the last day of classes, you may turn the homework in on the following Tuesday without penalty. You are, of course, welcome to turn it in on Friday in class. Homework turned in after class on Friday (and before noon on Tuesday) should be brought to my office (494 Rhodes). If I'm not in the office, just place it under the door.
Note: Include your Cornell NetID on your each section of your homework. This simplifies the process of recording your grades.
3-Coloring is a yes/no question, but we can phrase it as an optimization problem as follows.
Suppose we are given a graph G = (V,E), and we want to color each node with one of three colors, even if we aren't necessarily able to give different colors to every pair of adjacent nodes. Rather, we say that an edge (u,v) is satisfied if the colors assigned to u and v are different.
Consider a 3-coloring that maximizes the number of satisfied edges, and let c* denote this number. Give a polynomial-time algorithm that produces a 3-coloring that satisfies at least (2/3) c* edges. If you want, your algorithm can be randomized; in this case, the expected number of edges it satisfies should be at least (2/3) c*.
In the first section of this chapter, we saw a simple distributed protocol to solve a particular contention-resolution problem. Here is another setting in which randomization can help with contention-resolution, through the distributed construction of an independent set.
Suppose we have a system with n processes. Certain pairs of processes are in conflict, meaning that they both require access to a shared resource. In a given time interval, the goal is to schedule a large subset S of the processes to run --- the rest will remain idle --- so that no two conflicting processes are both in the scheduled set S. We'll call such a set S conflict-free.
One can picture this process in terms of a graph G = (V,E) with a node representing each process and an edge joining pairs of processes that are in conflict. It is easy to check that a set of processes S is conflict-free if and only if it forms an independent set in G. This suggests that finding a maximum-size conflict-free set S, for an arbitrary conflict graph G will be difficult (since the general independent set problem is reducible to this problem). Nevertheless, we can still look for heuristics that find a reasonably large conflict-free set. Moreover, we'd like a simple method for achieving this without centralized control: each process should communicate with only a small number of other processes, and then decide whether or not it should belong to the set S.
We will suppose for purposes of this question that each node has exactly
d neighbors in the graph G. (That is, each process is in conflict with
exactly d other processes.)
Each process Pi independently picks a random value xi; it sets xi to 1 with probability � and sets xi to 0 with probability �. It then decides to enter the set S if and only if it chooses the value 1, and each of the processes with which it is in conflict chooses the value 0.
Prove that the set S resulting from the execution of this protocol is conflict-free. Also, give a formula for the expected size of S in terms of n (the number of processes) and d (the number of conflicts per process).
Each process Pi independently picks a random value xi; it sets xi to 1 with probability p and sets xi to 0 with probability 1-p. It then decides to enter the set S if and only if it chooses the value 1, and each of the processes with which it is in conflict chooses the value 0.
In terms of the parameters of the graph G, give a value of p so that the expected size of the resulting set S is as large as possible. Give a formula for the expected size of S when p is set to this optimal value.
In class, we designed an approximation algorithm to within a factor of
7/8 for the MAX 3-SAT problem, where we assumed that each clause has terms
associated with 3 different variables. In this problem we will consider the
analogous MAX SAT problem: given a set of clauses C1,..., Ck
over a set of variables X=x1,..., xn, find a truth
assignment satisfying as many of the clauses as possible. Each clause has at
least one term in it, but otherwise we do not make any assumptions on the
length of the clauses: there may be clauses that have a lot of variables,
and others may have just a single variable.
Assume that our instance has no such pair of "conflicting
clauses"; that is, for no variable xi do we have both a
clause C=xi and a clause C'=not(xi). Modify the
above randomized procedure to improve the approximation factor from 1/2
to at least a .6 approximation, that is, change the algorithm so that
the expected number of clauses satisfied by the process is at least .6k.
(Note that by the example in part (a), there are instances where one cannot satisfy more than k/2 clauses; the point here is that we'd still like an efficient algorithm that, in expectation, can satisfy a .6 fraction of the maximum that can be satisfied by an optimal assignment.)