1 Introduction to Linear Programming. 2 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. X1X2X3X4X1X2X3X4.

Slides:



Advertisements
Similar presentations
February 14, 2002 Putting Linear Programs into standard form
Advertisements

The simplex algorithm The simplex algorithm is the classical method for solving linear programs. Its running time is not polynomial in the worst case.
Geometry and Theory of LP Standard (Inequality) Primal Problem: Dual Problem:
Linear Programming (LP) (Chap.29)
Linear Programming – Simplex Method
Introduction to Algorithms
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2002 Lecture 8 Tuesday, 11/19/02 Linear Programming.
1 Introduction to Linear Programming. 2 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. X1X2X3X4X1X2X3X4.
Copyright (c) 2003 Brooks/Cole, a division of Thomson Learning, Inc
Dragan Jovicic Harvinder Singh
Operation Research Chapter 3 Simplex Method.
CS38 Introduction to Algorithms Lecture 15 May 20, CS38 Lecture 15.
Linear Programming.
1 Linear Programming Jose Rolim University of Geneva.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2006 Lecture 9 Wednesday, 11/15/06 Linear Programming.
Design and Analysis of Algorithms
Chapter 10: Iterative Improvement
Linear Programming (LP)
The Simplex Method.
MIT and James Orlin © Chapter 3. The simplex algorithm Putting Linear Programs into standard form Introduction to Simplex Algorithm.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2008 Lecture 9 Tuesday, 11/18/08 Linear Programming.
LINEAR PROGRAMMING SIMPLEX METHOD.
OR Chapter 3. Pitfalls OR  Selection of leaving variable: a)No restriction in minimum ratio test : can increase the value of the entering.
Chapter 6 Sensitivity Analysis & Duality
Duality Theory LI Xiaolei.
Chapter 3. Pitfalls Initialization Ambiguity in an iteration
1 1 Slide © 2000 South-Western College Publishing/ITP Slides Prepared by JOHN LOUCKS.
Kerimcan OzcanMNGT 379 Operations Research1 Linear Programming: The Simplex Method Chapter 5.
1 1 © 2003 Thomson  /South-Western Slide Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
1 1 © 2003 Thomson  /South-Western Slide Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
Chapter 6 Linear Programming: The Simplex Method Section R Review.
Duality Theory  Every LP problem (called the ‘Primal’) has associated with another problem called the ‘Dual’.  The ‘Dual’ problem is an LP defined directly.
Linear Programming – Simplex Method
Chapter 4 Linear Programming: The Simplex Method
Flows in Planar Graphs Hadi Mahzarnia. Outline O Introduction O Planar single commodity flow O Multicommodity flows for C 1 O Feasibility O Algorithm.
C&O 355 Mathematical Programming Fall 2010 Lecture 5 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AA A A.
Hon Wai Leong, NUS (CS6234, Spring 2009) Page 1 Copyright © 2009 by Leong Hon Wai CS6234: Lecture 4  Linear Programming  LP and Simplex Algorithm [PS82]-Ch2.
OR Chapter 8. General LP Problems Converting other forms to general LP problem : min c’x  - max (-c)’x   = by adding a nonnegative slack variable.
C&O 355 Lecture 7 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A.
CPSC 536N Sparse Approximations Winter 2013 Lecture 1 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAAAAAAA.
OR Chapter 7. The Revised Simplex Method  Recall Theorem 3.1, same basis  same dictionary Entire dictionary can be constructed as long as we.
An-Najah N. University Faculty of Engineering and Information Technology Department of Management Information systems Operations Research and Applications.
Chapter 8 Network Models to accompany Operations Research: Applications and Algorithms 4th edition by Wayne L. Winston Copyright (c) 2004 Brooks/Cole,
1. 2 We studying these special cases to: 1- Present a theoretical explanation of these situations. 2- Provide a practical interpretation of what these.
TU/e Algorithms (2IL15) – Lecture 12 1 Linear Programming.
Copyright © 2006 Brooks/Cole, a division of Thomson Learning, Inc. Linear Programming: An Algebraic Approach 4 The Simplex Method with Standard Maximization.
Approximation Algorithms based on linear programming.
1 Simplex algorithm. 2 The Aim of Linear Programming A Linear Programming model seeks to maximize or minimize a linear function, subject to a set of linear.
Chapter 4 The Simplex Algorithm and Goal Programming
The Simplex Method. and Maximize Subject to From a geometric viewpoint : CPF solutions (Corner-Point Feasible) : Corner-point infeasible solutions 0.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Spring, 2010 Lecture 9 Tuesday, 4/20/10 Linear Programming 1.
Linear Programming Many problems take the form of maximizing or minimizing an objective, given limited resources and competing constraints. specify the.
Chap 10. Sensitivity Analysis
Linear Programming (LP) (Chap.29)
Perturbation method, lexicographic method
6.5 Stochastic Prog. and Benders’ decomposition
Linear Programming.
Chapter 4 Linear Programming: The Simplex Method
Chap 9. General LP problems: Duality and Infeasibility
Chapter 5. Sensitivity Analysis
Chap 3. The simplex method
Outline Simplex algorithm The initial basic feasible solution
Chapter 8. General LP Problems
Lecture 4 Part I Mohamed A. M. A..
Flow Feasibility Problems
Chapter 8. General LP Problems
6.5 Stochastic Prog. and Benders’ decomposition
Chapter 10: Iterative Improvement
Chapter 8. General LP Problems
Practical Issues Finding an initial feasible solution Cycling
Presentation transcript:

