The Simplex Algorithm 虞台文 大同大學資工所 智慧型多媒體研究室. Content Basic Feasible Solutions The Geometry of Linear Programs Moving From Bfs to Bfs Organization of a.

Slides:



Advertisements
Similar presentations
Lecture #3; Based on slides by Yinyu Ye
Advertisements

MATHEMATICS 3 Operational Analysis Štefan Berežný Applied informatics Košice
Computational Methods for Management and Economics Carla Gomes Module 6a Introduction to Simplex (Textbook – Hillier and Lieberman)
How should we define corner points? Under any reasonable definition, point x should be considered a corner point x What is a corner point?
Optimization Problems 虞台文 大同大學資工所 智慧型多媒體研究室. Content Introduction Definitions Local and Global Optima Convex Sets and Functions Convex Programming Problems.
Linear Programming Fundamentals Convexity Definition: Line segment joining any 2 pts lies inside shape convex NOT convex.
The Structure of Polyhedra Gabriel Indik March 2006 CAS 746 – Advanced Topics in Combinatorial Optimization.
Basic Feasible Solutions: Recap MS&E 211. WILL FOLLOW A CELEBRATED INTELLECTUAL TEACHING TRADITION.
主講人:虞台文 大同大學資工所 智慧型多媒體研究室
Linear Inequalities and Linear Programming Chapter 5
Computational Methods for Management and Economics Carla Gomes Module 6b Simplex Pitfalls (Textbook – Hillier and Lieberman)
Linear programming Thomas S. Ferguson University of California at Los Angeles Compressive Sensing Tutorial PART 3 Svetlana Avramov-Zamurovic January 29,
CS38 Introduction to Algorithms Lecture 15 May 20, CS38 Lecture 15.
Eigenvalues and Eigenvectors
Design and Analysis of Algorithms
CSC5160 Topics in Algorithms Tutorial 1 Jan Jerry Le
C&O 355 Lecture 2 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A.
Linear Algebra Lecture 25.
1. The Simplex Method.
Simplex method (algebraic interpretation)
A matrix equation has the same solution set as the vector equation which has the same solution set as the linear system whose augmented matrix is Therefore:
Linear Programming System of Linear Inequalities  The solution set of LP is described by Ax  b. Gauss showed how to solve a system of linear.
1 Linear programming Linear program: optimization problem, continuous variables, single, linear objective function, all constraints linear equalities or.
Chapter 3. Pitfalls Initialization Ambiguity in an iteration
Pareto Linear Programming The Problem: P-opt Cx s.t Ax ≤ b x ≥ 0 where C is a kxn matrix so that Cx = (c (1) x, c (2) x,..., c (k) x) where c.
3.3 Implementation (1) naive implementation (2) revised simplex method
OR Backgrounds-Convexity  Def: line segment joining two points is the collection of points.
Lecture 1: A Formal Model of Computation 虞台文 大同大學資工所 智慧型多媒體研究室.
§1.4 Algorithms and complexity For a given (optimization) problem, Questions: 1)how hard is the problem. 2)does there exist an efficient solution algorithm?
Chapter 3 Linear Programming Methods
I.4 Polyhedral Theory 1. Integer Programming  Objective of Study: want to know how to describe the convex hull of the solution set to the IP problem.
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.
MIT and James Orlin © Chapter 3. The simplex algorithm Putting Linear Programs into standard form Introduction to Simplex Algorithm file Simplex2_AMII_05a_gr.
The Simplex Algorithm 虞台文 大同大學資工所 智慧型多媒體研究室. Content Basic Feasible Solutions The Geometry of Linear Programs Moving From Bfs to Bfs Organization of a.
Part 3. Linear Programming 3.2 Algorithm. General Formulation Convex function Convex region.
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.
Hopfield Neural Networks for Optimization 虞台文 大同大學資工所 智慧型多媒體研究室.
Lecture 2: Limiting Models of Instruction Obeying Machine 虞台文 大同大學資工所 智慧型多媒體研究室.
OR  Now, we look for other basic feasible solutions which gives better objective values than the current solution. Such solutions can be examined.
5 5.1 © 2016 Pearson Education, Ltd. Eigenvalues and Eigenvectors EIGENVECTORS AND EIGENVALUES.
Linear Programming 虞台文.
Linear Programming Chap 2. The Geometry of LP  In the text, polyhedron is defined as P = { x  R n : Ax  b }. So some of our earlier results should.
EM Algorithm 主講人:虞台文 大同大學資工所 智慧型多媒體研究室. Contents Introduction Example  Missing Data Example  Mixed Attributes Example  Mixture Main Body Mixture Model.
1 Chapter 4 Geometry of Linear Programming  There are strong relationships between the geometrical and algebraic features of LP problems  Convenient.
Discrete Optimization
7.3 Linear Systems of Equations. Gauss Elimination
EMGT 6412/MATH 6665 Mathematical Programming Spring 2016
Chap 10. Sensitivity Analysis
Perturbation method, lexicographic method
Proving that a Valid Inequality is Facet-defining
Chap 9. General LP problems: Duality and Infeasibility
Polyhedron Here, we derive a representation of polyhedron and see the properties of the generators. We also see how to identify the generators. The results.
Chapter 5. Sensitivity Analysis
Polyhedron Here, we derive a representation of polyhedron and see the properties of the generators. We also see how to identify the generators. The results.
Part 3. Linear Programming
Elementary Linear Algebra
Solving Linear Programming Problems: Asst. Prof. Dr. Nergiz Kasımbeyli
Chapter 8. General LP Problems
Elementary Linear Algebra
Affine Spaces Def: Suppose
I.4 Polyhedral Theory (NW)
I.4 Polyhedral Theory.
Proving that a Valid Inequality is Facet-defining
Chapter 8. General LP Problems
Hopfield Neural Networks for Optimization
Chapter 2. Simplex method
Simplex method (algebraic interpretation)
BASIC FEASIBLE SOLUTIONS
Chapter 8. General LP Problems
Chapter 2. Simplex method
Presentation transcript:

