1.48k likes | 1.9k Views
The Simplex Algorithm. 虞台文. 大同大學資工所 智慧型多媒體研究室. Content. Basic Feasible Solutions The Geometry of Linear Programs Moving From Bfs to Bfs Organization of a Tableau Choosing a Profitable Column Pivot Selection Anticycling Algorithm The Two-Phase Simplex Algorithm. Linear Programming.
E N D
The Simplex Algorithm 虞台文 大同大學資工所 智慧型多媒體研究室
Content • Basic Feasible Solutions • The Geometry of Linear Programs • Moving From Bfs to Bfs • Organization of a Tableau • Choosing a Profitable Column • Pivot Selection • Anticycling Algorithm • The Two-Phase Simplex Algorithm
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 • Bounded • Unbounded • Empty F may be
The Basic Idea of Simplex Algorithm Finding optimum by moving around the corner of the convex polytopein cost descent sense basic feasible solution at a corner
The Basic Idea of Simplex Algorithm How to find an initial feasible solution? Finding optimum by moving around the corner of the convex polytopein cost descent sense How to move from corner to corner? basic feasible solution at a corner
Assumption 1 Assume that A is of rank m. Independent There is a basis has an inverse.
Basic Solution The basis solution corresponding to B is: The basis solution may be infeasible.
x1 x2 x3 x4 x5 x6 x7 Example
x1 x2 x3 x4 x5 x6 x7 Example feasible
x1 x2 x3 x4 x5 x6 x7 Example 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 • Bounded • Unbounded • Empty F may be defines an nonempty convex set F If F is nonempty, at least one bfs.
The Existence of BFS’s • Bounded • Unbounded • Empty F may be defines an nonempty convex set F How to find it? If F is nonempty, at least one bfs.
Assumptions defines an nonempty convex set F • A is of rank m. • F is nonempty. • c’x is bounded below for xF.
Assumptions Are all bfs’s the vertices of the convex polytope defined by F? defines an nonempty convex set F • A is of rank m. • F is nonempty. • c’x is bounded below for xF. Ensure there is a bounded solution. There exist bfs’s.
The Simplex Alogrithm The Geometry of Linear Programs 大同大學資工所 智慧型多媒體研究室
Linear Subspaces of Rd • S Rdis a subspace of Rdif it is closed under vector addition and scalar multiplication. • S defined below is a subspace of Rd. a set of homogenous linear equations
an affine subspace an affine subspace Affine subspaces A translated linear subspace. E.g., a set of nonhomogenous linear equations
an affine subspace Dimensions
Subsets of Rd • The following subsets are notsubspace or affine subspace. A line segment The first quadrant A halfspace
The dimension of any subset of Rd is the smallest dimension of any affine subspace which contains it. Dimensions • The following subsets are notsubspace or affine subspace. Dim = 2 Dim = 2 Dim = 1 A line segment The first quadrant A halfspace
The Feasible Spaces of LP defines an nonempty convex set F • A is of rank m. • F is nonempty. • c’x is bounded below for xF.
Fact: Halfspaces are convex. Hyperplane/Halfspace An affine subspace of Rd of dimension d1 is called a hyperplane. Ahyperplane 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.
x3 x1 x2 Example (0, 0, 3) (1, 0, 3) (0, 1, 3) (2, 0, 2) (2, 0, 0) (0, 0, 0) (0, 2, 0) (2, 2, 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 Any relation? The feasible space defined by LP (in standard form).
LP LP Polytopes xn x1 x2 xnm xnm+1 Assume n m columns m columns A can always be in this form if rank(A)=m.
LP LP Polytopes xn x1 x2 xnm xnm+1 Assume n m columns m columns
LP LP Polytopes 0
Polytopes LP m inequalities m equalities
Slack variables Polytopes LP m inequalities m equalities
Slack variables Polytopes LP
Slack variables Polytopes and LP H H I
Polytopes and LP The answer
Polytopes and LP The answer
Polytopes & F of LP defines a polytope Are there any relations? defines a feasible set
Polytopes & F of LP defines a polytope Some points in P are vertices. Are there any relations? Some points in F are bfs’s. defines a feasible set
a convex polytope a feasible set of the corresponding LP is a vertex of P is a bfs. Theorem 1
Theorem 1 Pf) “” See textbook.
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:
Let Suppose not. Then, some dj 0. Theorem 1 Pf) “” Fact: We want to show at most m nonzero xi’s. We want to show that vectors in B are linearly independent. Define B = {Aj: xj > 0, 1 j n} >0 if is sufficiently small.
Let Suppose not. Then, some dj 0. Define Theorem 1 is sufficiently small. Pf) “” Fact: We want to show at most m nonzero xi’s. We want to show that vectors in B are linearly independent. Define B = {Aj: xj > 0, 1 j n} >0 if is sufficiently small.
Let Theorem 1 Pf) “” Fact: We want to show at most m nonzero xi’s. Define B = {Aj: xj > 0, 1 j n} Aj 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.
Let Two different , their corresponding B and B’ must be different. Discussion 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. Pf) “” Fact: We want to show at most m nonzero xi’s. Define B = {Aj: xj > 0, 1 j n} Aj 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.
x3 (0, 0, 3) (1, 0, 3) (0, 1, 3) (2, 0, 2) (2, 0, 0) (0, 0, 0) x1 x2 (0, 2, 0) (2, 2, 0) Example
Example Corresponding F of LP