







Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!








Significance.^ n^ Quintessential tool for optimal allocation of scarce resources,among a number of competing activities.^ n^ Powerful model generalizes many classic problems:^ –
shortest path, max flow, multicommodity flow, MST, matching,2-person zero sum games n Ranked among most important scientific advances of 20
th^ century.
-^ accounts for a major proportion of all scientific computation n Helps find "good" solutions to NP-hard optimization problems. –^ optimal solutions (branch-and-cut) –^ provably good solutions (randomized rounding)
3
Small brewery produces ale and beer.^ n^ Production limited by scarce resources: corn, hops, barley malt.^ n^ Recipes for ale and beer require different proportions of resources.How can brewer maximize profits?^ n^ Devote all resources to beer: 32 barrels of beer
n^ Devote all resources to ale: 34 barrels of ale
n^ 7½ barrels of ale, 29½ barrels of beer
n^ 12 barrels of ale, 28 barrels of beer
Beverage
Corn(pounds)
Malt(pounds) Hops(ounces)
Beer
Ale^
Profit($)^1323
Quantity
(^5) t. s.
max
5
Ale
Beer
Corn 5A + 15B
Hops (0, 0) 4A + 4B
Malt 35A + 20B
Ale
Beer
7
Ale
Beer
Extreme points
Brewery problem observation.
Regardless of coefficients of linear
objective function, there exists an optimal solution that is an extremepoint.
LP "standard" form.^ n^ Input data: rational numbers c
, b^ , aji
.ij^
n^ Maximize linear objective function. n^ Subject to linear inequalities.
nj
x
mi b xc xa j
i n j
jij n j
jj
∑= ∑=
max t.s. (P)
(^11)
-^ x
Docsity.com
13
Primal problem. Find a lower bound on optimal value.^ n^ (x
, x^ , x 12
, x^ ) = (0, 0, 1, 0) 34
⇒^ z*
n^ (x^1
, x^ , x^2
, x^ ) = (2, 1, 1, 1/3) 34
z*^
n^ (x^1
, x^ , x^2
, x^ ) = (3, 0, 2, 0) 34
⇒^ z*
n^ (x^1
, x^ , x^2
, x^ ) = (0, 14, 0, 5) 34
z*^
t.s.
max
4 3 2 1
4 3 2 1
4 3 2 1
4 3 2 1
4 3 2 1
x x x x
x x x x
x x x x
x x x x
x x x x
Primal problem. Find an upper bound on optimal value.^ n^ Multiply 2
nd^ inequality by 2: 10x
2x 1
6x 2
16x 3
⇒^ z*
= 4x
x^1
5x
3x 3
≤^ 10x 4
2x 1
6x^2
16x^3
n^ Adding 2
nd^ and 3
rd^ inequalities: 4x
3x 1
6x 2
3x 3
⇒^ z*
= 4x
x^1
5x
3x 3
≤^ 4x 4
3x 1
6x 2
3x 3
t.s.
max
4 3 2 1
4 3 2 1
4 3 2 1
4 3 2 1
4 3 2 1
x x x x
x x x x
x x x x
x x x x
x x x x
15
Primal problem. Find an upper bound on optimal value.^ n^ Adding 11 times 1
st^ inequality to 6 times 3
rd^ inequality:
⇒^ z*
= 4x
x^1
5x
3x 3
≤^ 5x 4
x^1
7x
3x 3
Recall.^ n^ (x
, x^ , x 12
, x^ ) = (0, 14, 0, 5) 34
z*^
t.s.
max
4 3 2 1
4 3 2 1
4 3 2 1
4 3 2 1
4 3 2 1
x x x x
x x x x
x x x x
x x x x
x x x x
Primal problem. General idea: add linear combination (y
, y, y 12
) of the constraints. 3
Dual problem.
t.s.
max
4 3 2 1
4 3 2 1
4 3 2 1
4 3 2 1
4 3 2 1
x x x x
x x x x
x x x x
x x x x
x x x x
3 2 1 (^43) 2 1 (^33) 2 1
(^23) (^21) (^13) 2 1
y y y xy y y xy y y
xy yy xy y y
t.s.
min
3 2 1
3 2 1
3 2 1
3 2 1
3 2 1
3 2 1
y y y
y y y
y y y
y y y
y y y
y y y
Docsity.com
17
nj
x
mi b xc xa j
i n j
jij n j
jj
∑= ∑=
max t.s. (P)
(^11)
mi
y
nj c yb ya i
j m i
iij m i
ii
∑= ∑=
min t.s. (D)
(^11)
Primal and dual linear programs: given rational numbers a
, b^ , cij^ i^
, findj^
values x
, ythat optimize (P) and (D).i^ j^ Duality Theorem (Gale-Kuhn-Tucker 1951, Dantzig-von Neumann 1947).If (P) and (D) are nonempty then max = min.^ n^ Dual solution provides certificate of optimality
decision version
∩^ co-NP.
n^ Special case: max-flow min-cut theorem. n^ Sensitivity analysis.
Brewer’s problem: find optimal mix of beer and ale to maximize profits.Entrepreneur’s problem:
Buy individual resources from brewer at
minimum cost.^ n^ C, H, M = unit price for corn, hops, malt.^ n^ Brewer won’t agree to sell resources if 5C + 4H + 35M < 13.
(^5) t. s.
max (P)
t.s.
min (D)
19
Sensitivity analysis.^ n^ How much should brewer be willing to pay (marginal price) foradditional supplies of scarce resources?
3 corn $1, hops $2, malt $0. n^ Suppose a new product "light beer" is proposed. It requires 2 corn,5 hops, 24 malt. How much profit must be obtained from light beerto justify diverting resources from production of beer and ale?
3 At least 2 ($1) + 5 ($2) + 24 (0$) = $12 / barrel.
Standard form. Easy to handle variants.^ n^ x + 2y - 3z
⇒^ -x - 2y + 3z
n^ x + 2y - 3z = 17
⇒^ x + 2y - 3z
-x - 2y + 3z
n^ min x + 2y - 3z
⇒^ max -x - 2y + 3z.
n^ x unrestricted
⇒^ x = y - z,
y^ ≥^
0, z^ ≥
nj
x
mi b xc xa j
i n j
jij n j
jj
∑= ∑=
max t.s. (P)
(^11)
Docsity.com
25
Multicommodity flow. Given a network G = (V, E) with edge capacitiesu(e)^ ≥
0, edge costs c(e)
≥^ 0, set of commodities K, and supply /
demand d
k (v) for commodity k at node v, find a minimum cost flow that satisfies all of the demand.Applications.^ n^ Transportation networks.^ n^ Communication networks (Akamai).^ n^ Solving Ax =b with Gaussian elimination, preserving sparsity.^ n^ VLSI design.
k
k v e
k k ve
Ee
k k Kk
∈∈ ∈∈
ofout toin
Weighted vertex cover. Given an undirected graph G = (V, E) withvertex weights w
≥^ 0, find a minimum weight subset of nodes S suchv^
that every edge is incident to at least one vertex in S.^ n^ NP-hard even if all weights are 1.Integer programming formulation.^ n^ If x* is optimal solution to (ILP),then S = {v
∈^ V :x*
= 1} is a minv^
weight vertex cover.
3
(^6710)
A E
H
B D^
I
C
F G J
Total weight = 55.
v
w Vv v
vv
27
INTEGER-PROGRAMMING: Given rational numbers a
, b, cij^ i
, findj
integers x
that solve:j^ Claim. INTEGER-PROGRAMMING is NP-hard.Proof. VERTEX-COVER
i n j
jij n j
jj
(^11)
w v v vVv v
Linear programming relaxation.^ n^ Note: optimal value of (LP) is
≤^ optimal value of (ILP), and may be
strictly less.^ –^ clique on n nodes requires n-1nodes in vertex cover^ –^ LP solution x* = ½ has value n / 2 n Provides lower bound for approximation algorithm. n How can solving LP help us find good vertex cover?^3
Round fractional values.
Vv v
vv
Docsity.com
29
Theorem. If x* is optimal solution to (LP), then S = {v
x*^ v^
≥^ ½} is
a vertex cover within a factor of 2 of the best possible.^ n^ Provides 2-approximation algorithm.^ n^ Solve LP, and then round.S is a vertex cover.^ n^ Consider an edge (v,w)
n^ Since x*
≥^ w 1, either x*
or x*v
≥^ w
(v,w) covered.
S has small cost.^ n^ Let S* be optimal vertex cover.
∑ ∑^ ∑ ∑
∈ ∈ ∈ ∈
vvVv vvSv v Sv
vSv
xw xw w
w
12
LP is relaxationx*
≥^ ½v
Good news.^ n^ 2-approximation algorithm is basis for most practical heuristics.^ –
can solve LP with min cut
faster
-^ primal-dual schema
linear time 2-approximation
n^ PTAS for planar graphs. n^ Solvable on bipartite graphs using network flow.Bad news. n^ NP-hard even on 3-regular planar graphs with unit weights. n^ If P
≠^ NP, then no
ρ-approximation for
ρ^ < 4/3, even with unit
weights.
(Dinur-Safra, 2001)
31
MAX-SAT: Given clauses C
in CNF over Boolean variablesm
x^ , x^12
,... x
, and integer weights wn^
≥^ 0 for each clause, find a truthj^
assignment for the x
that maximizes the total weight of clausesi^
satisfied.^ n^ NP-hard even if all weights are 1.^ n^ Ex.
2 1 5
4 2 1 4
3 3 2 1 3
2 3 2 2
1 3 2 1
w x x C
w x x C
w x x x C
w x x C
w x x C
x^ = 0^1 x^ = 0^2 x^ = 1^3 weight = 14
random()
call in unit time.
n^ Polynomial algorithm A with one-sided error:^ –^
if x is YES instance: Pr[A(x) = YES]
-^ if x is NO instance:
Pr[A(x) = YES] = 0
n^ Fundamental open question: does P = RP?Johnson’s Algorithm: Flip a coin, and set each variable true withprobability ½, independently for each variable.Theorem: The "dumb" algorithm is a 2-approximation for MAX-SAT.
Docsity.com
37
1
(^1) ) (^1) (
satisfied]is clausePr[
) (
) (^
j z
j
z
z
j j j j j − ≥
l^ l l l
(1-1/x)
x^ converges to e
) (^1) ( l (^) −l
) (^1) (
z
zf
l −l −=
l ) l (^
z
1 - (1 - z* /
l^ l ) is concave
je
j^
OPT OPT
C zw w WE
e
LP m j e
jj m j e
j j ) 1 (
satisfiedis clausePr[
][
(^111)
1 1 − ≥
∑ ∑
39
Observation. Two approximation algorithms are complementary.^ n^ Johnson’s algorithm works best when clauses are long.^ n^ LP rounding algorithm works best when clauses are short.How can we exploit this?^ n^ Run both algorithms and output better of two.^ n^ Re-analyze to get 4/3-approximation algorithm.^ n^ Better performance than either algorithm individually!
(^1) (x,
Johnson(C
)m
(^2) (x,
LPround(C
)m
RETURN x
1
ELSERETURN x
2 Best-of-Two (
) m
Theorem (Goemans-Williamson, 1994). The Best-of-Two algorithm isa 4/3-approximation algorithm for MAX-SAT.Proof.
3434
*** 32 12**
1**
12 12 12 12
(^212) (^112)
(^21)
) (^1) ( )(
j^ LP
j j^ j
j
j^ j
j
j^ j
j j
j j
j
−^
l l
l
next slide
41
Lemma. For any integer
l^ ≥^ 1,
Proof.^ n^ Case 1 (
l^ = 1): n^ Case 2 (
l^ = 2): n^ Case 3 (
l^ ≥^ 3):
*** 32
1**
1 2
) (^1) ( )(
j j^
l− l
l.
1
12
j j
z z^ ≥+
j j
z z^ ≥+
***** (^5788) *** 32**
*** 1** (^312)
1**
1 2
) )(
) (^1) ( )(
j j
je
j
l− l
l
Observation. Can’t get better than 4/3-approximation using our LP.^ n^ If all weights = 1, OPT
= 4 but OPT = 3.LP^
Lower bound.^ n^ Unless P = NP, can’t do better than 8 / 7
Semi-definite programming.^ n^ 1.275-approximation algorithm.^ n^ 1.2-approximation algorithmif certain conjecture is true.Open research problem.^ n^ 4 / 3 - approximation algorithmwithout solving LP or SDP.
2 1 4
2 1 3
2 1 2
2 1 1
x x C
x x C
x x C
x x C
i i^
C, X, B, A
∈^ SR(ni
×^ n)
f^ positive semi-definite
ij nn ijj (^) i
==^11
T T
LP Duality Theorem. For A
m ∈ ℜ ×n^ , b
m ∈ ℜ , c^ ∈ ℜ
n,
if (P) and (D) are nonempty then max = min.
LP Weak Duality. For A
m ∈ ℜ ×n^ , b
m ∈ ℜ , c^ ∈ ℜ
n, if (P) and (D) are
nonempty, then max
≤^ min.
Proof (easy).^ n^ Suppose x
m ∈ ℜ is feasible for (P) and y
n ∈ ℜ is feasible for (D).
-^ x^ ≥
0, y
c^
⇒^ y
T^ Ax^
T^ ≥ cx.
-^ y^ ≥^
0, Ax
≤^ b^
⇒^ y
T^ Ax^
T^ ≤ yb
-^ combining two inequalities: c
T^ x^ ≤^
T^ yAx ≤^ y
T^ b
T T
49
Corollary. For A
m ∈ ℜ ×n^ , b
m ∈ ℜ exactly one of the following two
systems holds. Proof.^ n^ Define A’
m ∈ ℜ ×^ (m+n)
= [A | I ], x’ = [x | s ], where s
m ∈ ℜ
n^ Farkas’ Theorem to A’, b’: exactly one of (I’) and (II’) is feasible. n^ (I’) equivalent to (I), (II’) equivalent to (II).
n
t.s. (II)
Ay by^ y y
T T m
m n
T T m
LP Duality Theorem. For A
m ∈ ℜ ×n^ , b
m ∈ ℜ , c^ ∈ ℜ
n, if (P) and (D) are
nonempty then max = min.Proof (max
≤^ min). Weak LP duality. Proof (min
≤^ max). Suppose max <
α. We show min <
α.
n^ By definition of
α, (I) infeasible
T T
T n
t.s. , (II)
z zy czAy by
z y^
T T m
α
51
Let^
irhyvDD Case 1: z = 0.^ n^ Then, { y
m ∈ ℜ T^ : yA
≥^ 0, y
T^ b <0,y
≥^ 0 } is feasible.
n^ Farkas Corollary
⇒^ { x
n ∈ ℜ : Ax
≤^ b, x
≥^ 0 } is infeasible.
n^ Contradiction since by assumption (P) is nonempty.Case 2: z > 0. n^ Scale
uh hvsvrDDhq
n^ Resulting
srhviyr9hq
T^ b < α.
t.s. , (II)
z zy czAy by
z y^
T T m^
α
Docsity.com