The Simplex Algorithm 虞台文 大同大學資工所 智慧型多媒體研究室

Content Basic Feasible Solutions The Geometry of Linear Programs Moving From Bfs to Bfs Organization of a Tableau

Linear Programming Basic Feasible Solutions 大同大學資工所 智慧型多媒體研究室

The Goal of the Simplex Algorithm Any LP can be converted into the standard form

Convex Polytope defines a convex set F F may be 1.Bounded 2.Unbounded 3.Empty

The Basic Idea of Simplex Algorithm basic feasible solution at a corner Finding optimum by moving around the corner of the convex polytope in cost descent sense

The Basic Idea of Simplex Algorithm basic feasible solution at a corner Finding optimum by moving around the corner of the convex polytope in cost descent sense How to find an initial feasible solution? How to move from corner to corner?

Assumption 1 Assume that A is of rank m. There is a basis Independent has an inverse.

Basic Solution The basis solution corresponding to B is: The basis solution may be infeasible.

Example x1x1 x2x2 x3x3 x4x4 x5x5 x6x6 x7x7

x1x1 x2x2 x3x3 x4x4 x5x5 x6x6 x7x7 feasible

Example x1x1 x2x2 x3x3 x4x4 x5x5 x6x6 x7x7 infeasible

Basic Feasible Solution defines an nonempty convex set F If a basic solution is in F, it is called a basic feasible solution (bfs).

The Existence of BFS’s F may be 1.Bounded 2.Unbounded 3.Empty If F is nonempty, at least one bfs. defines an nonempty convex set F

The Existence of BFS’s F may be 1.Bounded 2.Unbounded 3.Empty If F is nonempty, at least one bfs. How to find it?

Assumptions 1. A is of rank m. 2. F is nonempty. 3. c ’ x is bounded below for x  F. 1. A is of rank m. 2. F is nonempty. 3. c ’ x is bounded below for x  F. defines an nonempty convex set F

Assumptions 1. A is of rank m. 2. F is nonempty. 3. c ’ x is bounded below for x  F. 1. A is of rank m. 2. F is nonempty. 3. c ’ x is bounded below for x  F. There exist bfs’s. defines an nonempty convex set F Ensure there is a bounded solution. Are all bfs’s the vertices of the convex polytope defined by F ?

The Simplex Alogrithm The Geometry of Linear Programs 大同大學資工所 智慧型多媒體研究室

Linear Subspaces of R d S  R d is a subspace of R d if it is closed under vector addition and scalar multiplication. S defined below is a subspace of R d. a set of homogenous linear equations

Dimensions

Affine subspaces A translated linear subspace. E.g., an affine subspace a set of nonhomogenous linear equations an affine subspace

Dimensions an affine subspace

Subsets of R d The following subsets are not subspace or affine subspace. A line segment The first quadrant A halfspace

