Tutorial 8 Answer sketches Q1: Let X, Y denote the cut obtained by

Tutorial 8 Answer sketches
Q1: Let X, Y denote the cut obtained by the algorithm and U, W be the optimal cut. Let
alg denote the size of the cut as given by the algorithm, and opt denote the optimal size cut.
Let V1 = X ∩ U and V2 = X ∩ W , V3 = Y ∩ U and V4 = Y ∩ W .
For i, j ∈ 1, 2, 3, 4, i 6= j, let ei,j denote the number of edges from Vi to Vj .
Thus, alg = e1,3 + e1,4 + e2,3 + e2,4 .
opt = e1,2 + e1,4 + e2,3 + e3,4 .
As the algorithm is not able to find a vertex to switch from X to Y (or vice versa), we have
that for any vertex v ∈ V1 , the number of edges from v to V2 is at most the number of edges
from v to V3 ∪ V4 . It follows that
e1,2 ≤ e1,3 + e1,4
Similarly
e3,4 ≤ e1,3 + e2,3
Thus, we have that
opt = e1,2 + e1,4 + e2,3 + e3,4 ≤ (e1,3 + e1,4 ) + e1,4 + e2,3 + (e1,3 + e2,3 ) ≤ 2alg.
Q2. (a) Since at iteration r we add Sprr to B (all elements of Sprr were not in B before this
addition), the total cost of adding the new elements to B is exactly 1 in each iteration. As there
are total of t iterations, total cost of adding the elements to B is exactly t. Since at the end of
P
iteration t, B = X, we have that m
i=1 ci = |Y | = t.
(b) Note that Sprr form a partition of X.
Now:
P
(i)
xi ∈Sj
ci =
Pt
r=1
|Sj ∩Sprr |
,
|Sprr |
since, for xi ∈ Sj ∩ Sprr , ci is 1/|Sprr |.
(ii)
Pt
r=1
|Sj ∩Sprr |
|Sprr |
=
|Sj ∩Sprr |
|Sprr |
Pw
r=1
since Sj ∩ Sprr is empty set for r > w.
(iii)
Pw
r=1
|Sj ∩Sprr |
|Sprr |
≤
Pw
r=1
|Sj ∩Sprr |
|Sjr |
since |Sjr | ≤ |Sprr | due to choice of pr in iteration r.
(iv)
|Sj ∩Sprr |
|Sjr |
=
|Sjr −Sjr+1 |
r=1
|Sjr |
Pw
since Sj ∩ Sprr is exactly Sjr − Sjr+1 (i.e. the difference between the remaining elments before
and after iteration r in which Sprr was picked).
(v) To see that
Pw
r=1
|Sjr −Sjr+1 |
|Sjr |
≤ H|Sj | ,
holds, let x1 , x2 , . . . be the values of Sjr − Sjr+1 , for r = 1, 2, . . .. Then the sum on left hand
side is,
x1
n
+
x2
n−x1
+
x3
,...
n−x1 −x2
Now for u ≥ u0 ≥ 1,
u0
u
— (A).
≤
1
u
+
1
u−1
+ ... +
1
.
u−u0 +1
CS4230
2
Thus (A) is maximised when each xi is 1, giving the value in (A) as H|Sj | .
Thus (v) follows.
(c) From (b) above it follows that the cost of covering any particular Sj is bounded by H|Sj | .
Thus the cost of covering all the elements in X is bounded by k ∗ Hmaxsize , where maxsize is the
size of the maximal sized set in C, and k is the number of sets in the optimal collection. Part
(c) follows.
Q3. Let CLef tend denote the value of CLef t at the end of the algorithm. Whenever a literal
` is set true in the loop, let n` denote the number of clauses which get satisfied due to ` being
set true in the corresponding while loop. Thus, if ` occurs in CLef tend , then the number of
occurences of ` in CLef tend is at most n` . (Since this is the property ensured by the algorithm
when making ` true). It follows that the number of clauses which are satisfied is at least the
number of literals left in CLEF Tend . If each clause has at least k literals, then k ∗ |CLEF Tend | ≤
number of clauses satisfied. Thus, the number of clauses satisfied is at least k/(k + 1) of the
number of clauses. As the optimal algorithm can at best satisfy all the clauses, we have our
result.