All Topics  
Simplex algorithm

 

   Email Print
   Bookmark   Link

 

Simplex algorithm


 
 

In mathematical optimization theoryOptimization (mathematics)

In mathematics, the term optimization, or mathematical programming, refers to the study of problems in which one seeks...
, the simplex algorithm, created by the AmericanUnited States Summary

The United States of America, also known as the United States, the U.S., the U.S.A., and America, is...
 mathematicianMathematician

A mathematician is a person whose primary area of study and research is the field of mathematics....
 George DantzigGeorge Dantzig Summary

George Bernard Dantzig was an American mathematician, who introduced the simplex algorithm and is considered the "father of...
 in 1947, is a popular algorithmAlgorithm

In mathematics and computing, an algorithm is a procedure for accomplishing some task which, given an initial state, will t...
 for numericalNumerical analysis

Numerical analysis is the study of algorithms for the problems of continuous mathematics ....
 solution of the linear programmingLinear programming

In mathematics, linear programming problems are optimization problems in which the objective function and the constraints a...
 problem. The journal Computing in Science and Engineering listed it as one of the top 10 algorithms of the century.

An unrelated, but similarly named method is the Nelder-Mead methodNelder-Mead method

The Nelder-Mead method or Simplex method or downhill simplex method is a commonly used nonlinear optimization al...
or downhill simplex method due to Nelder & Mead (1965) and is a numerical method for optimising many-dimensionDimension

In common usage, a dimension is a parameter or measurement required to define the characteristics of an object—i.e....
al unconstrained problems, belonging to the more general class of search algorithmSearch algorithm

In computer science, a search algorithm, broadly speaking, is an algorithm that takes a problem as input and returns a solut...
s.

In both cases, the method uses the concept of a simplexSimplex

In geometry, a simplex or n-simplex is an n-dimensional analogue of a triangle....
, which is a polytopePolytope

In geometry polytope means, first, the generalization to any dimension of polygon in two dimensions, and polyhedron in thre...
 of N + 1 vertices in N dimensions: a line segmentLine segment

In geometry, a line segment is a part of a line that is bounded by two end points, and contains every point on the line betw...
 in one dimension, a triangleTriangle

A triangle is one of the basic shapes of geometry: a polygon with three vertices and three sides which are straight line seg...
 in two dimensions, a tetrahedronTetrahedron

A tetrahedron is a polyhedron composed of four triangular faces, three of which meet at each vertex....
 in three-dimensional space and so forth.

Description


A linear programming problem consists of a collection of linearLinear

The word linear comes from the Latin word linearis, which means created by lines....
 inequalities on a number of realReal number Summary

In mathematics, the set of real numbers, denoted R, is the set of all rational numbers and irrational numbers....
 variableVariable

In computer science and mathematics, a variable is a symbol denoting a quantity or symbolic representation....
s and a given linear functionLinear function

A linear function can refer to two slightly different concepts....
 (on these real variables) which is to be maximized or minimized.

In geometric terms we are considering a closedClosed set

In topology and related branches of mathematics, a closed set is a set whose complement is open. ...
 convexConvex set

In Euclidean space, an object is convex if for every pair of points within the object, every point on the straight line segm...
 polytopePolytope

In geometry polytope means, first, the generalization to any dimension of polygon in two dimensions, and polyhedron in thre...
, P, defined by intersecting a number of half-spaceHalf-space

In geometry, a half-space is any of the two parts into which a plane divides the three-dimensional space....
s in n-dimensional Euclidean spaceEuclidean space

Around 300 BC, the Greek mathematician Euclid laid down the rules of what has now come to be called "plane Euclidean geometry", wh...
; each half-space is the area which lies on one side of a hyperplaneHyperplane Overview