Dimensions The following subsets are not subspace or affine subspace. A line segment The first quadrant A halfspace The dimension of any subset of R d is the smallest dimension of any affine subspace which contains it. Dim = 1 Dim = 2

The Feasible Spaces of LP 1. A is of rank m. 2. F is nonempty. 3. c ’ x is bounded below for x  F. 1. A is of rank m. 2. F is nonempty. 3. c ’ x is bounded below for x  F. defines an nonempty convex set F

Hyperplane/Halfspace An affine subspace of R d of dimension d  1 is called a hyperplane. A hyperplane defines two closed halfspaces: Fact: Halfspaces are convex.

Convex Polytopes The intersection of a finite number of halfspaces, when it is bounded and nonempty is called a convex polytope, or simply a polytope. Fact: Halfspaces are convex.

x1x1 x2x2 x3x3 Example     (0, 0, 3) (1, 0, 3) (2, 0, 2) (2, 0, 0) (2, 2, 0)(0, 2, 0) (0, 1, 3) (0, 0, 0)    

More on Polytopes Geometric views of a polytope – The convex hull of a finite set of points. – The intersection of a finite number of halfspaces, when it is bounded and nonempty, i.e., defined by The algebraic view of a polytope The feasible space defined by LP (in standard form). Any relation?

LP  Polytopes Assume m columns n  m columns x1x1 x2x2 xnmxnm x n  m+1 xnxn A can always be in this form if rank(A)=m. LP

LP  Polytopes Assume m columns n  m columns x1x1 x2x2 xnmxnm x n  m+1 xnxn LP

LP  Polytopes 00 LP

Polytopes  LP m inequalities m equalities

Polytopes  LP m inequalities Slack variables

Polytopes  LP Slack variables

Polytopes and LP Slack variables H I H

Polytopes and LP The answer

Polytopes and LP The answer

Polytopes & F of LP defines a polytope defines a feasible set Are there any relations?

Polytopes & F of LP defines a polytope defines a feasible set Some points in P are vertices. Some points in F are bfs’s. Are there any relations?

Theorem 1 a convex polytope a feasible set of the corresponding LP is a vertex of P is a bfs.

Theorem 1 Pf) “”“” See textbook.

Theorem 1 Pf) “”“” Fact:is a vertex, then it cannot be the strict combination of points of P, i.e.,

Theorem 1 Pf) “”“” Fact:is a vertex, then it cannot be the strict combination of points of P, i.e.,

Theorem 1 Pf) “”“” Fact: Define B = {A j : x j > 0, 1  j  n} Let We want to show at most m nonzero x i ’s. We want to show that vectors in B are linearly independent. Suppose not. Then, some d j  0. >0 if  is sufficiently small.

Theorem 1 Pf) “”“” Fact: Define B = {A j : x j > 0, 1  j  n} Let We want to show at most m nonzero x i ’s. We want to show that vectors in B are linearly independent. Suppose not. Then, some d j  0. >0 if  is sufficiently small. Define  is sufficiently small.

Theorem 1 Pf) “”“” Fact: Define B = {A j : x j > 0, 1  j  n} Let We want to show at most m nonzero x i ’s. A j are linearly independent. | B |  m.  Since rank(A) = m, we can always augment B to include m linearly independent vectors. Using B to form basic columns renders x a bfs.

Discussion Pf) “”“” Fact: Define B = {A j : x j > 0, 1  j  n} Let We want to show at most m nonzero x i ’s. A j are linearly independent. | B |  m.  Since rank(A) = m, we can always augment B to include m linearly independent vectors. Using B to form basic columns renders x a bfs. If | B | < m, there may be many ways to augment to m linearly independent vectors. Two different B and B ’ may corresponds to the same bfs. If | B | < m, there may be many ways to augment to m linearly independent vectors. Two different B and B ’ may corresponds to the same bfs. Two different, their corresponding B and B ’ must be different.

Example x1x1 x2x2 x3x3     (0, 0, 3) (1, 0, 3) (2, 0, 2) (2, 0, 0) (2, 2, 0)(0, 2, 0) (0, 1, 3) (0, 0, 0)    

Example Corresponding F of LP

Example Corresponding F of LP

Example Corresponding F of LP B and B ’ determine the same bfs, i.e, x = (2, 2, 0, 0, 0, 3, 0) ’. B and B ’ determine the same bfs, i.e, x = (2, 2, 0, 0, 0, 3, 0) ’.

Degeneration A bfs is called degenerate if it contains more than n  m zeros.