1 Introduction to Linear Programming

2 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. X1X2X3X4X1X2X3X4 Unit: thousand

3 Standard form, objective function, feasible solution and region, simplex algorithm, ellipsoid algorithm, interior-point method.

4 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

5  Objective function  Constraints  Nonnegative constraints

6 Converting linear programs into standard form:

7

8 Since x = y iff x  y and y  x, we can replace equality constraint by the pair of inequality constraints.

9 Converting linear programs into slack form: z = 2x x x 3 x 4 = 7 - x 1 - x 2 + x 3 x 5 =-7 + x 1 + x 2 - x 3 x 6 = 4 - x x x 3 slack form:

10 N: the set of indices of nonbasic variables, |N|=n. B: the set of indices of basic variables, |B|=m. N  B ={1, 2, …, m+n}. A slack form: z = 28 - x 3 /6 - x 5 /6 - 2 x 6 /3 x 1 = 8 + x 3 /6 + x 5 /6 - x 6 /3 x 2 = 4 - 8x 3 /3 - 2 x 5 /3 + x 6 /3 x 4 = 18 - x 3 /2 + x 5 /2

11 Formulating problems as LP: Single-pair shortest-path: given G=(V, E), w, s and t, we want to compute d t, which is the weight of a shortest path from s to t. min d t subj. to d v ≤ d u + w(u, v) for each (u, v) in E, d s = 0. Maximum flow: max  v f sv -  v f vs subj. to f uv ≤ c(u, v) for each u, v in V, f uv ≥ 0 for each u, v in V,  v f uv =  v f vu for each u in V-{s, t}.

12 Minimum-cost flow:

13 Minimum cost flow: min  (u,v) a(u,v) f uv subj. to f uv ≤ c(u, v) for each u, v in V, f uv ≥ 0 for each u, v in V,  v f vu -  v f uv = 0 for each u in V-{s, t},  v f sv -  v f vs = d,

14 Multi-commodity flow: Given a flow network and k different commodities, K 1, K 2,..., K k, where each K i = (s i, t i, d i ) and s i is the source of commodity i, t i is the sink and d i is the demand– the desired flow from s i to t i. Define a flow f i for commodity i and f uv =  i=1..k f iuv. Want to determine whether it is possible to find such a flow. LP is the only known polynomial-time algorithm for this problem. min 0 subj. to  i=1..k f iuv ≤ c(u, v) for each u, v in V, f iuv ≥ 0 for each u, v in V and i= 1..k,  v f iuv -  v f ivu = 0 for each u in V-{s i, t i } and i= 1..k,  v f is i v -  v f ivs i = d i for each i = 1..k.

15 Simplex algorithm: Want to find a basic feasible solution (BFS) from basic solution. Goal: in each iteration, reformulate the LP so that BFS has a greater object value. Attempt: select a non-basic variable x e whose coefficient in the object function is positive and increase its value as much as possible without violating any constraint. Then x e becomes basic and some x l becomes non-basic.

