III. Linear Programming
|
|
- Darren Gordon
- 5 years ago
- Views:
Transcription
1 III. Linear Programming Thomas Sauerwald Easter 2017
2 Outline Introduction Standard and Slack Forms Formulating Problems as Linear Programs Simplex Algorithm Finding an Initial Solution III. Linear Programming Introduction 2
3 Introduction Linear Programming (informal definition) maximize or minimize an objective, given limited resources and competing constraint constraints are specified as (in)equalities Example: Political Advertising Imagine you are a politician trying to win an election Your district has three different types of areas: Urban, suburban and rural, each with, respectively, 100,000, 200,000 and 50,000 registered voters Aim: at least half of the registered voters in each of the three regions should vote for you Possible Actions: Advertise on one of the primary issues which are (i) building more roads, (ii) gun control, (iii) farm subsidies and (iv) a gasoline tax dedicated to improve public transit. III. Linear Programming Introduction 3
4 Political Advertising Continued policy urban suburban rural build roads gun control farm subsidies gasoline tax The effects of policies on voters. Each entry describes the number of thousands of voters who could be won (lost) over by spending $1,000 on advertising support of a policy on a particular issue. Possible Solution: $20,000 on advertising to building roads $0 on advertising to gun control $4,000 on advertising to farm subsidies $9,000 on advertising to a gasoline tax Total cost: $33,000 What is the best possible strategy? III. Linear Programming Introduction 4
5 Towards a Linear Program policy urban suburban rural build roads gun control farm subsidies gasoline tax The effects of policies on voters. Each entry describes the number of thousands of voters who could be won (lost) over by spending $1,000 on advertising support of a policy on a particular issue. x 1 = number of thousands of dollars spent on advertising on building roads x 2 = number of thousands of dollars spent on advertising on gun control x 3 = number of thousands of dollars spent on advertising on farm subsidies x 4 = number of thousands of dollars spent on advertising on gasoline tax Constraints: 2x 1 + 8x 2 + 0x x 4 50 Objective: Minimize x 5x 1 + 2x 2 + 0x 3 + 0x x 2 + x 3 + x 4 3x 1 5x x 3 2x 4 25 III. Linear Programming Introduction 5
6 The Linear Program Linear Program for the Advertising Problem minimize x 1 + x 2 + x 3 + x 4 subject to 2x 1 + 8x 2 + 0x x x 1 + 2x 2 + 0x 3 + 0x x 1 5x x 3 2x 4 25 x 1, x 2, x 3, x 4 0 The solution of this linear program yields the optimal advertising strategy. Formal Definition of Linear Program Given a 1, a 2,..., a n and a set of variables x 1, x 2,..., x n, a linear function f is defined by f (x 1, x 2,..., x n) = a 1 x 1 + a 2 x a nx n. Linear Equality: f (x 1, x 2,..., x n) = b Linear Inequality: f (x 1, x 2,..., x n) b Linear Constraints Linear-Progamming Problem: either minimize or maximize a linear function subject to a set of linear constraints III. Linear Programming Introduction 6
7 A Small(er) Example maximize x 1 + x 2 subject to 4x 1 x 2 8 2x 1 + x x 1 2x 2 2 x 1, x 2 0 x 1 0 x 2 5x 1 2x 2 2 4x 1 x 2 8 2x 1 + x 2 10 Any setting of x 1 and x 2 satisfying all constraints is a feasible solution x 2 0 x 1 III. Linear Programming Introduction 7.1
8 A Small(er) Example maximize x 1 + x 2 subject to 4x 1 x 2 8 2x 1 + x x 1 2x 2 2 x 1, x 2 0 x 2 x1 + x 2 = 8 x 1 0 5x 1 2x 2 2 4x 1 x 2 8 Graphical Procedure: Move the line x 1 + x 2 = z as far up as possible. 2x 1 + x 2 10 x 2 0 x 1 While the same approach also works for higher-dimensions, we need to take a more systematic and algebraic procedure. III. Linear Programming Introduction 7.2
9 Outline Introduction Standard and Slack Forms Formulating Problems as Linear Programs Simplex Algorithm Finding an Initial Solution III. Linear Programming Standard and Slack Forms 8
10 Standard and Slack Forms Standard Form maximize subject to n + m Constraints n c j x j Objective Function j=1 n a ij x j b i for i = 1, 2,..., m j=1 x j 0 for j = 1, 2,..., n Standard Form (Matrix-Vector-Notation) Non-Negativity Constraints maximize subject to c T x Inner product of two vectors Ax b Matrix-vector product x 0 III. Linear Programming Standard and Slack Forms 9
11 Converting Linear Programs into Standard Form Reasons for a LP not being in standard form: 1. The objective might be a minimization rather than maximization. 2. There might be variables without nonnegativity constraints. 3. There might be equality constraints. 4. There might be inequality constraints (with instead of ). Goal: Convert linear program into an equivalent program which is in standard form Equivalence: a correspondence (not necessarily a bijection) between solutions so that their objective values are identical. When switching from maximization to minimization, sign of objective value changes. III. Linear Programming Standard and Slack Forms 10
12 Converting into Standard Form (1/5) Reasons for a LP not being in standard form: 1. The objective might be a minimization rather than maximization. minimize 2x 1 + 3x 2 subject to x 1 + x 2 = 7 x 1 2x 2 4 x 1 0 Negate objective function maximize 2x 1 3x 2 subject to x 1 + x 2 = 7 x 1 2x 2 4 x 1 0 III. Linear Programming Standard and Slack Forms 11
13 Converting into Standard Form (2/5) Reasons for a LP not being in standard form: 2. There might be variables without nonnegativity constraints. maximize 2x 1 3x 2 subject to x 1 + x 2 = 7 x 1 2x 2 4 x 1 0 Replace x 2 by two non-negative variables x 2 and x 2 maximize 2x 1 3x 2 + 3x 2 subject to x 1 + x 2 x 2 = 7 x 1 2x 2 + 2x 2 4 x 1, x 2, x 2 0 III. Linear Programming Standard and Slack Forms 12
14 Converting into Standard Form (3/5) Reasons for a LP not being in standard form: 3. There might be equality constraints. maximize 2x 1 3x 2 + 3x 2 subject to x 1 + x 2 x 2 = 7 x 1 2x 2 + 2x 2 4 x 1, x 2, x 2 0 Replace each equality by two inequalities. maximize 2x 1 3x 2 + 3x 2 subject to x 1 + x 2 x 2 7 x 1 + x 2 x 2 7 x 1 2x 2 + 2x 2 4 x 1, x 2, x 2 0 III. Linear Programming Standard and Slack Forms 13
15 Converting into Standard Form (4/5) Reasons for a LP not being in standard form: 4. There might be inequality constraints (with instead of ). maximize 2x 1 3x 2 + 3x 2 subject to x 1 + x 2 x 2 7 x 1 + x 2 x 2 7 x 1 2x 2 + 2x 2 4 x 1, x 2, x 2 0 Negate respective inequalities. maximize 2x 1 3x 2 + 3x 2 subject to x 1 + x 2 x 2 7 x 1 x 2 + x 2 7 x 1 2x 2 + 2x 2 4 x 1, x 2, x 2 0 III. Linear Programming Standard and Slack Forms 14
16 Converting into Standard Form (5/5) Rename variable names (for consistency). maximize 2x 1 3x 2 + 3x 3 subject to x 1 + x 2 x 3 7 x 1 x 2 + x 3 7 x 1 2x 2 + 2x 3 4 x 1, x 2, x 3 0 It is always possible to convert a linear program into standard form. III. Linear Programming Standard and Slack Forms 15
17 Converting Standard Form into Slack Form (1/3) Goal: Convert standard form into slack form, where all constraints except for the non-negativity constraints are equalities. For the simplex algorithm, it is more convenient to work with equality constraints. Introducing Slack Variables Let n j=1 a ijx j b i be an inequality constraint Introduce a slack variable s by s measures the slack between the two sides of the inequality. s = b i s 0. n a ij x j j=1 Denote slack variable of the ith inequality by x n+i III. Linear Programming Standard and Slack Forms 16
18 Converting Standard Form into Slack Form (2/3) maximize 2x 1 3x 2 + 3x 3 subject to x 1 + x 2 x 3 7 x 1 x 2 + x 3 7 x 1 2x 2 + 2x 3 4 x 1, x 2, x 3 0 Introduce slack variables maximize 2x 1 3x 2 + 3x 3 subject to x 4 = 7 x 1 x 2 + x 3 x 5 = 7 + x 1 + x 2 x 3 x 6 = 4 x 1 + 2x 2 2x 3 x 1, x 2, x 3, x 4, x 5, x 6 0 III. Linear Programming Standard and Slack Forms 17
19 Converting Standard Form into Slack Form (3/3) maximize 2x 1 3x 2 + 3x 3 subject to x 4 = 7 x 1 x 2 + x 3 x 5 = 7 + x 1 + x 2 x 3 x 6 = 4 x 1 + 2x 2 2x 3 x 1, x 2, x 3, x 4, x 5, x 6 0 Use variable z to denote objective function and omit the nonnegativity constraints. z = 2x 1 3x 2 + 3x 3 x 4 = 7 x 1 x 2 + x 3 x 5 = 7 + x 1 + x 2 x 3 x 6 = 4 x 1 + 2x 2 2x 3 This is called slack form. III. Linear Programming Standard and Slack Forms 18
20 Basic and Non-Basic Variables z = 2x 1 3x 2 + 3x 3 x 4 = 7 x 1 x 2 + x 3 x 5 = 7 + x 1 + x 2 x 3 x 6 = 4 x 1 + 2x 2 2x 3 Basic Variables: B = {4, 5, 6} Non-Basic Variables: N = {1, 2, 3} Slack Form (Formal Definition) Slack form is given by a tuple (N, B, A, b, c, v) so that z = v + c j x j j N x i = b i a ij x j for i B, j N and all variables are non-negative. Variables/Coefficients on the right hand side are indexed by B and N. III. Linear Programming Standard and Slack Forms 19
21 Slack Form (Example) Slack Form Notation z = 28 x 1 = 8 + x 3 6 x x 2 = 4 8x 3 3 x 4 = 18 x B = {1, 2, 4}, N = {3, 5, 6} v = 28 x 5 2x x 5 x x5 x x 5 2 a 13 a 15 a 16 1/6 1/6 1/3 A = a 23 a 25 a 26 = 8/3 2/3 1/3 a 43 a 45 a 46 1/2 1/2 0 b 1 8 c 3 1/6 b = b 2 = 4, c = c 5 = 1/6 b 3 18 c 6 2/3 III. Linear Programming Standard and Slack Forms 20
22 The Structure of Optimal Solutions Definition A point x is a vertex if it cannot be represented as a strict convex combination of two other points in the feasible set. The set of feasible solutions is a convex set. Theorem If the slack form has an optimal solution, one of them occurs at a vertex. Proof: Let x be an optimal solution which is not a vertex vector d so that x d and x + d are feasible Since A(x + d) = b and Ax = b Ad = 0 W.l.o.g. assume c T d 0 (otherwise replace d by d) Consider x + λd as a function of λ 0 x 2 Case 1: There exists j with d j < 0 x + d Increase λ from 0 to λ until a new entry of x + λd x becomes zero x + λ d feasible, since A(x + λ x d d) = Ax = b and x + λ d 0 c T (x + λ d) = c T x + c T λ d c T x x 1 III. Linear Programming Standard and Slack Forms 21.1
23 The Structure of Optimal Solutions Definition A point x is a vertex if it cannot be represented as a strict convex combination of two other points in the feasible set. The set of feasible solutions is a convex set. Theorem If the slack form has an optimal solution, one of them occurs at a vertex. Proof: Let x be an optimal solution which is not a vertex vector d so that x d and x + d are feasible Since A(x + d) = b and Ax = b Ad = 0 W.l.o.g. assume c T d 0 (otherwise replace d by d) Consider x + λd as a function of λ 0 x 2 Case 2: For all j, d j 0 x + d x + λd is feasible for all λ 0: A(x + λd) = b and x x + λd x 0 If λ, then c T x d (x + λd) This contradicts the assumption that there exists an optimal solution. x 1 III. Linear Programming Standard and Slack Forms 21.2
24 Outline Introduction Standard and Slack Forms Formulating Problems as Linear Programs Simplex Algorithm Finding an Initial Solution III. Linear Programming Formulating Problems as Linear Programs 22
25 Shortest Paths Single-Pair Shortest Path Problem Given: directed graph G = (V, E) with edge weights w : E R, pair of vertices s, t V Goal: Find a path of minimum weight from s to t in G s a b d e t p = (v 0 = s, v 1,..., v k = t) such that w(p) = k i=1 w(v k 1, v k ) is minimized. c 1 f Shortest Paths as LP maximize subject to this is a maximization problem! d t Recall: When BELLMAN-FORD terminates, all these inequalities are satisfied. d v d u + w(u, v) for each edge (u, v) E, d s = 0. } Solution d satisfies d v = min u : (u,v) E {d u + w(u, v) III. Linear Programming Formulating Problems as Linear Programs 23
26 Maximum Flow Maximum Flow Problem Given: directed graph G = (V, E) with edge capacities c : E R +, pair of vertices s, t V Goal: Find a maximum flow f : V V R from s to t which satisfies the capacity constraints and flow conservation s 10/10 9/10 4/4 2 4 f = 19 6/8 9/10 0/2 5/6 9/9 10/ t Maximum Flow as LP maximize subject to v V fsv v V fvs f uv c(u, v) for each u, v V, v V fvu = v V fuv for each u V \ {s, t}, f uv 0 for each u, v V. III. Linear Programming Formulating Problems as Linear Programs 24
27 Minimum-Cost Flow Extension of the Maximum Flow Problem Minimum-Cost-Flow Problem Given: directed graph G = (V, E) with capacities c : E R +, pair of vertices s, t V, cost function a : E R +, flow demand of d units Goal: Find a flow f : V V R from s to t with f = d while minimising the total cost (u,v) E a(u, v)fuv incurrred by the flow. 862 Chapter 29 Linear Programming (u,v) E Optimal Solution with total cost: a(u, v)fuv = (2 2)+(5 2)+(3 1)+(7 1)+(1 3) = 27 s c = 5 a = 2 c = 2 a = 5 x y c = 1 a = 3 c = 2 a = 7 c = 4 a = 1 t s 2/5 a = 2 2/2 a = 5 x y 1/1 a = 3 1/2 a = 7 3/4 a = 1 t (a) (b) Figure 29.3 (a) An example of a minimum-cost-flow problem. We denote the capacities by c and the costs by a. Vertexs is the source and vertex t is the sink, and we wish to send 4 units of flow from s to t. (b) Asolutiontotheminimum-costflowprobleminwhich4 units of flow are sent from s to t. Foreachedge,theflowandcapacityarewrittenasflow/capacity. III. Linear Programming Formulating Problems as Linear Programs 25
28 Minimum-Cost Flow as a LP Minimum Cost Flow as LP minimize (u,v) E a(u, v)fuv subject to f uv c(u, v) for each u, v V, v V fvu v V fuv = 0 for each u V \ {s, t}, v V fsv v V fvs = d, f uv 0 for each u, v V. Real power of Linear Programming comes from the ability to solve new problems! III. Linear Programming Formulating Problems as Linear Programs 26
29 Outline Introduction Standard and Slack Forms Formulating Problems as Linear Programs Simplex Algorithm Finding an Initial Solution III. Linear Programming Simplex Algorithm 27
30 Simplex Algorithm: Introduction Simplex Algorithm classical method for solving linear programs (Dantzig, 1947) usually fast in practice although worst-case runtime not polynomial iterative procedure somewhat similar to Gaussian elimination Basic Idea: Each iteration corresponds to a basic solution of the slack form All non-basic variables are 0, and the basic variables are determined from the equality constraints Each iteration converts one slack form into an equivalent one while the objective value will not decrease In that sense, it is a greedy algorithm. Conversion ( pivoting ) is achieved by switching the roles of one basic and one non-basic variable III. Linear Programming Simplex Algorithm 28
31 Extended Example: Conversion into Slack Form maximize 3x 1 + x 2 + 2x 3 subject to x 1 + x 2 + 3x x 1 + 2x 2 + 5x x 1 + x 2 + 2x 3 36 x 1, x 2, x 3 0 Conversion into slack form z = 3x 1 + x 2 + 2x 3 x 4 = 30 x 1 x 2 3x 3 x 5 = 24 2x 1 2x 2 5x 3 x 6 = 36 4x 1 x 2 2x 3 III. Linear Programming Simplex Algorithm 29
32 Extended Example: Iteration 1 z = 3x 1 + x 2 + 2x 3 x 4 = 30 x 1 x 2 3x 3 x 5 = 24 2x 1 2x 2 5x 3 x 6 = 36 4x 1 x 2 2x 3 Basic solution: (x 1, x 2,..., x 6 ) = (0, 0, 0, 30, 24, 36) This basic solution is feasible Objective value is 0. III. Linear Programming Simplex Algorithm 30.1
33 Extended Example: Iteration 1 Increasing the value of x 1 would increase the objective value. z = 3x 1 + x 2 + 2x 3 x 4 = 30 x 1 x 2 3x 3 x 5 = 24 2x 1 2x 2 5x 3 x 6 = 36 4x 1 x 2 2x 3 The third constraint is the tightest and limits how much we can increase x 1. Switch roles of x 1 and x 6 : Solving for x 1 yields: x 1 = 9 x 2 4 x 3 2 x 6 4. Substitute this into x 1 in the other three equations III. Linear Programming Simplex Algorithm 30.2
34 Extended Example: Iteration 2 Increasing the value of x 3 would increase the objective value. z = 27 + x 1 = 9 x 2 x 4 = 21 3x 2 4 x 5 = 6 3x x 2 4 x 3 5x 3 2 3x x 3 x x 3 + Basic solution: (x 1, x 2,..., x 6 ) = (9, 0, 0, 21, 6, 0) with objective value 27 x 6 4 x 6 2 III. Linear Programming Simplex Algorithm 30.3
35 Extended Example: Iteration 2 z = 27 + x 1 = 9 x 2 x 4 = 21 3x 2 4 x 5 = 6 3x x 2 4 x 3 5x 3 2 3x x 3 x x 3 + The third constraint is the tightest and limits how much we can increase x 3. x 6 4 x 6 2 Switch roles of x 3 and x 5: Solving for x 3 yields: x 3 = 3 2 3x 2 8 x5 4 x 6 8. Substitute this into x 3 in the other three equations III. Linear Programming Simplex Algorithm 30.4
36 Extended Example: Iteration 3 Increasing the value of x 2 would increase the objective value. z = x 1 = 33 4 x 3 = x 4 = x 2 16 x x x 2 16 x x x 5 5x x 5 x x5 x Basic solution: (x 1, x 2,..., x 6 ) = ( 33 4, 0, 3 2, 69 4, 0, 0) with objective value = III. Linear Programming Simplex Algorithm 30.5
37 Extended Example: Iteration 3 z = x 1 = 33 4 x 3 = x 4 = x 2 16 x x x 2 16 x x x 5 5x x 5 x x5 x The second constraint is the tightest and limits how much we can increase x 2. Switch roles of x 2 and x 3 : Solving for x 2 yields: x 2 = 4 8x 3 3 2x5 3 + x 6 3. Substitute this into x 2 in the other three equations III. Linear Programming Simplex Algorithm 30.6
38 Extended Example: Iteration 4 All coefficients are negative, and hence this basic solution is optimal! z = 28 x 1 = 8 + x 3 6 x x 2 = 4 8x 3 3 x 4 = 18 x x 5 2x x 5 x x5 x x 5 2 Basic solution: (x 1, x 2,..., x 6 ) = (8, 4, 0, 18, 0, 0) with objective value 28 III. Linear Programming Simplex Algorithm 30.7
39 Extended Example: Visualization of SIMPLEX x 3 (0, 0, 4.8) 9.6 x 2 (0, 12, 0) 12 (0, 0, 0) 0 (8.25, 0, 1.5) (9, 0, 0) 27 (8, 4, 0) 28 x 1 Exercise: How many basic solutions (including non-feasible ones) are there? III. Linear Programming Simplex Algorithm 31
40 Extended Example: Alternative Runs (1/2) z = 3x 1 + x 2 + 2x 3 x 4 = 30 x 1 x 2 3x 3 x 5 = 24 2x 1 2x 2 5x 3 x 6 = 36 4x 1 x 2 2x 3 Switch roles of x 2 and x 5 z = x 1 x 3 2 x 5 2 x 2 = 12 x 1 x 4 = 18 x 2 x 6 = 24 3x 1 + 5x 3 2 x 3 2 x x 5 2 x 5 2 x 5 2 Switch roles of x 1 and x 6 z = 28 x 1 = 8 + x 3 6 x x 5 6 x 5 6 2x 6 3 x 6 3 x 2 = 4 x 4 = 18 8x 3 3 x x 5 3 x x 6 3 III. Linear Programming Simplex Algorithm 32
41 Extended Example: Alternative Runs (2/2) z = 3x 1 + x 2 + 2x 3 x 4 = 30 x 1 x 2 3x 3 x 5 = 24 2x 1 2x 2 5x 3 x 6 = 36 4x 1 x 2 2x 3 Switch roles of x 3 and x 5 z = x 4 = x 3 = x 6 = x x x x 1 5 x 2 5 x x 2 5 x x 5 5 3x 5 5 x 5 5 2x 3 5 Switch roles of x 1 and x 6 Switch roles of x 2 and x 3 z = x 1 = x 3 = x 4 = x 2 16 x x 2 8 3x x 5 8 x 5 8 x 5 4 5x x x 6 16 x 6 8 x 6 16 z = 28 x 1 = 8 + x 2 = 4 x 4 = 18 x 3 6 x 3 6 8x 3 3 x x 5 6 x 5 6 2x 5 3 x x 6 3 x 6 3 x 6 3 III. Linear Programming Simplex Algorithm 33
42 . yn; yb; ya; b; y yc; y/ describing the new slack form. (Recall again that the entries of the mn matrices A and ya are actually the negatives of the coefficients that appear in the slack form.) The Pivot Step Formally PIVOT.N; B; A; b; c; ;l;e/ 1 // Compute the coefficients of the equation for new basic variable x e. 2 let ya be a new m n matrix 3 be y D b l =a le 4 for each j 2 N feg Need that a le 0! 5 ya ej D a lj =a le 6 ya el D 1=a le 7 // Compute the coefficients of the remaining constraints. 8 for each i 2 B flg 9 bi y D b i a iebe y 10 for each j 2 N feg 11 ya ij D a ij a ie ya ej 12 ya il D a ie ya el 13 // Compute the objective function. 14 y D C c ebe y 15 for each j 2 N feg 16 yc j D c j c e ya ej 17 yc l D c e ya el 18 // Compute new sets of basic and nonbasic variables. 19 yn D N feg [ flg 20 yb D B flg [ feg 21 return. yn; yb; ya; b; y yc; y/ Rewrite tight equation for enterring variable x e. Substituting x e into other equations. Substituting x e into objective function. Update non-basic and basic variables PIVOT works as follows. Lines 3 6 compute the coefficients in the new equation for x e by rewriting the equation that has x l on the left-hand side to instead have x e III. Linear Programming Simplex Algorithm 34
43 Effect of the Pivot Step Lemma 29.1 Consider a call to PIVOT(N, B, A, b, c, v, l, e) in which a le 0. Let the values returned from the call be ( N, B, Â, b, ĉ, v), and let x denote the basic solution after the call. Then 1. x j = 0 for each j N. 2. x e = b l /a le. 3. x i = b i a ie be for each i B \ {e}. Proof: 1. holds since the basic solution always sets all non-basic variables to zero. 2. When we set each non-basic variable to 0 in a constraint x i = b i j N â ij x j, we have x i = b i for each i B. Hence x e = b e = b l /a le. 3. After the substituting in the other constraints, we have x i = b i = b i a ie be. III. Linear Programming Simplex Algorithm 35
44 Formalizing the Simplex Algorithm: Questions Questions: How do we determine whether a linear program is feasible? What do we do if the linear program is feasible, but the initial basic solution is not feasible? How do we determine whether a linear program is unbounded? How do we choose the entering and leaving variables? Example before was a particularly nice one! III. Linear Programming Simplex Algorithm 36
45 Theprocedure SIMPLEX takes as input a linear program in standard form, as just described. It returns an n-vector Nx D. Nx j / that is an optimal solution to the linear program described in (29.19) (29.21). The formal procedure SIMPLEX SIMPLEX.A; b; c/ Returns a slack form with a 1.N; B; A; b; c; / D INITIALIZE-SIMPLEX.A; b; c/ feasible basic solution (if it exists) 2 let be a new vector of length mn 3 while some index j 2 N has c j >0 4 choose anindex e 2 N for which c e >0 Main Loop: 5 for each index i 2 B terminates if all coefficients in 6 if a ie >0 objective function are negative 7 i D b i =a ie Line 4 picks enterring variable 8 else i D1 x e with negative coefficient 9 choose anindex l 2 B that minimizes i Lines 6 9 pick the tightest 10 if l == 1 constraint, associated with x l 11 return unbounded Line 11 returns unbounded if 12 else.n;b;a;b;c;/ D PIVOT.N;B;A;b;c;;l;e/ there are no constraints 13 for i D 1 to n 14 if i 2 B Line 12 calls PIVOT, switching 15 Nx i D b roles of x l and x e i 16 else Nx i D 0 17 return. Nx 1 ; Nx 2 ;:::; Nx n / Return corresponding solution. The SIMPLEX procedure works as follows. In line 1, it calls the procedure INITIALIZE-SIMPLEX.A; b; c/, describedabove,whicheitherdeterminesthatthe linear program is infeasible or returns a slack form for which the basic solution is feasible. The while loop of lines 3 12 forms the main part of the algorithm. If all coefficients in the objective function are negative, then the while loop terminates. Otherwise, line 4 selects a variable x e,whosecoefficientintheobjectivefunction is positive, as the entering variable. Although we may choose any such variable as III. Linear Programming Simplex Algorithm 37.1
46 Theprocedure SIMPLEX takes as input a linear program in standard form, as just described. It returns an n-vector Nx D. Nx j / that is an optimal solution to the linear program described in (29.19) (29.21). The formal procedure SIMPLEX SIMPLEX.A; b; c/ 1.N; B; A; b; c; / D INITIALIZE-SIMPLEX.A; b; c/ 2 let be a new vector of length mn 3 while some index j 2 N has c j >0 4 choose anindex e 2 N for which c e >0 5 for each index i 2 B 6 if a ie >0 7 i D b i =a ie 8 else i D1 9 choose anindex l 2 B that minimizes i 10 if l == 1 11 return unbounded Proof 12is based else.n;b;a;b;c;/ on the following D PIVOT.N;B;A;b;c;;l;e/ three-part loop invariant: 13 for i D 1 to n 1. the 14 slackif iform 2 B is always equivalent to the one returned by INITIALIZE-SIMPLEX, 15 Nx i D b 2. for each i B, we i have b i 0, 16 else Nx i D 0 3. the 17 basic return solution. Nx 1 ; Nx 2 ;:::; associated Nx n / with the (current) slack form is feasible. The SIMPLEX Lemma 29.2 procedure works as follows. In line 1, it calls the procedure INITIALIZE-SIMPLEX.A; Suppose the call to b; c/, describedabove,whicheitherdeterminesthatthe INITIALIZE-SIMPLEX in line 1 returns a slack form for which linear the basic program solution is infeasible is feasible. or returns Then a slack if form for which the basic solution is SIMPLEX returns a solution, it is a feasible feasible. solution. The If while loop of lines 3 12 forms the main part of the algorithm. If all SIMPLEX returns unbounded, the linear program is unbounded. coefficients in the objective function are negative, then the while loop terminates. Otherwise, line 4 selects a variable x e,whosecoefficientintheobjectivefunction is positive, as the entering variable. Although we may choose any such variable as III. Linear Programming Simplex Algorithm 37.2
47 Termination Degeneracy: One iteration of SIMPLEX leaves the objective value unchanged. z = x 1 + x 2 + x 3 x 4 = 8 x 1 x 2 x 5 = x 2 x 3 Pivot with x 1 entering and x 4 leaving z = 8 + x 3 x 4 x 1 = 8 x 2 x 4 x 5 = x 2 x 3 Cycling: If additionally slack at two iterations are identical, SIMPLEX fails to terminate! Pivot with x 3 entering and x 5 leaving z = 8 + x 2 x 4 x 5 x 1 = 8 x 2 x 4 x 3 = x 2 x 5 III. Linear Programming Simplex Algorithm 38
48 Termination and Running Time It is theoretically possible, but very rare in practice. Cycling: SIMPLEX may fail to terminate. Anti-Cycling Strategies 1. Bland s rule: Choose entering variable with smallest index 2. Random rule: Choose entering variable uniformly at random 3. Perturbation: Perturb the input slightly so that it is impossible to have two solutions with the same objective value Lemma 29.7 Replace each b i by b i = b i + ɛ i, where ɛ i ɛ i+1 are all small. Assuming INITIALIZE-SIMPLEX returns a slack form for which the basic solution is feasible, SIMPLEX either reports that the program is unbounded or returns a feasible solution in at most ( ) n+m m iterations. Every set B of basic variables uniquely determines a slack form, and there are at most ( ) n+m m unique slack forms. III. Linear Programming Simplex Algorithm 39
49 Outline Introduction Standard and Slack Forms Formulating Problems as Linear Programs Simplex Algorithm Finding an Initial Solution III. Linear Programming Finding an Initial Solution 40
50 Finding an Initial Solution maximize 2x 1 x 2 subject to 2x 1 x 2 2 x 1 5x 2 4 x 1, x 2 0 Conversion into slack form z = 2x 1 x 2 x 3 = 2 2x 1 + x 2 x 4 = 4 x 1 + 5x 2 Basic solution (x 1, x 2, x 3, x 4 ) = (0, 0, 2, 4) is not feasible! III. Linear Programming Finding an Initial Solution 41
51 Geometric Illustration maximize 2x 1 x 2 subject to 2x 1 x 2 2 x 1 5x 2 4 x 1, x 2 0 x 2 2x 1 x 2 2 Questions: How to determine whether there is any feasible solution? If there is one, how to determine an initial basic solution? x 1 5x 2 4 x 1 III. Linear Programming Finding an Initial Solution 42
52 Formulating an Auxiliary Linear Program maximize n j=1 c jx j subject to n j=1 a ijx j b i for i = 1, 2,..., m, x j 0 for j = 1, 2,..., n Formulating an Auxiliary Linear Program maximize x 0 subject to Lemma n j=1 a ijx j x 0 b i for i = 1, 2,..., m, x j 0 for j = 0, 1,..., n Let L aux be the auxiliary LP of a linear program L in standard form. Then L is feasible if and only if the optimal objective value of L aux is 0. Proof. : Suppose L has a feasible solution x = (x 1, x 2,..., x n) x 0 = 0 combined with x is a feasible solution to L aux with objective value 0. Since x 0 0 and the objective is to maximize x 0, this is optimal for L aux : Suppose that the optimal objective value of L aux is 0 Then x 0 = 0, and the remaining solution values (x 1, x 2,..., x n) satisfy L. III. Linear Programming Finding an Initial Solution 43
53 maximize x 0,thissolutionmustbeoptimalforL aux. Conversely, suppose that the optimal objective value of L aux is 0. ThenNx 0 D 0, INITIALIZE-SIMPLEX and the remaining solution values of Nx satisfy the constraints of L. We now describe our strategy to find an initial basic feasible solution for a linear program L in standard form: Test solution with N = {1, 2,..., n}, B = {n + 1, n + INITIALIZE-SIMPLEX.A; b; c/ 2,..., n + m}, x i = b i for i B, x i = 0 otherwise. 1 let k be the index of the minimum b i 2 if b k 0 // is the initial basic solution feasible? 3 return.f1; 2; : : : ; ng ; fn C 1; n C 2;: : : ;n C mg ;A;b;c;0/ 4 form L aux by adding x 0 to the left-hand side of each constraint and setting the objective function to x 0 5 let.n; B; A; b; c; / be the resulting slack form for L aux l will be the leaving variable so 6 l D n C k that x l has the most negative value. 7 // L aux has n C 1 nonbasic variables and m basic variables. 8.N; B; A; b; c; / D PIVOT.N; B; A; b; c; ;l;0/ Pivot step with x l leaving and x 0 entering. 9 // The basic solution is now feasible for L aux. 10 iterate the while loop of lines 3 12 of SIMPLEX until an optimal solution to L aux is found 11 if the optimal solution to L aux sets Nx 0 to 0 This pivot step does not change 12 if Nx 0 is basic 13 perform one (degenerate) pivot to make it nonbasic the value of any variable. 14 from the final slack form of L aux,removex 0 from the constraints and restore the original objective function of L,butreplaceeachbasic variable in this objective function by the right-hand side of its associated constraint 15 return the modified final slack form 16 else return infeasible III. Linear Programming Finding an Initial Solution 44
54 Example of INITIALIZE-SIMPLEX (1/3) maximize 2x 1 x 2 subject to 2x 1 x 2 2 x 1 5x 2 4 x 1, x 2 0 Formulating the auxiliary linear program maximize x 0 subject to 2x 1 x 2 x 0 2 x 1 5x 2 x 0 4 x 1, x 2, x 0 0 Basic solution (0, 0, 0, 2, 4) not feasible! Converting into slack form z = x 0 x 3 = 2 2x 1 + x 2 + x 0 x 4 = 4 x 1 + 5x 2 + x 0 III. Linear Programming Finding an Initial Solution 45
55 Example of INITIALIZE-SIMPLEX (2/3) z = x 0 x 3 = 2 2x 1 + x 2 + x 0 x 4 = 4 x 1 + 5x 2 + x 0 Pivot with x 0 entering and x 4 leaving z = 4 x 1 + 5x 2 x 4 x 0 = 4 + x 1 5x 2 + x 4 x 3 = 6 x 1 4x 2 + x 4 Basic solution (4, 0, 0, 6, 0) is feasible! Pivot with x 2 entering and x 0 leaving z = x 0 x 2 = 4 x 0 x x x 3 = x 0 9x 1 + x Optimal solution has x 0 = 0, hence the initial problem was feasible! III. Linear Programming Finding an Initial Solution 46
56 Example of INITIALIZE-SIMPLEX (3/3) 2x 1 x 2 = 2x 1 ( 4 5 x x x 4 5 ) z = x 0 x 2 = 4 x 0 x x x 3 = x 0 9x 1 + x Set x 0 = 0 and express objective function by non-basic variables z = 4 + 9x 1 x x 2 = 4 x x x 3 = 14 9x 1 + x Basic solution (0, 4, 14, 0), which is feasible! 5 5 Lemma If a linear program L has no feasible solution, then INITIALIZE-SIMPLEX returns infeasible. Otherwise, it returns a valid slack form for which the basic solution is feasible. III. Linear Programming Finding an Initial Solution 47
57 Fundamental Theorem of Linear Programming Theorem (Fundamental Theorem of Linear Programming) Any linear program L, given in standard form, either 1. has an optimal solution with a finite objective value, 2. is infeasible, or 3. is unbounded. If L is infeasible, SIMPLEX returns infeasible. If L is unbounded, SIMPLEX returns unbounded. Otherwise, SIMPLEX returns an optimal solution with a finite objective value. Proof requires the concept of duality, which is not covered in this course (for details see CLRS3, Chapter 29.4) III. Linear Programming Finding an Initial Solution 48
58 Workflow for Solving Linear Programs Linear Program (in any form) Standard Form Slack Form No Feasible Solution INITIALIZE-SIMPLEX terminates Feasible Basic Solution INITIALIZE-SIMPLEX followed by SIMPLEX LP unbounded SIMPLEX terminates LP bounded SIMPLEX returns optimum III. Linear Programming Finding an Initial Solution 49
59 Linear Programming and Simplex: Summary and Outlook Linear Programming extremely versatile tool for modelling problems of all kinds basis of Integer Programming, to be discussed in later lectures Simplex Algorithm In practice: usually terminates in polynomial time, i.e., O(m + n) In theory: even with anti-cycling may need exponential time Research Problem: Is there a pivoting rule which makes SIMPLEX a polynomial-time algorithm? Polynomial-Time Algorithms Interior-Point Methods: traverses the interior of the feasible set of solutions (not just vertices!) x 3 x 3 x 2 x 2 x 1 x 1 III. Linear Programming Finding an Initial Solution 50
An example of LP problem: Political Elections
Linear Programming An example of LP problem: Political Elections Suppose that you are a politician trying to win an election. Your district has three different types of areas: urban, suburban, and rural.
More information29 Linear Programming
29 Linear Programming Many problems take the form of optimizing an objective, given limited resources and competing constraints If we can specify the objective as a linear function of certain variables,
More informationThe simplex algorithm
The simplex algorithm The simplex algorithm is the classical method for solving linear programs. Its running time is not polynomial in the worst case. It does yield insight into linear programs, however,
More informationLecture 9 Tuesday, 4/20/10. Linear Programming
UMass Lowell Computer Science 91.503 Analysis of Algorithms Prof. Karen Daniels Spring, 2010 Lecture 9 Tuesday, 4/20/10 Linear Programming 1 Overview Motivation & Basics Standard & Slack Forms Formulating
More informationLinear Programming. Jie Wang. University of Massachusetts Lowell Department of Computer Science. J. Wang (UMass Lowell) Linear Programming 1 / 47
Linear Programming Jie Wang University of Massachusetts Lowell Department of Computer Science J. Wang (UMass Lowell) Linear Programming 1 / 47 Linear function: f (x 1, x 2,..., x n ) = n a i x i, i=1 where
More informationCSC373: Algorithm Design, Analysis and Complexity Fall 2017 DENIS PANKRATOV NOVEMBER 1, 2017
CSC373: Algorithm Design, Analysis and Complexity Fall 2017 DENIS PANKRATOV NOVEMBER 1, 2017 Linear Function f: R n R is linear if it can be written as f x = a T x for some a R n Example: f x 1, x 2 =
More informationToday: Linear Programming
Today: Linear Programming COSC 581, Algorithms March 27, 2014 Many of these slides are adapted from several online sources Today s class: Chapter 29.1 Reading Assignments Reading assignment for next Thursday
More informationOptimization (168) Lecture 7-8-9
Optimization (168) Lecture 7-8-9 Jesús De Loera UC Davis, Mathematics Wednesday, April 2, 2012 1 DEGENERACY IN THE SIMPLEX METHOD 2 DEGENERACY z =2x 1 x 2 + 8x 3 x 4 =1 2x 3 x 5 =3 2x 1 + 4x 2 6x 3 x 6
More informationThe Simplex Algorithm
8.433 Combinatorial Optimization The Simplex Algorithm October 6, 8 Lecturer: Santosh Vempala We proved the following: Lemma (Farkas). Let A R m n, b R m. Exactly one of the following conditions is true:.
More informationCSC Design and Analysis of Algorithms. LP Shader Electronics Example
CSC 80- Design and Analysis of Algorithms Lecture (LP) LP Shader Electronics Example The Shader Electronics Company produces two products:.eclipse, a portable touchscreen digital player; it takes hours
More informationLecture slides by Kevin Wayne
LINEAR PROGRAMMING I a refreshing example standard form fundamental questions geometry linear algebra simplex algorithm Lecture slides by Kevin Wayne Last updated on 7/25/17 11:09 AM Linear programming
More informationLINEAR PROGRAMMING I. a refreshing example standard form fundamental questions geometry linear algebra simplex algorithm
Linear programming Linear programming. Optimize a linear function subject to linear inequalities. (P) max c j x j n j= n s. t. a ij x j = b i i m j= x j 0 j n (P) max c T x s. t. Ax = b Lecture slides
More information9.1 Linear Programs in canonical form
9.1 Linear Programs in canonical form LP in standard form: max (LP) s.t. where b i R, i = 1,..., m z = j c jx j j a ijx j b i i = 1,..., m x j 0 j = 1,..., n But the Simplex method works only on systems
More informationLecture 4: Algebra, Geometry, and Complexity of the Simplex Method. Reading: Sections 2.6.4, 3.5,
Lecture 4: Algebra, Geometry, and Complexity of the Simplex Method Reading: Sections 2.6.4, 3.5, 10.2 10.5 1 Summary of the Phase I/Phase II Simplex Method We write a typical simplex tableau as z x 1 x
More informationAM 121: Intro to Optimization
AM 121: Intro to Optimization Models and Methods Lecture 6: Phase I, degeneracy, smallest subscript rule. Yiling Chen SEAS Lesson Plan Phase 1 (initialization) Degeneracy and cycling Smallest subscript
More informationLinear Programming. Linear Programming I. Lecture 1. Linear Programming. Linear Programming
Linear Programming Linear Programming Lecture Linear programming. Optimize a linear function subject to linear inequalities. (P) max " c j x j n j= n s. t. " a ij x j = b i # i # m j= x j 0 # j # n (P)
More information1 The linear algebra of linear programs (March 15 and 22, 2015)
1 The linear algebra of linear programs (March 15 and 22, 2015) Many optimization problems can be formulated as linear programs. The main features of a linear program are the following: Variables are real
More informationMotivating examples Introduction to algorithms Simplex algorithm. On a particular example General algorithm. Duality An application to game theory
Instructor: Shengyu Zhang 1 LP Motivating examples Introduction to algorithms Simplex algorithm On a particular example General algorithm Duality An application to game theory 2 Example 1: profit maximization
More informationLP. Lecture 3. Chapter 3: degeneracy. degeneracy example cycling the lexicographic method other pivot rules the fundamental theorem of LP
LP. Lecture 3. Chapter 3: degeneracy. degeneracy example cycling the lexicographic method other pivot rules the fundamental theorem of LP 1 / 23 Repetition the simplex algorithm: sequence of pivots starting
More informationCOMP3121/9101/3821/9801 Lecture Notes. Linear Programming
COMP3121/9101/3821/9801 Lecture Notes Linear Programming LiC: Aleks Ignjatovic THE UNIVERSITY OF NEW SOUTH WALES School of Computer Science and Engineering The University of New South Wales Sydney 2052,
More informationThe Simplex Algorithm: Technicalities 1
1/45 The Simplex Algorithm: Technicalities 1 Adrian Vetta 1 This presentation is based upon the book Linear Programming by Vasek Chvatal 2/45 Two Issues Here we discuss two potential problems with the
More informationLinear programming. Saad Mneimneh. maximize x 1 + x 2 subject to 4x 1 x 2 8 2x 1 + x x 1 2x 2 2
Linear programming Saad Mneimneh 1 Introduction Consider the following problem: x 1 + x x 1 x 8 x 1 + x 10 5x 1 x x 1, x 0 The feasible solution is a point (x 1, x ) that lies within the region defined
More informationLinear Programming Duality P&S Chapter 3 Last Revised Nov 1, 2004
Linear Programming Duality P&S Chapter 3 Last Revised Nov 1, 2004 1 In this section we lean about duality, which is another way to approach linear programming. In particular, we will see: How to define
More informationLecture 2: The Simplex method
Lecture 2 1 Linear and Combinatorial Optimization Lecture 2: The Simplex method Basic solution. The Simplex method (standardform, b>0). 1. Repetition of basic solution. 2. One step in the Simplex algorithm.
More informationLecture #21. c T x Ax b. maximize subject to
COMPSCI 330: Design and Analysis of Algorithms 11/11/2014 Lecture #21 Lecturer: Debmalya Panigrahi Scribe: Samuel Haney 1 Overview In this lecture, we discuss linear programming. We first show that the
More informationCO 250 Final Exam Guide
Spring 2017 CO 250 Final Exam Guide TABLE OF CONTENTS richardwu.ca CO 250 Final Exam Guide Introduction to Optimization Kanstantsin Pashkovich Spring 2017 University of Waterloo Last Revision: March 4,
More informationA Parametric Simplex Algorithm for Linear Vector Optimization Problems
A Parametric Simplex Algorithm for Linear Vector Optimization Problems Birgit Rudloff Firdevs Ulus Robert Vanderbei July 9, 2015 Abstract In this paper, a parametric simplex algorithm for solving linear
More informationBBM402-Lecture 20: LP Duality
BBM402-Lecture 20: LP Duality Lecturer: Lale Özkahya Resources for the presentation: https://courses.engr.illinois.edu/cs473/fa2016/lectures.html An easy LP? which is compact form for max cx subject to
More informationCOT 6936: Topics in Algorithms! Giri Narasimhan. ECS 254A / EC 2443; Phone: x3748
COT 6936: Topics in Algorithms! Giri Narasimhan ECS 254A / EC 2443; Phone: x3748 giri@cs.fiu.edu https://moodle.cis.fiu.edu/v2.1/course/view.php?id=612 Gaussian Elimination! Solving a system of simultaneous
More informationThe Avis-Kalunzy Algorithm is designed to find a basic feasible solution (BFS) of a given set of constraints. Its input: A R m n and b R m such that
Lecture 4 Avis-Kaluzny and the Simplex Method Last time, we discussed some applications of Linear Programming, such as Max-Flow, Matching, and Vertex-Cover. The broad range of applications to Linear Programming
More informationSupplementary lecture notes on linear programming. We will present an algorithm to solve linear programs of the form. maximize.
Cornell University, Fall 2016 Supplementary lecture notes on linear programming CS 6820: Algorithms 26 Sep 28 Sep 1 The Simplex Method We will present an algorithm to solve linear programs of the form
More informationCO350 Linear Programming Chapter 8: Degeneracy and Finite Termination
CO350 Linear Programming Chapter 8: Degeneracy and Finite Termination 27th June 2005 Chapter 8: Finite Termination 1 The perturbation method Recap max c T x (P ) s.t. Ax = b x 0 Assumption: B is a feasible
More information15-780: LinearProgramming
15-780: LinearProgramming J. Zico Kolter February 1-3, 2016 1 Outline Introduction Some linear algebra review Linear programming Simplex algorithm Duality and dual simplex 2 Outline Introduction Some linear
More informationSummary of the simplex method
MVE165/MMG630, The simplex method; degeneracy; unbounded solutions; infeasibility; starting solutions; duality; interpretation Ann-Brith Strömberg 2012 03 16 Summary of the simplex method Optimality condition:
More informationIntroduction to Linear and Combinatorial Optimization (ADM I)
Introduction to Linear and Combinatorial Optimization (ADM I) Rolf Möhring based on the 20011/12 course by Martin Skutella TU Berlin WS 2013/14 1 General Remarks new flavor of ADM I introduce linear and
More informationInput: System of inequalities or equalities over the reals R. Output: Value for variables that minimizes cost function
Linear programming Input: System of inequalities or equalities over the reals R A linear cost function Output: Value for variables that minimizes cost function Example: Minimize 6x+4y Subject to 3x + 2y
More informationChapter 1 Linear Programming. Paragraph 5 Duality
Chapter 1 Linear Programming Paragraph 5 Duality What we did so far We developed the 2-Phase Simplex Algorithm: Hop (reasonably) from basic solution (bs) to bs until you find a basic feasible solution
More information1 Review Session. 1.1 Lecture 2
1 Review Session Note: The following lists give an overview of the material that was covered in the lectures and sections. Your TF will go through these lists. If anything is unclear or you have questions
More informationCO 602/CM 740: Fundamentals of Optimization Problem Set 4
CO 602/CM 740: Fundamentals of Optimization Problem Set 4 H. Wolkowicz Fall 2014. Handed out: Wednesday 2014-Oct-15. Due: Wednesday 2014-Oct-22 in class before lecture starts. Contents 1 Unique Optimum
More informationCS 6820 Fall 2014 Lectures, October 3-20, 2014
Analysis of Algorithms Linear Programming Notes CS 6820 Fall 2014 Lectures, October 3-20, 2014 1 Linear programming The linear programming (LP) problem is the following optimization problem. We are given
More informationOptimization WS 13/14:, by Y. Goldstein/K. Reinert, 9. Dezember 2013, 16: Linear programming. Optimization Problems
Optimization WS 13/14:, by Y. Goldstein/K. Reinert, 9. Dezember 2013, 16:38 2001 Linear programming Optimization Problems General optimization problem max{z(x) f j (x) 0,x D} or min{z(x) f j (x) 0,x D}
More informationAn introductory example
CS1 Lecture 9 An introductory example Suppose that a company that produces three products wishes to decide the level of production of each so as to maximize profits. Let x 1 be the amount of Product 1
More informationPart 1. The Review of Linear Programming
In the name of God Part 1. The Review of Linear Programming 1.2. Spring 2010 Instructor: Dr. Masoud Yaghini Outline Introduction Basic Feasible Solutions Key to the Algebra of the The Simplex Algorithm
More informationLinear Programming Redux
Linear Programming Redux Jim Bremer May 12, 2008 The purpose of these notes is to review the basics of linear programming and the simplex method in a clear, concise, and comprehensive way. The book contains
More informationA Review of Linear Programming
A Review of Linear Programming Instructor: Farid Alizadeh IEOR 4600y Spring 2001 February 14, 2001 1 Overview In this note we review the basic properties of linear programming including the primal simplex
More informationIntroduction to Algorithms
Introduction to Algorithms 6.046J/18.401J/SMA5503 Lecture 18 Prof. Erik Demaine Negative-weight cycles Recall: If a graph G = (V, E) contains a negativeweight cycle, then some shortest paths may not exist.
More information"SYMMETRIC" PRIMAL-DUAL PAIR
"SYMMETRIC" PRIMAL-DUAL PAIR PRIMAL Minimize cx DUAL Maximize y T b st Ax b st A T y c T x y Here c 1 n, x n 1, b m 1, A m n, y m 1, WITH THE PRIMAL IN STANDARD FORM... Minimize cx Maximize y T b st Ax
More informationCSCI 1951-G Optimization Methods in Finance Part 01: Linear Programming
CSCI 1951-G Optimization Methods in Finance Part 01: Linear Programming January 26, 2018 1 / 38 Liability/asset cash-flow matching problem Recall the formulation of the problem: max w c 1 + p 1 e 1 = 150
More informationTermination, Cycling, and Degeneracy
Chapter 4 Termination, Cycling, and Degeneracy We now deal first with the question, whether the simplex method terminates. The quick answer is no, if it is implemented in a careless way. Notice that we
More informationMAT016: Optimization
MAT016: Optimization M.El Ghami e-mail: melghami@ii.uib.no URL: http://www.ii.uib.no/ melghami/ March 29, 2011 Outline for today The Simplex method in matrix notation Managing a production facility The
More informationTIM 206 Lecture 3: The Simplex Method
TIM 206 Lecture 3: The Simplex Method Kevin Ross. Scribe: Shane Brennan (2006) September 29, 2011 1 Basic Feasible Solutions Have equation Ax = b contain more columns (variables) than rows (constraints),
More informationAlgorithms and Theory of Computation. Lecture 11: Network Flow
Algorithms and Theory of Computation Lecture 11: Network Flow Xiaohui Bei MAS 714 September 18, 2018 Nanyang Technological University MAS 714 September 18, 2018 1 / 26 Flow Network A flow network is a
More informationLesson 27 Linear Programming; The Simplex Method
Lesson Linear Programming; The Simplex Method Math 0 April 9, 006 Setup A standard linear programming problem is to maximize the quantity c x + c x +... c n x n = c T x subject to constraints a x + a x
More informationmin 4x 1 5x 2 + 3x 3 s.t. x 1 + 2x 2 + x 3 = 10 x 1 x 2 6 x 1 + 3x 2 + x 3 14
The exam is three hours long and consists of 4 exercises. The exam is graded on a scale 0-25 points, and the points assigned to each question are indicated in parenthesis within the text. If necessary,
More informationIE 400: Principles of Engineering Management. Simplex Method Continued
IE 400: Principles of Engineering Management Simplex Method Continued 1 Agenda Simplex for min problems Alternative optimal solutions Unboundedness Degeneracy Big M method Two phase method 2 Simplex for
More informationDiscrete Optimization
Prof. Friedrich Eisenbrand Martin Niemeier Due Date: April 15, 2010 Discussions: March 25, April 01 Discrete Optimization Spring 2010 s 3 You can hand in written solutions for up to two of the exercises
More informationSimplex Algorithm Using Canonical Tableaus
41 Simplex Algorithm Using Canonical Tableaus Consider LP in standard form: Min z = cx + α subject to Ax = b where A m n has rank m and α is a constant In tableau form we record it as below Original Tableau
More informationF 1 F 2 Daily Requirement Cost N N N
Chapter 5 DUALITY 5. The Dual Problems Every linear programming problem has associated with it another linear programming problem and that the two problems have such a close relationship that whenever
More information4.5 Simplex method. LP in standard form: min z = c T x s.t. Ax = b
4.5 Simplex method LP in standard form: min z = c T x s.t. Ax = b x 0 George Dantzig (1914-2005) Examine a sequence of basic feasible solutions with non increasing objective function values until an optimal
More informationDeveloping an Algorithm for LP Preamble to Section 3 (Simplex Method)
Moving from BFS to BFS Developing an Algorithm for LP Preamble to Section (Simplex Method) We consider LP given in standard form and let x 0 be a BFS. Let B ; B ; :::; B m be the columns of A corresponding
More informationLecture 6 Simplex method for linear programming
Lecture 6 Simplex method for linear programming Weinan E 1,2 and Tiejun Li 2 1 Department of Mathematics, Princeton University, weinan@princeton.edu 2 School of Mathematical Sciences, Peking University,
More informationx 1 + x 2 2 x 1 x 2 1 x 2 2 min 3x 1 + 2x 2
Lecture 1 LPs: Algebraic View 1.1 Introduction to Linear Programming Linear programs began to get a lot of attention in 1940 s, when people were interested in minimizing costs of various systems while
More informationOptimization methods NOPT048
Optimization methods NOPT048 Jirka Fink https://ktiml.mff.cuni.cz/ fink/ Department of Theoretical Computer Science and Mathematical Logic Faculty of Mathematics and Physics Charles University in Prague
More information4.5 Simplex method. min z = c T x s.v. Ax = b. LP in standard form
4.5 Simplex method min z = c T x s.v. Ax = b x 0 LP in standard form Examine a sequence of basic feasible solutions with non increasing objective function value until an optimal solution is reached or
More informationSection Notes 9. IP: Cutting Planes. Applied Math 121. Week of April 12, 2010
Section Notes 9 IP: Cutting Planes Applied Math 121 Week of April 12, 2010 Goals for the week understand what a strong formulations is. be familiar with the cutting planes algorithm and the types of cuts
More informationYinyu Ye, MS&E, Stanford MS&E310 Lecture Note #06. The Simplex Method
The Simplex Method Yinyu Ye Department of Management Science and Engineering Stanford University Stanford, CA 94305, U.S.A. http://www.stanford.edu/ yyye (LY, Chapters 2.3-2.5, 3.1-3.4) 1 Geometry of Linear
More informationStandard Form An LP is in standard form when: All variables are non-negativenegative All constraints are equalities Putting an LP formulation into sta
Chapter 4 Linear Programming: The Simplex Method An Overview of the Simplex Method Standard Form Tableau Form Setting Up the Initial Simplex Tableau Improving the Solution Calculating the Next Tableau
More information3 The Simplex Method. 3.1 Basic Solutions
3 The Simplex Method 3.1 Basic Solutions In the LP of Example 2.3, the optimal solution happened to lie at an extreme point of the feasible set. This was not a coincidence. Consider an LP in general form,
More informationIE 5531: Engineering Optimization I
IE 5531: Engineering Optimization I Lecture 5: The Simplex method, continued Prof. John Gunnar Carlsson September 22, 2010 Prof. John Gunnar Carlsson IE 5531: Engineering Optimization I September 22, 2010
More informationExample. 1 Rows 1,..., m of the simplex tableau remain lexicographically positive
3.4 Anticycling Lexicographic order In this section we discuss two pivoting rules that are guaranteed to avoid cycling. These are the lexicographic rule and Bland s rule. Definition A vector u R n is lexicographically
More informationPart 1. The Review of Linear Programming
In the name of God Part 1. The Review of Linear Programming 1.5. Spring 2010 Instructor: Dr. Masoud Yaghini Outline Introduction Formulation of the Dual Problem Primal-Dual Relationship Economic Interpretation
More informationChap6 Duality Theory and Sensitivity Analysis
Chap6 Duality Theory and Sensitivity Analysis The rationale of duality theory Max 4x 1 + x 2 + 5x 3 + 3x 4 S.T. x 1 x 2 x 3 + 3x 4 1 5x 1 + x 2 + 3x 3 + 8x 4 55 x 1 + 2x 2 + 3x 3 5x 4 3 x 1 ~x 4 0 If we
More informationWe say that a flow is feasible for G (or just feasible if the graph and capacity function in question are obvious) if
CS787: Advanced Algorithms Lecture 4: Network Flow We devote this lecture to the network flow problem and the max-flow min-cut theorem. A number of other problems can be cast into a maximum flow or minimum
More informationΩ R n is called the constraint set or feasible set. x 1
1 Chapter 5 Linear Programming (LP) General constrained optimization problem: minimize subject to f(x) x Ω Ω R n is called the constraint set or feasible set. any point x Ω is called a feasible point We
More informationIE 5531: Engineering Optimization I
IE 5531: Engineering Optimization I Lecture 7: Duality and applications Prof. John Gunnar Carlsson September 29, 2010 Prof. John Gunnar Carlsson IE 5531: Engineering Optimization I September 29, 2010 1
More information3. THE SIMPLEX ALGORITHM
Optimization. THE SIMPLEX ALGORITHM DPK Easter Term. Introduction We know that, if a linear programming problem has a finite optimal solution, it has an optimal solution at a basic feasible solution (b.f.s.).
More informationLinear Programming Duality
Summer 2011 Optimization I Lecture 8 1 Duality recap Linear Programming Duality We motivated the dual of a linear program by thinking about the best possible lower bound on the optimal value we can achieve
More informationOptimization methods NOPT048
Optimization methods NOPT048 Jirka Fink https://ktiml.mff.cuni.cz/ fink/ Department of Theoretical Computer Science and Mathematical Logic Faculty of Mathematics and Physics Charles University in Prague
More informationIntroduction to Linear Programming
Nanjing University October 27, 2011 What is LP The Linear Programming Problem Definition Decision variables Objective Function x j, j = 1, 2,..., n ζ = n c i x i i=1 We will primarily discuss maxizming
More informationDuality of LPs and Applications
Lecture 6 Duality of LPs and Applications Last lecture we introduced duality of linear programs. We saw how to form duals, and proved both the weak and strong duality theorems. In this lecture we will
More informationChapter 5 Linear Programming (LP)
Chapter 5 Linear Programming (LP) General constrained optimization problem: minimize f(x) subject to x R n is called the constraint set or feasible set. any point x is called a feasible point We consider
More informationIntroduction to optimization
Introduction to optimization Geir Dahl CMA, Dept. of Mathematics and Dept. of Informatics University of Oslo 1 / 24 The plan 1. The basic concepts 2. Some useful tools (linear programming = linear optimization)
More informationLinear Programming, Lecture 4
Linear Programming, Lecture 4 Corbett Redden October 3, 2016 Simplex Form Conventions Examples Simplex Method To run the simplex method, we start from a Linear Program (LP) in the following standard simplex
More informationSummary of the simplex method
MVE165/MMG631,Linear and integer optimization with applications The simplex method: degeneracy; unbounded solutions; starting solutions; infeasibility; alternative optimal solutions Ann-Brith Strömberg
More informationDiscrete Optimization. Guyslain Naves
Discrete Optimization Guyslain Naves Fall 2010 Contents 1 The simplex method 5 1.1 The simplex method....................... 5 1.1.1 Standard linear program................. 9 1.1.2 Dictionaries........................
More informationAnn-Brith Strömberg. Lecture 4 Linear and Integer Optimization with Applications 1/10
MVE165/MMG631 Linear and Integer Optimization with Applications Lecture 4 Linear programming: degeneracy; unbounded solution; infeasibility; starting solutions Ann-Brith Strömberg 2017 03 28 Lecture 4
More informationORF 522. Linear Programming and Convex Analysis
ORF 5 Linear Programming and Convex Analysis Initial solution and particular cases Marco Cuturi Princeton ORF-5 Reminder: Tableaux At each iteration, a tableau for an LP in standard form keeps track of....................
More informationCS675: Convex and Combinatorial Optimization Fall 2016 Combinatorial Problems as Linear and Convex Programs. Instructor: Shaddin Dughmi
CS675: Convex and Combinatorial Optimization Fall 2016 Combinatorial Problems as Linear and Convex Programs Instructor: Shaddin Dughmi Outline 1 Introduction 2 Shortest Path 3 Algorithms for Single-Source
More informationCS261: Problem Set #3
CS261: Problem Set #3 Due by 11:59 PM on Tuesday, February 23, 2016 Instructions: (1) Form a group of 1-3 students. You should turn in only one write-up for your entire group. (2) Submission instructions:
More informationCS261: A Second Course in Algorithms Lecture #9: Linear Programming Duality (Part 2)
CS261: A Second Course in Algorithms Lecture #9: Linear Programming Duality (Part 2) Tim Roughgarden February 2, 2016 1 Recap This is our third lecture on linear programming, and the second on linear programming
More informationAlgorithms and Theory of Computation. Lecture 13: Linear Programming (2)
Algorithms and Theory of Computation Lecture 13: Linear Programming (2) Xiaohui Bei MAS 714 September 25, 2018 Nanyang Technological University MAS 714 September 25, 2018 1 / 15 LP Duality Primal problem
More informationUnderstanding the Simplex algorithm. Standard Optimization Problems.
Understanding the Simplex algorithm. Ma 162 Spring 2011 Ma 162 Spring 2011 February 28, 2011 Standard Optimization Problems. A standard maximization problem can be conveniently described in matrix form
More informationCHAPTER 2. The Simplex Method
CHAPTER 2 The Simplex Method In this chapter we present the simplex method as it applies to linear programming problems in standard form. 1. An Example We first illustrate how the simplex method works
More informationOPTIMISATION 3: NOTES ON THE SIMPLEX ALGORITHM
OPTIMISATION 3: NOTES ON THE SIMPLEX ALGORITHM Abstract These notes give a summary of the essential ideas and results It is not a complete account; see Winston Chapters 4, 5 and 6 The conventions and notation
More informationThe Dual Simplex Algorithm
p. 1 The Dual Simplex Algorithm Primal optimal (dual feasible) and primal feasible (dual optimal) bases The dual simplex tableau, dual optimality and the dual pivot rules Classical applications of linear
More information4.6 Linear Programming duality
4.6 Linear Programming duality To any minimization (maximization) LP we can associate a closely related maximization (minimization) LP Different spaces and objective functions but in general same optimal
More informationLinear and Integer Programming - ideas
Linear and Integer Programming - ideas Paweł Zieliński Institute of Mathematics and Computer Science, Wrocław University of Technology, Poland http://www.im.pwr.wroc.pl/ pziel/ Toulouse, France 2012 Literature
More informationCS675: Convex and Combinatorial Optimization Fall 2014 Combinatorial Problems as Linear Programs. Instructor: Shaddin Dughmi
CS675: Convex and Combinatorial Optimization Fall 2014 Combinatorial Problems as Linear Programs Instructor: Shaddin Dughmi Outline 1 Introduction 2 Shortest Path 3 Algorithms for Single-Source Shortest
More informationRevised Simplex Method
DM545 Linear and Integer Programming Lecture 7 Marco Chiarandini Department of Mathematics & Computer Science University of Southern Denmark Outline 1. 2. 2 Motivation Complexity of single pivot operation
More informationA primal-simplex based Tardos algorithm
A primal-simplex based Tardos algorithm Shinji Mizuno a, Noriyoshi Sukegawa a, and Antoine Deza b a Graduate School of Decision Science and Technology, Tokyo Institute of Technology, 2-12-1-W9-58, Oo-Okayama,
More information