x x Theorem 2 A bfs is called degenerate if it contains more than n  m zeros. If two distinct bases corresponding to the same bfs x, then x is degenerate. Pf) Let B and B ’ be two distinct bases which determine the same bfs x. B B’B’ n m m

x x Theorem 2 A bfs is called degenerate if it contains more than n  m zeros. Pf) Let B and B ’ be two distinct bases which determine the same bfs x. B B’B’ n m m 00 x has more than n  m zeros and, hence, is degenerate. If two distinct bases corresponding to the same bfs x, then x is degenerate.

Discussion A bfs is called degenerate if it contains more than n  m zeros. If two distinct bases corresponding to the same bfs x, then x is degenerate. Changing basis may keep bfs unchanged.

More on Theorem 1 and 2 Vertices of polytopeBfs’s of LP Change vertexChange bfs ? A bfs is determined by a chosen basis. Change verticesChange basis ?

Costs ? ? ?

Costs constant

Theorem 3 There is an optimal bfs in any instance of LP. Furthermore, if q bfs’s are optimal, their convex combinations are also optimal.

Theorem 3 There is an optimal bfs in any instance of LP. Furthermore, if q bfs’s are optimal, their convex combinations are also optimal. Let x 0  P be the optimal solution, and let x 1, …, x N be the vertices of P. with Let j be the index corresponding to the vertex with lowest cost. x j is the optimum. Pf) and

Theorem 3 There is an optimal bfs in any instance of LP. Furthermore, if q bfs’s are optimal, their convex combinations are also optimal. Assume y 1, …, y q be the optimal vertices. Pf) Let withand

Linear Programming Moving from Bfs to Bfs 大同大學資工所 智慧型多媒體研究室

Facts The optimal solution can be found from vertices of the corresponding polytope. The bfs’s of LP and the vertices of polytope are close correlated. The algorithm to solve LP: – Move from vertex to vertex; or – Move from bfs to bfs

The BFS’s Basis columns Nonbasis columns The bfs is determined from the set of basis columns, i.e., B. Move from bfs to bfs:

Move from Bfs to Bfs Let x 0 be the bfs determined by B. Denote the basic components of x 0 as x i0, i = 1, …, m. For any, we have    

Move from Bfs to Bfs m + 1 columns are involved. Choose one A j from to enter B. Choose one A B(i) to leave B. Who enters? Who leaves?

Move from Bfs to Bfs m + 1 columns are involved. Choose one A j from to enter B. Choose one A B(i) to leave B. Who enters? Who leaves?  must be positive. Make one of them zero, and keep others positive. The one that we want to make zero must have x ij > 0. Why?

Move from Bfs to Bfs Suppose that A j wants to enter B. Then, we choose Make one of them zero, and keep others positive.

Move from Bfs to Bfs Suppose that A j wants to enter B. Then, we choose Make one of them zero, and keep others positive. 1.How about if x i0 = 0 for some i ? 2.How about if all x ij  0 ? 1.How about if x i0 = 0 for some i ? 2.How about if all x ij  0 ?

Example x1x1 x2x2 x3x3     (0, 0, 3) (1, 0, 3) (2, 0, 2) (2, 0, 0) (2, 2, 0)(0, 2, 0) (0, 1, 3) (0, 0, 0)    

Example Corresponding F of LP

Example Corresponding F of LP 2214   

Example Corresponding F of LP 2214    Choosing  =1 makes A 6 leaves B. 

Example Corresponding F of LP 224  Choosing  =1 makes A 6 leaves B. 01 11 33 11 00 33   = 0  = 1

Linear Programming Organization of a Tableau 大同大學資工所 智慧型多媒體研究室

Example Ansx1x1 x2x2 x3x3 x4x4 x5x x1x1 x2x2 x3x3 x4x4 x5x 11 2 1 R1 R2  R1 R3  R1 Elementary Row operations

Example Ansx1x1 x2x2 x3x3 x4x4 x5x 11 2 1 R1 R2  R1 R3  R1 B Suppose that we want to choose A 1 to enter the basis, i.e., choosing A 1 as the pivot column.    1/3 2/2 min

Example Ansx1x1 x2x2 x3x3 x4x4 x5x 11 2 1 R1 R2  R1 R3  R1 B    1/3 2/2 min

Example Ansx1x1 x2x2 x3x3 x4x4 x5x 11 2 1 /3 2/2 min Ansx1x1 x2x2 x3x3 x4x4 x5x5 1/3 4/3 10/ /3  7/3 11/3 1/3  2/3 1/