16 Slack form: z = 3 x 1 + x 2 + 2x 3 x 4 = 30 - x 1 - x x 3 x 5 = x 1 - 2x 2 - 5x 3 x 6 = x 1 - x 2 - 2x 3 x 1 : entering variable, x 6 : leaving variable. z = 27+ x 2 /4 + x 3 /2 - 3 x 6 /4 x 1 = 9 - x 2 /4 - x 3 /2 - x 6 /4 x 4 = x 2 /4 - 5 x 3 /2 + x 6 /4 x 5 = x 2 /2 - 4x 3 + x 6 /2. pivoting z = 111/4+ x 2 /16 - x 5 / x 6 /16 x 1 = 33/4 - x 2 /16 + x 5 /8 - 5x 6 /16 x 3 = 3/2 - 3 x 2 /8 - x 5 /4 + x 6 /8 x 4 = 69/4 + 3 x 2 /16 +5x 5 /8 - x 6 /16. z = 28- x 3 /6 - x 5 /6 - 2 x 6 /3 x 1 = 8 + x 3 /6 + x 5 /6 - x 6 /3 x 2 = x 3 /3 - 2x 5 /3 + x 6 /3 x 4 = 18 - x 3 /2 +x 5 /2.

17

18 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

19

20 1.How do we determine if a linear program is feasible? 2.What do we do if the LP is feasible, but the initial basic solution is not feasible? 3. How do we determine if a linear program is unbounded? 4. How do we choose the entering and leaving variables?

21 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

22 Lemma 2: Given a linear program (A, b, c), suppose the call to INITIALIZE-SIMPLEX in line 1 of SIMPLEX returns a slack form for which the basic solution is feasible. Then if SIMPLEX returns a solution in line 16, that solution is a feasible solution to the LP. If SIMPLEX returns “unbounded” in line 10, the LP is unbounded.

23 Lemma 3: Let I be a set of indices. For each i in I, let  i and  i be real numbers and let x i be a real-valued variable. Let  be any real number. Suppose that for any settings of the x i we have:

24 Lemma 4: Let (A, b, c) be an LP in standard form. Given a set B of basic variables, the associated slack form is uniquely determined. Pf: By contradiction, suppose there are two slack form with the same B:

25 Lemma 5: If SIMPLEX fails to terminate in at most (m+n)!/m!n! iterations, then it cycles. Lemma 6: (Bland’s rule) In line 3 and 8 of SIMPLEX, ties are always broken by choosing the variable with the smallest index, then SIMPLEX must terminate.

26 Lemma 7: Assuming that INITIALIZE-SIMPLEX returns a slack form for which the basic solution is feasible, SIMPLEX either reports that an LP is unbounded, or it terminates with a feasible solution in at most (m+n)!/m!n! iterations.

27 Duality: primal and dual

28

29

30

31 Finding an initial solution: Slack form: z = - x 0 x 3 = 2 - 2x 1 + x 2 + x 0 x 4 = -4 - x 1 +5x 2 + x 0 z = -4 - x 1 +5 x 2 - x 4 x 0 = 4 + x 1 -5 x 2 + x 4 x 3 = 6 - x 1 -4 x 2 + x 4

32 z = -4 - x 1 +5 x 2 - x 4 x 0 = 4+ x 1 -5 x 2 + x 4 x 3 = 6- x 1 -4 x 2 + x 4 (4,0,0,6,0) is a BFS. z = - x 0 x 2 = 4/5- x 0 /5 + x 1 /5 + x 4 /5 x 3 = 14/5+ 4x 0 /5 - 9x 1 /5 + x 4 /5 The following has a BFS. z = -4/5 +9x 1 /5 - x 4 /5 x 2 = 4/5 + x 1 /5 + x 4 /5 x 3 = 14/5- 9x 1 /5 + x 4 /5 Take x 0 = 0. Then x 2 = 4/5 + x 1 /5 + x 4 /5, and 2x 1 - x 2 = -4/5 +9x 1 /5 - x 4 /5.

33 Lemma 11: Let L be a LP in standard form. Let L aux be the following LP with n+1 variables:

34 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

35 Lemma 12: If a LP L has no feasible solution, INITIALIZE-SIMPLEX returns “infeasible.” Otherwise, it returns a valid slack form for which the basic solution is feasible. Theorem 13: (Fundamental theorem of LP) 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.