Presentation is loading. Please wait.

Presentation is loading. Please wait.

Political problem Suppose a politician trying to win an election 3 types of areas --- urban, suburban, rural. Certain issues --- road, gun control, farm.

Similar presentations


Presentation on theme: "Political problem Suppose a politician trying to win an election 3 types of areas --- urban, suburban, rural. Certain issues --- road, gun control, farm."— Presentation transcript:

1 Political problem Suppose 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. Policyurban 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.

2 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.

3 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.

4 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}.

5 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

6 Linear Programming (LP) Vector Form Maximize: cx Subject to : Ax  b c = (c 1, c 2, …, c n ) x = b = A = Summation Form Maximize:  c i x i Subject to:  a 1i x i  b 1  a 2i x i  b 2.  a mi x i  b m x1..xnx1..xn b1..bnb1..bn a 11 … a 1n …… a n1 … a mn

7 Example LP n = 2; m = 4 x 1 + x 2  max x 1  0 (-1)x 1 + 0x 2  0 x 2  0 0x 1 + (-1)x 2  0 x 1  5 (-1)x 1 + 0x 2  5 x 2  6 0x 1 + 1x 2  6 c = (1, 1) b = A = Optimal solution is the unique point of intersection of the objective with the hyperplane feasible polytope. x 2 optimal solution x 1 = 5 ; x 2 = 6 objective: x 1 + x 2 = 11 x 1 00560056 -1 0 0 -1 1 0 0 1 Feasible solution region

8 Integer Linear Programming (ILP) Vector Form Maximize: cx Subject to : Ax  b and x  {0,1} c = (c 1, c 2, …, c n ) x = b = A = Summation Form Maximize:  c i x i Subject to:  a 1i x i  b 1  a 2i x i  b 2.  a mi x i  b m and x  {0,1} x1..xnx1..xn b1..bnb1..bn a 11 … a 1n …… a n1 … a mn

9 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 x v  {0, 1} x v = 0  v  MIS which means 0 is not chosen x v = 1  v  MIS which means 1 is chosen - Maximize  v  V x v Subject to:  e = (u, v)  V, x u + x v  1

10 Example ILP of MIS Max: x 1 + x 2 + x 3 + x 4 + x 5 + x 6 subject to: x 1 + x 6  1 x 1 + x 2  1 x 2 + x 3  1 x 3 + x 6  1 x 3 + x 5  1 x 6 + x 5  1 x 3 + x 4  1 x 4 + x 5  1 and x 1, x 2,…, x 6  {0,1} Graph 12 3 4 5 6

11 ILP for MaxClique ILP -  x i  max - Subject to: x i + x j  1  (i, j)  E MaxClique - Given G = (V, E) - Find X  V  x, x’  X (x, x’)  E |X|  max

12 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 x e  {0, 1} + 0 is not in matching + 1 is in matching -  e  E x e  max - Subject to:  e incident to V x e  1  v  V e 2 x e 1 + x e 2 + x e 3  1 only one edge from e 1 e 3 matching can be incident to v v

13 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  x i  max, i  V x i + x j  1, for each edge (x i,x j )  E x i  {0, 1} LPR  x i  max, i  V x i + x j  1, for each edge (x i,x j )  E 0  x i  1

14 Example 1 of ILP vs. LPR  x i  max x 1 +x 6  1 x 1 +x 2  1 x 5 +x 6  1 x 5 +x 2  1 x 5 +x 4  1 x 4 +x 3  1 x 4 +x 2  1 x 2 +x 3  1 ILP x 1 = x 3 = x 5 = 1  x i = 3 LPR x i = ½  x i = 3 1 2 3 4 5 6

15 MISP Integrality Gap x 1 +x 2 + x 3  max x 1 +x 2  1 x 1 +x 3  1 x 2 +x 3  1 0  x 1  1 0  x 2  1 0  x 3  1 LPR (  )  3/2 Implies LPR (  ) = 3/2 So x 1 = x 2 = x 3 = ½  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

16 LPR vs. ILP LP relaxation (LPR) for Minimum Vertex Cover problem (MVCP) gives smaller value than the minimum size of vertex cover MVCP  x i  min, i  V x i + x j  1, for each e= (x i,x j )  E x i  {0, 1} LPR  x i  min, i  V x i + x j  1, for each e= (x i,x j )  E 0  x i  1

17 MVCP Integrality Gap x 1 +x 2 + x 3  min x 1 +x 2  1 x 1 +x 3  1 x 2 +x 3  1 0  x 1  1 0  x 2  1 0  x 3  1 LPR (  )  3/2 Implies LPR (  ) = 3/2 So x 1 = x 2 = x 3 = ½  LPR (  )  3/2 ILP (  ) = 2 Integrality 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/lin ear-programming-faq.html 1 2 3


Download ppt "Political problem Suppose a politician trying to win an election 3 types of areas --- urban, suburban, rural. Certain issues --- road, gun control, farm."

Similar presentations


Ads by Google