ΘρϵηΠατπ

Set Cover
Here is the Set-Cover problem. You are given a set E={e1,,en}, and m subsets S1,,SmE. For each j[m], we associate a weight wj0 to the set Sj. The goal is to find a minimum-weight collection of subsets that covers all of E.
  • Form the set-cover problem as an integer linear program, and then relax it to a linear program. Define your variables. [Hint: you might want to have a constraint like j:eiSjxj1 for each element ei.]
  • Let x denote the optimal solution to the relaxed LP you defined in part (a). Let f be the maximum number of subsets in which any element appears. Here's the rounding algorithm: given x, we include Sj if and only if xj1/f. Let I={j:Sj is selected by the rounding algorithm }. Prove that the collection of subsets Sj where jI chosen by the rounding algorithm is a set cover.
  • Let OPT be value of the optimal solution of the set-cover. Prove that the rounding algorithm in (b) gives an f-approximation.
Let's first define the linear integer program as follows for each Sj lets define xSj to be either the value 0 or 1 where this varaible represents whether or not we use Sj in our collection of subsets that cover E. With that in place our goal will be to minimize SiSwixSi which represents the weighted sum of our selected subsets. We will also enforce that ek is in a least one of these subsets, so let Ik be the collection of subsets that ek is in and thus for each k[1n] we enforce the constraint: SiIkxSi1

We can now relax the problem by allowing xSi0


We now prove that the selection of subsets selected using the rounding algorithm is a set cover. Given an ek, lets show that there is some Sm such that ekSm where Sm has been selected using the rounding algorithm.

When know that ek is included in at most (or equal to) f subsets, therefore we know that what this means is that |Ik|f therefore since the solution still respects the constraint: SiIkxSi1 then if each xSi<1f then the sum would be less than 1 which is a contradiction, therefore there is at least one i such that xSi1f, by construction our round algorithm will select Si, on the other hand SiIk and therefore ekSi so ek is covered, since this holds for any k the entire collection E is covered.


Note that OPT=wixi and suppose that the optimal solution from the relaxation is given by wiyi where the yi are used to differentiate from the OPT solution, let the solution given by taking the optimal relaxation solution and doing rounding be given by wir(yi) where r maps to 0 if the value is less than 1f and 1 otherwise.

Let's now observe a few relationships between these solutions. First note that by relaxing a binary varaible it allows for the binary values to be taken on, but also other values, within these new possible values we may be able to find a solution which yields a better objective value. Thus we have wixiwiyi.Note that if yi1f then we know that r(yi)=1 and so there is some αif such that αyi=r(yi), at the same time if yi<1f then r(yi)=0=f0 thus we have wir(yi)=wi(αxi)wi(fxi)=fwixi=fOPT simply: wir(yi)fOPT as needed.

Metric TSP

Here's the metric traveling salesman problem. You are given a complete graph G=(V,E), where V={1,,n} represents the cities the salesman needs to visit. For each edge (i,j)E, we associate it with a cost cij. We call it "metric" because for every triplet of vertices i,j,kV, it respects the triangle inequality, i.e. cikcij+cjk.

The goal is to have a tour of the cities (i.e. a Hamiltonian cycle of G ) such that each city is visited exactly once (except for the starting city where you have to come back to), and the total cost is minimized.

Here is our approximation algorithm, which is also a greedy algorithm: Among all pairs of cities, find the two closest cities, say i and j, and start by building a tour on that pair of cities; the tour consists of going from i to j and then back to i again. This is the first iteration. In each subsequent iteration, we extend the tour on the current subset SV by including one additional city, until we include the full set of cities. Specifically in each iteration, we find a pair of cities iS and jS for which the cost cij is minimum; let k be the city that follows i in the current tour on S. We add j to S, and replace the path ik with ij and jk. See the picture below for illustration:

Let OPT be the value of the optimal solution of the metric traveling salesman problem. Prove that the approximation algorithm above gives a 2-approximation.

Firstly observe that the specified algorithm is very similar to Prim's algorithm, which generates a minimal spanning tree. We make the followign claim at iteration k the cost subtour constructed by the approximation algorithm is less than or equal to 2 times the cost of the sub-spanning tree constructed by prim's algorithm. Let Ai and Pi denote the cost at iteration of i of the approximation and prim's algorithm respectively.

Base case: On the first iteration the approximation algorithm selects the two vertices that are closest together ( i,j ) and constructs the tour iji this cost is equal to d(i,j)+d(j,i), on the other hand the subtree constructed by prim is simply ij and therefore it's cost is only d(i,j) so we have that Ai=2Pi2Pi as needed.

