political problem suppose a politician trying to win an election 3 types of areas --- urban,...
Post on 18-Dec-2015
212 Views
Preview:
TRANSCRIPT
Political problemSuppose a politician trying to win an election
3 types of areas --- urban, suburban, rural.
Certain issues --- road, gun control, farm subsidies, gasoline tax.
Try to find out the minimum amount of money you need to win 50,000 urban, 100,000 suburban, 25,000 rural votes.
Policy urban suburban rural
Build roads -2 5 3
Gun control 8 2 -5
Farm subsidies 0 0 10
Gasoline tax 10 0 -2
The effects of policies on votes.
4 variables :
x1 is the # of thousands of dollars on advertising on building roads.
x2 is the # of thousands of dollars on advertising on gun control.
x3 is the # of thousands of dollars on advertising on farm subsidies.
x4 is the # of thousands of dollars on advertising on gasoline tax.
We format this problem as:
Minimize: x1 + x2 + x3 + x4
Subject to: -2x1 + 8x2 + 0x3 + 10x4 50
5x1 + 2x2 + 0x3 + 0x4 50
3x1 + 5x2 + 10x3 + 2x4 50
x1, x2, x3, x4 0
The solution of this liner program will yield an optimal strategy for the politician.
An overview of liner programming:
Two forms: standard and slack.
Linear program with two variables:
Maximize x1 + x2
Subject to: 4x1 - x2 8
2x1 + x2 10
5x1 - 2x2 -2
x1, x2 0
Feasible solution : if x1 and x2 satisfies all the constraints.
Formulating problems as linear programs
• Shortest paths:
minimize d[t]
subject to: d[v] d[u] + w( u, v ) for each (u, v) E.
d[s] = 0.
• Maximum flow:
maximize f[s,v]
subject to: f[u,v] c[u,v] for each u, v V,
f[u,v] = -f[v,u] for each u, v V,
f[u,v] = 0 for each u V – {s,t}.
Minimum-cost-flow problem
s
x
y
t
c=5
a=2
c=2
a=7
c=4
a=1
c=2
a=5
c=1
a=3
An example of minimum cost flow problem.
s
x
y
t
2/5
a=2
3/4
a=1
2/2
a=5
1/1
a=3
A solution to minimum cost flow problem.
1/2
a=7
Linear Programming (LP)
• Vector Form
Maximize: cx
Subject to : Ax b
c = (c1, c2, …, cn)
x = b =
A =
• Summation FormMaximize: cixi
Subject to: a1ixi b1
a2ixi b2
.
.
amixi bm
x1
.
.xn
b1
.
.bn
a11 … a1n
…………
an1 … amn
Example LP
n = 2; m = 4
x1 + x2 max
x1 0 (-1)x1 + 0x2 0
x2 0 0x1 + (-1)x2 0
x1 5 (-1)x1 + 0x2 5
x2 6 0x1 + 1x2 6
c = (1, 1) b =
A =
• Optimal solution is the unique point of intersection of the objective with the hyperplane feasible polytope.
x2
optimal solution x1 = 5 ; x2 = 6
objective:
x1 + x2 = 11
x1
0056
-1 00 -11 0
0 1
Feasible solutionregion
Integer Linear Programming (ILP)
• Vector Form
Maximize: cx
Subject to : Ax b
and x {0,1}
c = (c1, c2, …, cn)
x = b =
A =
• Summation FormMaximize: cixi
Subject to: a1ixi b1
a2ixi b2
.
. amixi bm
and x {0,1}
x1
.
.xn
b1
.
.bn
a11 … a1n
…………
an1 … amn
ILP for MIS
• Maximum Independent Set (MIS)
- Find the maximum subset of nodes in graph G = (V, E) which are pairwise non-adjacent
• ILP
- For any v V make a variable xv {0, 1}
xv = 0 v MIS which means 0 is not chosen
xv = 1 v MIS which means 1 is chosen - Maximize vV xv
Subject to: e = (u, v) V, xu + xv 1
Example ILP of MIS
• Max: x1 + x2 + x3 + x4 + x5 + x6
subject to: x1 + x6 1 x1 + x2 1 x2 + x3 1 x3 + x6 1 x3 + x5 1 x6 + x5 1 x3 + x4 1 x4 + x5 1
and x1, x2,…, x6 {0,1}
• Graph12
3
4 5
6
ILP for MaxClique
• ILP
- xi max
- Subject to:
xi + xj 1 (i, j) E
• MaxClique
- Given G = (V, E)
- Find
X V x, x’ X
(x, x’) E
|X| max
ILP for Matching
• Matching- Given G = (V, E)
- Find X E e, e’ X
e and e’ don’t share endpoint.
|X| max
• ILP- for any e E xe {0, 1}
+ 0 is not in matching
+ 1 is in matching
- eE xe max
- Subject to:
e incident to V xe 1 v V
e2 xe1 + xe2 + xe3 1
only one edge from
e1 e3 matching can be
incident to vv
LP relaxation (LPR) vs. ILP
LP relaxation (LPR) for MAX independent set problem (MISP) gives larger value than the maximum size of independent set.
• MISP
xi max, i V
xi + xj 1, for each edge (xi,xj) E
xi {0, 1}
• LPR
xi max, i V
xi + xj 1, for each edge (xi,xj) E
0 xi 1
Example 1 of ILP vs. LPR
xi maxx1 +x6 1
x1 +x2 1
x5 +x6 1
x5 +x2 1
x5 +x4 1
x4 +x3 1
x4 +x2 1
x2 +x3 1
• ILP
x1 = x3 = x5 = 1
xi = 3
• LPR xi = ½
xi = 3
12
3
4
5
6
MISP Integrality Gap
• x1 +x2 + x3 maxx1 +x2 1x1 +x3 1x2 +x3 1
0 x1 10 x2 10 x3 1LPR () 3/2
Implies LPR () = 3/2So x1 = x2 = x3 = ½ LPR () 3/2 ILP () = 1
Integrality Gap (IG) = LPR / ILP = 3/2
• What is the integrality gap for (MISP)For a complete graph
ILP (Kn) = 1
LPR (Kn) = n/2
Integrality Gap (IG) = LPR / ILP
Integrality gap may be as large as n/2
1
2
3
LPR vs. ILP
LP relaxation (LPR) for Minimum Vertex Cover problem (MVCP) gives smaller value than the minimum size of vertex cover
• MVCP
xi min, i V
xi + xj 1, for each e= (xi,xj) E
xi {0, 1}
• LPR
xi min , i V
xi + xj 1, for each e= (xi,xj) E
0 xi 1
MVCP Integrality Gap
• x1 +x2 + x3 minx1 +x2 1
x1 +x3 1
x2 +x3 1
0 x1 10 x2 10 x3 1
LPR () 3/2
Implies LPR () = 3/2So x1 = x2 = x3 = ½ LPR () 3/2 ILP () = 2Integrality Gap (IG) = ILP / LPR = 4/3
• What is the integrality gap for (MVCP)For a complete graph
ILP (Kn) = n - 1
LPR (Kn) = n/2
Integrality Gap (IG) = ILP / LPR
Integrality gap may be as large as 2 – (2 / n)
For more information:
http://www-unix.mcs.anl.gov/otc/Guide/faq/linear-programming-faq.html
1
2
3
top related