Example exam:

MC

1. 1,2,4,6
2. 3
3. 1,3,4
4. 1,2,3,4
5. 2
6. 4
7. 4
8. 1,3,4
9. 1,5,6
10. 3
11. 2
12. 2,5


Open

1. (a) For a flow f on a flow network G, an augmenting path is a path from s to t so that c(e) > f(e) on all edges e in the path.

(b) Let X be the set of all vertices x such that there is an edge from s to x, and t is reachable from x. For each x in X, let S_x be the set of all vertices, other than s and t, that are reachable from x. By the assumption, the S_x's are pairwise disjoint (because otherwise there are two paths from s to v). For each x in X, because t is reachable from x, the distance from x to t is at least D-1, so |S_x|>=D-1. So |X| is at most n/(D-1) for D>=2. For D=1, the number is 1 (for t itself). In both cases, |X| is most 2n/D. 

Let Y be the set of vertices y that can be reached from s but that t can be not reached from y. For an edge e = (v,u), if v is in Y then u is also in Y. 

Let S be the union of X and Y.  Consider the cut S and T = V-S. The capacity of the cut is at most |X| because the capacities are in [0,1]. Now, apply the max flow min cut theorem 

2. (a) The expected number of tosses is 1/p. 

(b) Let S be a uniformly random subset of V of size exactly 100. Consider each edge (u,v).

Pr[(u,v) in e(S,S^c)] = Pr[u in S]*Pr[v not in S | u in S] + Pr[v in S]*Pr[u not in S | v in S] = 2*(1/3)*(200/299) >= 4/9.

So, the expected size of e(S,S^c) is at least 4m/9. Thus, there must exist some S such that e(S,S^c) is at least 4m/9.

3. (a) The language L is NP-complete if L is in NP and all languages in NP are poly-time reducible to L.

(b) Since P=NP, we can check the size of the max-clique of a graph in poly-time. Remove the vertices one-by-one and keep checking the size, until the size decreases by 1 when removing some vertex v. Then we know v is in a clique of the correct size, so we include v in the final output, and repeat the procedure on the subgraph induced by the vertices adjacent to v.

4. (a) The chance that such a term is zero is (1/2)^4 so that chance that it is 1 is 15/16.

(b) Yes, it is. Actually it is a (16/15)-approximation, which is even better. Since each clause has 4 variables now, it will be satisfied w.p. 15/16. So in expectation we can satisfy 15 k/16 clauses, where the optimal solution can satisfy at most k. So, the approximation ratio is 16/15.