A hyperplane is a concept in geometry....
. If the objective is to maximise a linear functional L(x), consider the hyperplanes H(c) defined by ; as c increases, these form a parallel family. If the problem is well-posed, we want to find the largest value of c such that H(c) intersects P (if there is no such largest value of c, this isn't a reasonable question for optimization as it stands). In this case we can show that the optimum value of c is attained on the boundary of P. Methods for finding this optimum point on P work in several ways: some attempt to improve a possible point by moving through the interior of P (so-called interior point methods); others start and remain on the boundary searching for an optimum.

The simplex algorithm follows this latter methodology. The idea is to move along the facets of P in search of the optimum, from point to point. Note that, unless the optimum occurs on an edge or face that is parallel to H, the optimum will be unique and occur at a vertex of the polytope. If an optimum is found on an edge or face that is parallel to H then the optimum is not unique and can be obtained at any point on the edge or face. Since the simplex algorithm is concerned only with finding a single optimal point (even if other equally-optimal points exist), it is possible to look solely at moves skirting the edge of a simplexSimplex

In geometry, a simplex or n-simplex is an n-dimensional analogue of a triangle....
, ignoring the interior. The algorithm specifies how this is to be done.

We start at some vertex of the polytope, and at every iteration we choose an adjacent vertex such that the value of the objective function does not decrease. If no such vertex exists, we have found a solution to the problem. But usually, such an adjacent vertex is nonunique, and a pivot rule must be specified to determine which vertex to pick. Various pivot rules exist.

In 1972, Klee and Minty gave an example of a linear programming problem in which the polytopePolytope

In geometry polytope means, first, the generalization to any dimension of polygon in two dimensions, and polyhedron in thre...
 P is a distortion of an n-dimensional cube. They showed that the simplex method as formulated by Dantzig visits all 2n vertices before arriving at the optimal vertex. This shows that the worst-case complexity of the algorithm is exponential timeExponential time

In complexity theory, exponential time is the computation time of a problem where the time to complete the computation, m'...
. Similar examples have been found for other pivot rules. It is an open question if there is a pivot rule with polynomial timePolynomial time

In computational complexity theory, polynomial time refers to the computation time of a problem where the time, m, is no...
 worst-case complexity.

Nevertheless, the simplex method is remarkably efficient in practice. Attempts to explain this employ the notion of average complexityBest, worst and average case

In computer science, best, worst and average cases of a given algorithm express what the resource usage is at ...
 or (recently) smoothed complexity.

Other algorithms for solving linear programming problems are described in the linear programmingLinear programming

In mathematics, linear programming problems are optimization problems in which the objective function and the constraints a...
 article.

Problem input

Consider a linear programming problem,
maximize
subject to

The simplex algorithm requires the linear programming problem to be in augmented formLinear programming Summary

In mathematics, linear programming problems are optimization problems in which the objective function and the constraints a...
. The problem can then be written as follows in matrix form:
Maximize Z in:


where x are the variables from the standard form, xs are the introduced slack variables from the augmentation process, c contains the optimization coefficients, A and b describe the system of constraint equations, and Z is the variable to be maximized.

The system is typically underdetermined, since the number of variables exceed the number of equations. The difference between the number of variables and the number of equations gives us the degrees of freedom associated with the problem. Any solution, optimal or not, will therefore include a number of variables of arbitrary value. The simplex algorithm uses zero as this arbitrary value, and the number of variables with value zero equals the degrees of freedom.

Variables of nonzero value are called basic variables, and variables of zero value are called nonbasic variables in the simplex algorithm. [This definition is problematic, since basic variables can also take zero value.]

This form simplifies finding the initial basic feasible solution (BF), since all variables from the standard form can be chosen to be nonbasic (zero), while all new variables introduced in the augmented form are basic (nonzero), since their value can be trivially calculated ( for them, since the augmented problem matrix is diagonal on its right half).

Revised simplex algorithm

Matrix form of the simplex algorithm

At any iteration of the simplex algorithm, the tableau will be of this form:


where are the coefficients of basic variables in the c-matrix; and B is the columns of corresponding to the basic variables.

It is worth noting that B and are the only variables in this equation (except Z and x of course). Everything else is constant throughout the algorithm.

Algorithm

  • Choose a basic feasible solution (BF) as shown above

This implies that B is the identity matrix, and is a zero-vector.


  • While nonoptimal solution:
    • Determine direction of highest gradient
      Choose the variable associated with the coefficient in that has the highest negative magnitude. This nonbasic variable, which we call the entering basic, will be increased to help maximize the problem.
    • Determine maximum step length
      Use the subequation to determine which basic variable reaches zero first when the entering basic is increased. This variable, which we call the leaving basic then becomes nonbasic. This operation only involves a single division for each basic variable, since the existing basic-variables occur diagonally in the tableau.
    • Rewrite problem
      Modify B and to account for the new basic variables. This will automatically make the tableau diagonal for the existing and new basic variables.
    • Check for improvement
      Repeat procedure until no further improvement is possible, meaning all the coefficients of are positive. Procedure is also terminated if all coefficients are zero, and the algorithm has walked in a circle and revisited a previous state.


Common Implementations of The Revised Simplex Method

  • The Bartels-Golub Method
  • The Sparse Bartels-Golub Method
  • The Forrest-Tomlin Method
  • Reid’s Method

See also

  • Nelder-Mead methodNelder-Mead method

    The Nelder-Mead method or Simplex method or downhill simplex method is a commonly used nonlinear optimization al...
  • Fourier-Motzkin elimination
  • Bland's anti-cycling ruleBland's rule

    In applied mathematics, Bland's rule is a technique used in the simplex method for ensuring that a linear optimization prob...
  • Karmarkar's algorithmKarmarkar's algorithm

    In mathematics, Karmarkar's algorithm is an algorithm for solving linear programming problems....


External links

  • by Spyros Reveliotis of the Georgia Institute of Technology.
    • Solve your own LP problem. Note: this does not work well. Sample problem: minimize z=x1+x2 subject to 2x1+3x2<=6 and -x1+x2<=1 should give 0 as answer. This applet gives the same answer for both maximize and minimize problem.
  • Java-based hosted by Argonne National Laboratory.
  • by Stefan Waner, hofstra.edu. Interactive worked example.
  • by Mazoo's Learning Blog.
  • A good tutorial for Simplex Method with examples (also two-phase and M-method).
  • Other good tutorial for Simplex Method with the Two-Phase Simplex and Graphical methods, examples, and a tool to solve Simplex problems online.
  • Quick-loading web page that solves Simplex problems