Approximation Algorithms
description
Transcript of Approximation Algorithms
![Page 1: Approximation Algorithms](https://reader036.fdocuments.net/reader036/viewer/2022062323/56815b17550346895dc8c78c/html5/thumbnails/1.jpg)
Approximation Algorithms
Duality
My T. Thai @ UF
![Page 2: Approximation Algorithms](https://reader036.fdocuments.net/reader036/viewer/2022062323/56815b17550346895dc8c78c/html5/thumbnails/2.jpg)
My T. [email protected]
2
Duality
Given a primal problem:P: min cTx subject to Ax ≥ b, x ≥ 0
The dual is:D: max bTy subject to ATy ≤ c, y ≥ 0
![Page 3: Approximation Algorithms](https://reader036.fdocuments.net/reader036/viewer/2022062323/56815b17550346895dc8c78c/html5/thumbnails/3.jpg)
My T. [email protected]
3
An Example
0,
53
12
75 subject to
610max :D
0,,
625
103 subject to
57min :P
21
21
21
21
21
321
321
321
321
yy
yy
yy
yy
yy
xxx
xxx
xxx
xxx
![Page 4: Approximation Algorithms](https://reader036.fdocuments.net/reader036/viewer/2022062323/56815b17550346895dc8c78c/html5/thumbnails/4.jpg)
My T. [email protected]
4
Weak Duality Theorem
Weak duality Theorem:
Let x and y be the feasible solutions for P and D respectively, then:
Proof: Follows immediately from the constraints
ybbyAxyxyAxc TTTTTT )(
![Page 5: Approximation Algorithms](https://reader036.fdocuments.net/reader036/viewer/2022062323/56815b17550346895dc8c78c/html5/thumbnails/5.jpg)
My T. [email protected]
5
Weak Duality Theorem
This theorem is very useful Suppose there is a feasible solution y to D.
Then any feasible solution of P has value lower bounded by bTy. This means that if P has a feasible solution, then it has an optimal solution
Reversing argument is also true Therefore, if both P and D have feasible
solutions, then both must have an optimal solution.
![Page 6: Approximation Algorithms](https://reader036.fdocuments.net/reader036/viewer/2022062323/56815b17550346895dc8c78c/html5/thumbnails/6.jpg)
My T. [email protected]
6
Hidden Message
≥
Strong Duality Theorem: If the primal P has an optimal solution x* then the dual D has an optimal solution y* such that:
cTx* = bTy*
![Page 7: Approximation Algorithms](https://reader036.fdocuments.net/reader036/viewer/2022062323/56815b17550346895dc8c78c/html5/thumbnails/7.jpg)
My T. [email protected]
7
Complementary Slackness
Theorem:
Let x and y be primal and dual feasible solutions
respectively. Then x and y are both optimal iff two
of the following conditions are satisfied:
(ATy – c)j xj = 0 for all j = 1…n
(Ax – b)i yi = 0 for all i = 1…m
![Page 8: Approximation Algorithms](https://reader036.fdocuments.net/reader036/viewer/2022062323/56815b17550346895dc8c78c/html5/thumbnails/8.jpg)
My T. [email protected]
8
Proof of Complementary Slackness
Proof:
As in the proof of the weak duality theorem, we
have: cTx ≥(ATy)Tx = yTAx ≥ yTb (1)
From the strong duality theorem, we have:
(2)
(3)
![Page 9: Approximation Algorithms](https://reader036.fdocuments.net/reader036/viewer/2022062323/56815b17550346895dc8c78c/html5/thumbnails/9.jpg)
My T. [email protected]
9
Proof (cont)
Note that
and
We have:
x and y optimal (2) and (3) hold
both sums (4) and (5) are zero
all terms in both sums are zero (?)
Complementary slackness holds
jj
n
j
Tjj
n
j
TTTT xcyAxcAyxcAy
11
)()()( (4)
ii
m
i
T yAxbAxby
1
)()( (5)
![Page 10: Approximation Algorithms](https://reader036.fdocuments.net/reader036/viewer/2022062323/56815b17550346895dc8c78c/html5/thumbnails/10.jpg)
My T. [email protected]
10
Why do we care?
It’s an easy way to check whether a pair of primal/dual feasible solutions are optimal
Given one optimal solution, complementary slackness makes it easy to find the optimal solution of the dual problem
May provide a simpler way to solve the primal
![Page 13: Approximation Algorithms](https://reader036.fdocuments.net/reader036/viewer/2022062323/56815b17550346895dc8c78c/html5/thumbnails/13.jpg)
My T. [email protected]
13
Max Flow in a Network
Definition: Given a directed graph G=(V,E) with two distinguished nodes, source s and sink t, a positive capacity function c: E → R+, find the maximum amount of flow that can be sent from s to t, subject to:
1. Capacity constraint: for each arc (i,j), the flow sent through (i,j), fij bounded by its capacity cij
2. Flow conservation: at each node i, other than s and t, the total flow into i should equal to the total flow out of i
![Page 14: Approximation Algorithms](https://reader036.fdocuments.net/reader036/viewer/2022062323/56815b17550346895dc8c78c/html5/thumbnails/14.jpg)
My T. [email protected]
14
An Example
st
4
3 4
3
2
3
2
3
2 3
1
5
2
4
2
3
4
1
1
3
2
0
0
1
1
4
3
1
2
0
0
0
![Page 15: Approximation Algorithms](https://reader036.fdocuments.net/reader036/viewer/2022062323/56815b17550346895dc8c78c/html5/thumbnails/15.jpg)
My T. [email protected]
15
Formulate Max Flow as an LP
Capacity constraints: 0 ≤ fij ≤ cij for all (i,j)
Conservation constraints:
We have the following:
},{),(: ),(:
tsViffEijj Ejij
jiji
0
},{0
),(.
max
),(: ),(:
),(:
ij
Eijj Ejijjiji
ijij
sjEjsj
f
tsViff
Ejicfst
f
![Page 16: Approximation Algorithms](https://reader036.fdocuments.net/reader036/viewer/2022062323/56815b17550346895dc8c78c/html5/thumbnails/16.jpg)
My T. [email protected]
16
LP Formulation (cont)
st
4
3 4
3
2
3
2
3
2 3
1
5
2
4
2
3
4
1
1
3
2
0
0
1
1
4
3
1
2
0
0
0
∞
![Page 17: Approximation Algorithms](https://reader036.fdocuments.net/reader036/viewer/2022062323/56815b17550346895dc8c78c/html5/thumbnails/17.jpg)
My T. [email protected]
17
LP Formulation (cont)
Ejif
Viff
Ejicfst
f
ij
Eijj Ejijjiji
ijij
ts
),(0
0
),(.
max
),(: ),(:
Vip
Ejid
pp
Ejippdst
dc
Dual
i
ij
ts
jiij
Ejiijij
0
),(0
1
),(0.
min
:
),(
![Page 18: Approximation Algorithms](https://reader036.fdocuments.net/reader036/viewer/2022062323/56815b17550346895dc8c78c/html5/thumbnails/18.jpg)
My T. [email protected]
18
Min Cut
____
__
__
to from going arcs of capacities of sum :),(
,such that
, sets twointo nodes thepartition :cut
XXXXc
XtXs
XXts
• Capacity of any s-t cut is an upper bound on any feasible flow
• If the capacity of an s-t cut is equal to the value of a maximum flow, then that cut is a minimum cut
![Page 19: Approximation Algorithms](https://reader036.fdocuments.net/reader036/viewer/2022062323/56815b17550346895dc8c78c/html5/thumbnails/19.jpg)
My T. [email protected]
19
Max Flow and Min Cut
Vip
Ejid
pp
Ejippdst
dc
Dual
i
ij
ts
jiij
Ejiijij
0
),(0
1
),(0.
min
:
),(
Vip
Ejid
pp
Ejippdst
dc
i
ij
ts
jiij
Ejiijij
}1,0{
),(}1,0{
1
),(0.
min
:ProgramInteger toTransform
),(
![Page 20: Approximation Algorithms](https://reader036.fdocuments.net/reader036/viewer/2022062323/56815b17550346895dc8c78c/html5/thumbnails/20.jpg)
My T. [email protected]
20
Solutions of IP
Consider:
Let (d*,p*) be the optimal solution to this IP. Then: ps* = 1 and pt* = 0. So define X = {pi | pi = 1} and
X = {pi | pi = 0}. Then we can find the s-t cut dij* =1. So for i in X and j in X, define dij = 1, otherwise
dij = 0. Then the object function is equal to the minimum s-t cut
Vip
Ejid
pp
Ejippdst
dc
i
ij
ts
jiij
Ejiijij
}1,0{
),(}1,0{
1
),(0.
min),(
![Page 21: Approximation Algorithms](https://reader036.fdocuments.net/reader036/viewer/2022062323/56815b17550346895dc8c78c/html5/thumbnails/21.jpg)
My T. [email protected]
21
LP-relaxation
Relax the integrality constraints of the previous IP, we will obtain the previous dual.
![Page 22: Approximation Algorithms](https://reader036.fdocuments.net/reader036/viewer/2022062323/56815b17550346895dc8c78c/html5/thumbnails/22.jpg)
My T. [email protected]
22
Design Techniques
Many combinatorial optimization problems can be stated as IP
Using LP-relaxation techniques, we obtain LP The feasible solutions of the LP-relaxation is a
factional solution to the original. However, we are interested in finding a near-optimal integral solution: Rounding Techniques Primal-dual Schema
![Page 23: Approximation Algorithms](https://reader036.fdocuments.net/reader036/viewer/2022062323/56815b17550346895dc8c78c/html5/thumbnails/23.jpg)
My T. [email protected]
23
Rounding Techniques
Solve the LP and convert the obtained fractional solution to an integral solution: Deterministic Probabilistic (randomized rounding)
![Page 24: Approximation Algorithms](https://reader036.fdocuments.net/reader036/viewer/2022062323/56815b17550346895dc8c78c/html5/thumbnails/24.jpg)
My T. [email protected]
24
Primal-Dual Schema
An integral solution of LP-relaxation and a feasible solution to the dual program are constructed iteratively
Any feasible solution of the dual also provides the lower bound of OPT
Comparing the two solutions will establish the approximation guarantee