Induction Step: Assume that the statement holds true for k1 and lets show it holds true for k+1. At iteration k+1 since the pseudocode of the approximation algorithm selects the next vertex in the same way a prim, they both select some new vertex vm where this vertex forms the smallest distance with respect to all of the vertices which have been selected already (which is also the same for both algorithms at this iteration). Suppose this smallest distance was observed with the pair vaS, which is to say that d(va,vm) was minimized.

Recall that the approximation states that it will remove the vertex after va in the tour (which we will denote as vb) and then inserts vavmvb instead. The increase in cost by doing so is equal to d(va,vm)+d(vm,vb)d(va,vb), now we remark the following d(vm,vb)d(vm,va)+d(va,vb)=d(va,vm)+d(va,vb) therefore d(va,vm)+d(vm,vb)d(va,vb)2d(va,vm) Keep remembering that this edge va,vm is the exact same edge that prim will have chosen at iteration k+1 because both of these algorithms select their next vertices in the same manner. Thus we have Ak+1=Ak+(d(va,vm)+d(vm,vb)d(va,vb))2Pk+(d(va,vm)+d(vm,vb)d(va,vb))2Pk+2d(va,vm)=2(Pk+d(va,vm))=2Pk+1 Thus the induction step is proven.

What we can infer is that after both algorithms terminate on the same iteration, the approximation algorithm has created a tour T and prim has created a minimal spanning tree M such that c(T)2c(M). Now note that given a minimal spanning tree we know that it's cost is always going to be less than or equal to OPT, this is because by removing a single edge from OPT which is a tour, we obtain a spanning tree whose cost is less than or equal to the cost of the tour, but also it's a spanning tree and so the minimal spanning tree will have cost less than or equal to it, so now we have that c(T)2c(M)2OPT hence the approximation algorithm yields a 2-approximation.

Randomized Max Cut
Let G=(V,E) be an undirected graph. For any subset of vertices UV, define cut(U)={(u,v)E:uU and vU}.

The set cut(U) is called the cut determined by the vertex set U. The size of the cut is denoted by |cut(U)|. The Max-Cut problem asks you to find the cut with maximum size, i.e., maxUV|cut(U)|.

Here is a randomized algorithm for Max-Cut: Take a uniform random subset U of V, and choose cut(U) to be the cut. Let OPT be the size of the maximum cut in G.

Prove that the randomized algorithm gives a cut of expected size at least half of the optimal solution, i.e., 𝔼[|cut(U)|]12 OPT.

In order to solve this we must know the meaning of a uniform random subset U of V, to select a uniform random subset means that there is equal probability for a given vertex to either be in U or for it to not be in U, what this means is that given any eE we have that P(ecut(U))=12, observe that we have the indicator function IC:E(U){0,1} which equals 1 when an edge is in the cut and 0 when it is not, and that the indicator function can be thought of as a random variable.

Note that |cut(U)|=eEIC(e), since expected value is linear then we know E(|cut(U)|)=eEE(IC(e))

Now let's note that for a given fixed e we know that E(IC(e)):=P(IC(e)=1)1+P(IC(e)=0)0=12 therefore we continue the chain of equalities from our previous paragraph obtaining: eEE(IC(e))=|E|2

Note that the size of the cut is clearly upperbounded by how many edges your graph actually has, so that |E|2OPT2 thus connecting everything we obtain that E(|cut(U)|)OPT2 as needed.

Randomized Max-k-Sat
Max- k-SAT is a problem where we try to maximize the number of clauses that can be satisfied. Suppose there are n variables x1,x2,,xn, and each clause contains precisely k distinct literals (e.g. (x1x2x3xk) ), and xi and xi will not both appear in the same clause. Note that unlike Exact- k-SAT, we do not demand that every clause to be satisfied.
  • Prove that there exists a randomized algorithm that will approximately solve Maxk-SAT within an approximation ratio of (2k1)/2k.
  • Provide a de-randomization of the algorithm that uses the method of conditional expectations.

Our randomized algorithm simply assigns random truth values to all variables, since each clause is a sequence of logical or operations taken at once and it uses k distinct variables, then there is exactly one way for it to be false, and 2k possible truth assigments to these variables, therefore the probability that the whole statement is true is given by 2k12k

If there are m clauses total, then the expected number of satisfied clauses is simply given by m2k12k, since the optimal number of satisfied clauses is m then this provides a 2k12k approximation.

Note that if our random assigment doesn't yield a solution that satisfies at least 2k12km clauses, we simply try a new random assignment, it should only take a few iterations until we do at least as well as the expected value.