Simplex algorithm: Difference between revisions

Content deleted Content added
YurikBot (talk | contribs)
m robot Adding: es
External links: add Archive.org link to simplex-m
 
(701 intermediate revisions by more than 100 users not shown)
Line 1:
{{Short description|Algorithm for linear programming}}
In mathematical [[optimization (mathematics)| optimization theory]], the '''simplex [[algorithm]]''' of [[George Dantzig]] is a popular technique for [[numerical analysis|numerical]] solution of the [[linear programming]] problem. An unrelated, but similarly named method is the '''[[Nelder-Mead method]]''' or '''downhill simplex method''' due to Nelder & Mead (1965) and is a [[numerical method]] for optimising many-[[dimension]]al unconstrained problems, belonging to the more general class of [[search algorithm]]s.
{{about|the linear programming algorithm|the non-linear optimization heuristic|Nelder–Mead method}}
<!-- {{Context|date=March 2012}} -->
In [[optimization (mathematics)|mathematical optimization]], [[George Dantzig|Dantzig]]'s '''simplex algorithm''' (or '''simplex method''') is a popular [[algorithm]] for [[linear programming]].<ref name="Murty">{{cite book |last=Murty |first=Katta G. |author-link=Katta G. Murty |year=2000 |title=Linear programming |publisher=John Wiley & Sons |url=http://www.computer.org/csdl/mags/cs/2000/01/c1022.html}}</ref>{{failed verification|date=June 2025|reason=Could not locate reference.}}
 
The name of the algorithm is derived from the concept of a [[simplex]] and was suggested by [[Theodore Motzkin|T. S. Motzkin]].<ref name="Murty22" >{{harvtxt|Murty|1983|loc=Comment 2.2}}</ref> Simplices are not actually used in the method, but one interpretation of it is that it operates on simplicial ''[[cone (geometry)|cone]]s'', and these become proper simplices with an additional constraint.<ref name="Murty39">{{harvtxt|Murty|1983|loc=Note 3.9}}</ref><ref name="StoneTovey">{{cite journal|last1=Stone|first1=Richard E.|last2=Tovey|first2=Craig A.|title=The simplex and projective scaling algorithms as iteratively reweighted least squares methods|journal=SIAM Review|volume=33|year=1991|issue=2|pages=220–237
In both cases, the method uses the concept of a [[simplex]], which is a [[polytope]] of ''N''&nbsp;+&nbsp;1 vertices in ''N'' dimensions: a line segment on a line, a triangle on a plane, a [[tetrahedron]] in three-dimensional space and so forth.
|mr=1124362|jstor=2031142|doi=10.1137/1033049}}</ref><ref>{{cite journal|last1=Stone|first1=Richard E.|last2=Tovey|first2=Craig A.|title=Erratum: The simplex and projective scaling algorithms as iteratively reweighted least squares methods|journal=SIAM Review|volume=33|year=1991|issue=3|pages=461|mr=1124362|doi=10.1137/1033100|jstor=2031443}}</ref><ref name="Strang">{{cite journal|last=Strang|first=Gilbert|author-link=Gilbert Strang|title=Karmarkar's algorithm and its place in applied mathematics|journal=[[The Mathematical Intelligencer]]|date=1 June 1987|issn=0343-6993|pages=4–10|volume=9|doi=10.1007/BF03025891|mr=883185|issue=2|s2cid=123541868}}</ref> The simplicial cones in question are the corners (i.e., the neighborhoods of the vertices) of a geometric object called a [[polytope]]. The shape of this polytope is defined by the [[System of linear inequalities|constraints]] applied to the objective function.
 
== Problem input History==
[[George Dantzig]] worked on planning methods for the US Army Air Force during World War II using a [[Mechanical_calculator#1900s_to_1970s|desk calculator]]. During 1946, his colleague challenged him to mechanize the planning process to distract him from taking another job. Dantzig formulated the problem as linear inequalities inspired by the work of [[Wassily Leontief]], however, at that time he didn't include an objective as part of his formulation. Without an objective, a vast number of solutions can be feasible, and therefore to find the "best" feasible solution, military-specified "ground rules" must be used that describe how goals can be achieved as opposed to specifying a goal itself. Dantzig's core insight was to realize that most such ground rules can be translated into a linear objective function that needs to be maximized.<ref>{{Cite journal|url = https://apps.dtic.mil/sti/pdfs/ADA112060.pdf|archive-url = https://web.archive.org/web/20150520183722/http://www.dtic.mil/cgi-bin/GetTRDoc?Location=U2&doc=GetTRDoc.pdf&AD=ADA112060|url-status = live|archive-date = May 20, 2015|title = Reminiscences about the origins of linear programming|date = April 1982|journal = Operations Research Letters|doi = 10.1016/0167-6377(82)90043-8|volume = 1|issue = 2 |pages=43–48|last1 = Dantzig|first1 = George B.}}</ref> Development of the simplex method was evolutionary and happened over a period of about a year.<ref>{{Cite journal|url = http://www.phpsimplex.com/en/Dantzig_interview.htm|title = An Interview with George B. Dantzig: The Father of Linear Programming|last = Albers and Reid|date = 1986|journal = College Mathematics Journal|volume = 17|issue = 4|doi = 10.1080/07468342.1986.11972971|pages = 292–314}}</ref>
Consider a linear programming problem,
 
: maximize <math>\mathbf{c}^T \mathbf{x} </math>
After Dantzig included an objective function as part of his formulation during mid-1947, the problem was mathematically more tractable. Dantzig realized that one of the unsolved problems that [[George Dantzig#Education|he had mistaken]] as homework in his professor [[Jerzy Neyman]]'s class (and actually later solved), was applicable to finding an algorithm for linear programs. This problem involved finding the existence of [[Lagrange multipliers]] for general linear programs over a continuum of variables, each bounded between zero and one, and satisfying linear constraints expressed in the form of [[Lebesgue integral]]s. Dantzig later published his "homework" as a thesis to earn his doctorate. The column geometry used in this thesis gave Dantzig insight that made him believe that the Simplex method would be very efficient.<ref>{{Cite encyclopedia|url = http://apps.dtic.mil/dtic/tr/fulltext/u2/a182708.pdf|archive-url = https://web.archive.org/web/20150529003047/http://www.dtic.mil/dtic/tr/fulltext/u2/a182708.pdf|url-status = live|archive-date = May 29, 2015|title = Origins of the simplex method|last = Dantzig|first = George|date = May 1987|encyclopedia = A History of Scientific Computing|editor-last=Nash|editor-first=Stephen G.|publisher=Association for Computing Machinery|pages = 141–151|doi = 10.1145/87252.88081|isbn = 978-0-201-50814-7}}</ref>
: subject to <math>\mathbf{A}\mathbf{x} \le \mathbf{b}, \, \mathbf{x} \ge 0 </math>
 
The simplex algorithm requires the linear programming problem to be in [[Linear programming#Augmented form (slack_form)|augmented form]]. The problem can then be written as follows in matrix form:
==Overview==
: Maximize ''Z'' in:
{{further|Linear programming}}
: <math>
[[Image:Simplex-description-en.svg|thumb|240px|A [[system of linear inequalities]] defines a [[polytope]] as a feasible region. The simplex algorithm begins at a starting [[vertex (geometry)|vertex]] and moves along the edges of the polytope until it reaches the vertex
of the optimal solution.]]
 
[[Image:Simplex-method-3-dimensions.png|thumb|240px|Polyhedron of simplex algorithm in 3D]]
 
The simplex algorithm operates on linear programs in the [[canonical form]]
 
:maximize <math display="inline">\mathbf{c^T} \mathbf{x}</math>
:subject to <math>A\mathbf{x} \leq \mathbf{b}</math> and <math>\mathbf{x} \ge 0</math>
 
with <math>\mathbf{c} = (c_1,\, \dots,\, c_n)</math> the coefficients of the objective function, <math>(\cdot)^\mathrm{T}</math> is the [[matrix transpose]], and <math> \mathbf{x} = (x_1,\, \dots,\, x_n)</math> are the variables of the problem, <math>A</math> is a ''p''×''n'' matrix, and <math> \mathbf{b} = (b_1,\, \dots,\, b_p)</math>. There is a straightforward process to convert any linear program into one in standard form, so using this form of linear programs results in no loss of generality.
 
In geometric terms, the [[feasible region]] defined by all values of <math>\mathbf{x}</math> such that <math display="inline">A\mathbf{x} \le \mathbf{b}</math> and <math>\forall i, x_i \ge 0 </math> is a (possibly unbounded) [[convex polytope]]. An extreme point or vertex of this polytope is known as ''[[basic feasible solution]]'' (BFS).
 
It can be shown that for a linear program in standard form, if the objective function has a maximum value on the feasible region, then it has this value on (at least) one of the extreme points.<ref>{{harvtxt|Murty|1983|loc=Theorem 3.3}}</ref> This in itself reduces the problem to a finite computation since there is a finite number of extreme points, but the number of extreme points is unmanageably large for all but the smallest linear programs.<ref>{{harvtxt|Murty|1983|loc=Section 3.13|p=143}}</ref>
It can also be shown that, if an extreme point is not a maximum point of the objective function, then there is an edge containing the point so that the value of the objective function is strictly increasing on the edge moving away from the point.<ref name="Murty137">{{harvtxt|Murty|1983|loc=Section 3.8|p=137}}</ref> If the edge is finite, then the edge connects to another extreme point where the objective function has a greater value, otherwise the objective function is unbounded above on the edge and the linear program has no solution. The simplex algorithm applies this insight by walking along edges of the polytope to extreme points with greater and greater objective values. This continues until the maximum value is reached, or an unbounded edge is visited (concluding that the problem has no solution). The algorithm always terminates because the number of vertices in the polytope is finite; moreover since we jump between vertices always in the same direction (that of the objective function), we hope that the number of vertices visited will be small.<ref name="Murty137"/>
 
The solution of a linear program is accomplished in two steps. In the first step, known as Phase I, a starting extreme point is found. Depending on the nature of the program this may be trivial, but in general it can be solved by applying the simplex algorithm to a modified version of the original program. The possible results of Phase I are either that a basic feasible solution is found or that the feasible region is empty. In the latter case the linear program is called ''infeasible''. In the second step, Phase II, the simplex algorithm is applied using the basic feasible solution found in Phase I as a starting point. The possible results from Phase II are either an optimum basic feasible solution or an infinite edge on which the objective function is unbounded above.<ref name="DantzigThapa1">[[George B. Dantzig]] and Mukund N. Thapa. 1997. ''Linear programming 1: Introduction''. Springer-Verlag.</ref><ref name="NeringTucker"/><ref name="Vanderbei">Robert J. Vanderbei, [http://www.princeton.edu/~rvdb/LPbook/ ''Linear Programming: Foundations and Extensions''], 3rd ed., International Series in Operations Research & Management Science, Vol. 114, Springer Verlag, 2008. {{isbn|978-0-387-74387-5}}. <!-- (An on-line second edition was formerly available. Vanderbei's site still contains extensive materials.) --></ref>
 
==Standard form==
The transformation of a linear program to one in standard form may be accomplished as follows.<ref>{{harvtxt|Murty|1983|loc=Section 2.2}}</ref> First, for each variable with a lower bound other than 0, a new variable is introduced representing the difference between the variable and bound. The original variable can then be eliminated by substitution. For example, given the constraint
:<math>x_1 \ge 5</math>
 
a new variable, <math>y_1</math>, is introduced with
:<math> \begin{align} y_1 = x_1 - 5\\x_1 = y_1 + 5 \end{align}</math>
 
The second equation may be used to eliminate <math>x_1</math> from the linear program. In this way, all lower bound constraints may be changed to non-negativity restrictions.
 
Second, for each remaining inequality constraint, a new variable, called a ''[[slack variable]]'', is introduced to change the constraint to an equality constraint. This variable represents the difference between the two sides of the inequality and is assumed to be non-negative. For example, the inequalities
:<math> \begin{align}
x_2 + 2x_3 &\le 3\\
-x_4 + 3x_5 &\ge 2
\end{align}</math>
 
are replaced with
:<math> \begin{align}
x_2 + 2x_3 + s_1 &= 3\\
-x_4 + 3x_5 - s_2 &= 2\\
s_1,\, s_2 &\ge 0
\end{align}</math>
 
It is much easier to perform algebraic manipulation on inequalities in this form. In inequalities where ≥ appears such as the second one, some authors refer to the variable introduced as a {{anchor|Surplus variable}}'' surplus variable''.
 
Third, each unrestricted variable is eliminated from the linear program. This can be done in two ways, one is by solving for the variable in one of the equations in which it appears and then eliminating the variable by substitution. The other is to replace the variable with the difference of two restricted variables. For example, if <math>z_1</math> is unrestricted then write
:<math>\begin{align}
&z_1 = z_1^+ - z_1^-\\
&z_1^+,\, z_1^- \ge 0
\end{align}</math>
 
The equation may be used to eliminate <math>z_1</math> from the linear program.
 
When this process is complete the feasible region will be in the form
:<math>\mathbf{A}\mathbf{x} = \mathbf{b},\, \forall \ x_i \ge 0</math>
 
It is also useful to assume that the rank of <math>\mathbf{A}</math> is the number of rows. This results in no loss of generality since otherwise either the system <math>\mathbf{A}\mathbf{x} = \mathbf{b}</math> has redundant equations which can be dropped, or the system is inconsistent and the linear program has no solution.<ref>{{harvtxt|Murty|1983|p=173}}</ref>
 
==Simplex tableau==
A linear program in standard form can be represented as a ''tableau'' of the form
:<math>
\begin{bmatrix}
1 & -\mathbf{c}^T & 0 \\
\mathbf{0} & \mathbf{A} & \mathbf{Ib}
\end{bmatrix}
</math>
 
The first row defines the objective function and the remaining rows specify the constraints. The zero in the first column represents the zero vector of the same dimension as the vector <math>\mathbf{b}</math> (different authors use different conventions as to the exact layout). If the columns of <math>\mathbf{A}</math> can be rearranged so that it contains the [[identity matrix]] of order <math>p</math> (the number of rows in <math>\mathbf{A}</math>) then the tableau is said to be in ''canonical form''.<ref>{{harvtxt|Murty|1983|loc=section 2.3.2}}</ref> The variables corresponding to the columns of the identity matrix are called ''basic variables'' while the remaining variables are called ''nonbasic'' or ''free variables''. If the values of the nonbasic variables are set to 0, then the values of the basic variables are easily obtained as entries in <math>\mathbf{b}</math> and this solution is a basic feasible solution. The algebraic interpretation here is that the coefficients of the linear equation represented by each row are either <math>0</math>, <math>1</math>, or some other number. Each row will have <math>1</math> column with value <math>1</math>, <math>p-1</math> columns with coefficients <math>0</math>, and the remaining columns with some other coefficients (these other variables represent our non-basic variables). By setting the values of the non-basic variables to zero we ensure in each row that the value of the variable represented by a <math>1</math> in its column is equal to the <math>b</math> value at that row.
 
Conversely, given a basic feasible solution, the columns corresponding to the nonzero variables can be expanded to a nonsingular matrix. If the corresponding tableau is multiplied by the inverse of this matrix then the result is a tableau in canonical form.<ref>{{harvtxt|Murty|1983|loc=section 3.12}}</ref>
 
Let
:<math>
\begin{bmatrix}
Z1 \\& -\mathbf{xc}^T_B \\& -\mathbf{xc}_s^T_D & 0 \\
0 & I & \mathbf{D} & \mathbf{b}
\end{bmatrix} =
\end{bmatrix}
</math>
 
be a tableau in canonical form. Additional [[Elementary matrix#Row-addition transformations|row-addition transformations]] can be applied to remove the coefficients {{SubSup|'''c'''|''B''|T|s=0}} from the objective function. This process is called ''pricing out'' and results in a canonical tableau
:<math>
\begin{bmatrix}
1 & 0 \\& -\bar{\mathbf{bc}}^T_D & z_B \\
0 & I & \mathbf{D} & \mathbf{b}
\end{bmatrix}
</math>
: <math> \mathbf{x}, \, \mathbf{x}_s \ge 0 </math>
where '''x''' are the variables from the ''standard form'', '''x'''<sub>s</sub> 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.
 
where ''z''<sub>''B''</sub> is the value of the objective function at the corresponding basic feasible solution. The updated coefficients, also known as ''relative cost coefficients'', are the rates of change of the objective function with respect to the nonbasic variables.<ref name="NeringTucker" >
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.
Evar D. Nering and [[Albert W. Tucker]], 1993, ''Linear Programs and Related Problems'', Academic Press. (elementary<!-- but profound -->)</ref>
 
==Pivot operations==
Values of nonzero value are called ''basic variables'', and values of zero values are called ''nonbasic variables'' in the simplex algorithm.
The geometrical operation of moving from a basic feasible solution to an adjacent basic feasible solution is implemented as a ''pivot operation''. First, a nonzero ''pivot element'' is selected in a nonbasic column. The row containing this element is [[Elementary matrix#Row-multiplying transformations|multiplied]] by its reciprocal to change this element to 1, and then multiples of the row are added to the other rows to change the other entries in the column to 0. The result is that, if the pivot element is in a row ''r'', then the column becomes the ''r''-th column of the identity matrix. The variable for this column is now a basic variable, replacing the variable which corresponded to the ''r''-th column of the identity matrix before the operation. In effect, the variable corresponding to the pivot column enters the set of basic variables and is called the ''entering variable'', and the variable being replaced leaves the set of basic variables and is called the ''leaving variable''. The tableau is still in canonical form but with the set of basic variables changed by one element.<ref name="DantzigThapa1"/><ref name="NeringTucker"/>
 
==Algorithm==
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 (<math>\mathbf{x}_{s\,i} = \mathbf{b}_{j}</math> for them, since the augmented problem matrix is diagonal on its right half).
Let a linear program be given by a canonical tableau. The simplex algorithm proceeds by performing successive pivot operations each of which give an improved basic feasible solution; the choice of pivot element at each step is largely determined by the requirement that this pivot improves the solution.
 
===Entering variable selection===
== Revised simplex algorithm ==
Since the entering variable will, in general, increase from 0 to a positive number, the value of the objective function will decrease if the derivative of the objective function with respect to this variable is negative. Equivalently, the value of the objective function is increased if the pivot column is selected so that the corresponding entry in the objective row of the tableau is positive.
 
If there is more than one column so that the entry in the objective row is positive then the choice of which one to add to the set of basic variables is somewhat arbitrary and several ''entering variable choice rules''<ref name="Murty66">{{harvtxt|Murty|1983|p=66}}</ref> such as [[Devex algorithm]]<ref>Harris, Paula MJ. "Pivot selection methods of the Devex LP code." Mathematical programming 5.1 (1973): 1–28</ref> have been developed.
=== Matrix form of the simplex algorithm ===
 
At any iteration of the simplex algorithm, the tableau will be of this form:
If all the entries in the objective row are less than or equal to 0 then no choice of entering variable can be made and the solution is in fact optimal. It is easily seen to be optimal since the objective row now corresponds to an equation of the form
: <math>
:<math display="block">z(\mathbf{x})=z_B+\text{non-positive terms corresponding to non-basic variables}</math>
 
By changing the entering variable choice rule so that it selects a column where the entry in the objective row is negative, the algorithm is changed so that it finds the minimum of the objective function rather than the maximum.
 
===Leaving variable selection===
Once the pivot column has been selected, the choice of pivot row is largely determined by the requirement that the resulting solution be feasible. First, only positive entries in the pivot column are considered since this guarantees that the value of the entering variable will be nonnegative. If there are no positive entries in the pivot column then the entering variable can take any non-negative value with the solution remaining feasible. In this case the objective function is unbounded below and there is no minimum.
 
Next, the pivot row must be selected so that all the other basic variables remain positive. A calculation shows that this occurs when the resulting value of the entering variable is at a minimum. In other words, if the pivot column is ''c'', then the pivot row ''r'' is chosen so that
:<math>b_r / a_{rc}\,</math>
 
is the minimum over all ''r'' so that ''a''<sub>''rc''</sub> > 0. This is called the ''minimum ratio test''.<ref name="Murty66"/> If there is more than one row for which the minimum is achieved then a ''dropping variable choice rule''<ref>{{harvtxt|Murty|1983|p=67}}</ref> can be used to make the determination.
 
===Example===
{{see also|Revised simplex algorithm#Numerical example}}
Consider the linear program
:Minimize
::<math>Z = -2 x - 3 y - 4 z\,</math>
:Subject to
::<math>\begin{align}
3 x + 2 y + z &\le 10\\
2 x + 5 y + 3 z &\le 15\\
x,\,y,\,z &\ge 0
\end{align}</math>
 
With the addition of slack variables ''s'' and ''t'', this is represented by the canonical tableau
:<math>
\begin{bmatrix}
1 & 2 & 3 & 4 & 0 & 0 & 0 \\
1 & \mathbf{c}_B \mathbf{B}^{-1}\mathbf{A} -\mathbf{c} & \mathbf{c}_B \mathbf{B}^{-1} \\
0 & \mathbf{B}^{-3 & 2 & 1}\mathbf{A} & \mathbf{B}^{-1} & 0 & 10 \\
0 & 2 & 5 & 3 & 0 & 1 & 15
\end{bmatrix}
</math>
 
where columns 5 and 6 represent the basic variables ''s'' and ''t'' and the corresponding basic feasible solution is
:<math>x=y=z=0,\,s=10,\,t=15.</math>
 
Columns 2, 3, and 4 can be selected as pivot columns, for this example column 4 is selected. The values of ''z'' resulting from the choice of rows 2 and 3 as pivot rows are 10/1&nbsp;=&nbsp;10 and 15/3&nbsp;=&nbsp;5 respectively. Of these the minimum is 5, so row 3 must be the pivot row. Performing the pivot produces
:<math>
\begin{bmatrix}
1 & -\frac{2}{3} & -\frac{11}{3} & 0 & 0 & -\frac{4}{3} & -20 \\
Z \\ \mathbf{x} \\ \mathbf{x}_s
0 & \frac{7}{3} & \frac{1}{3} & 0 & 1 & -\frac{1}{3} & 5 \\
\end{bmatrix} =
0 & \frac{2}{3} & \frac{5}{3} & 1 & 0 & \frac{1}{3} & 5
\end{bmatrix}
</math>
 
Now columns 4 and 5 represent the basic variables ''z'' and ''s'' and the corresponding basic feasible solution is
:<math>x=y=t=0,\,z=5,\,s=5.</math>
 
For the next step, there are no positive entries in the objective row and in fact
:<math display="block">Z = -20 + \frac{2}{3}x+\frac{11}{3}y+\frac{4}{3}t</math>
so the minimum value of ''Z'' is&nbsp;&minus;20.
 
==Finding an initial canonical tableau==
In general, a linear program will not be given in the canonical form and an equivalent canonical tableau must be found before the simplex algorithm can start. This can be accomplished by the introduction of ''artificial variables''. Columns of the identity matrix are added as column vectors for these variables. If the b value for a constraint equation is negative, the equation is negated before adding the identity matrix columns. This does not change the set of feasible solutions or the optimal solution, and it ensures that the slack variables will constitute an initial feasible solution. The new tableau is in canonical form but it is not equivalent to the original problem. So a new objective function, equal to the sum of the artificial variables, is introduced and the simplex algorithm is applied to find the minimum; the modified linear program is called the ''Phase&nbsp;I'' problem.<ref>{{harvtxt|Murty|1983|p=60}}</ref>
 
The simplex algorithm applied to the Phase I problem must terminate with a minimum value for the new objective function since, being the sum of nonnegative variables, its value is bounded below by 0. If the minimum is 0 then the artificial variables can be eliminated from the resulting canonical tableau producing a canonical tableau equivalent to the original problem. The simplex algorithm can then be applied to find the solution; this step is called ''Phase&nbsp;II''. If the minimum is positive then there is no feasible solution for the Phase I problem where the artificial variables are all zero. This implies that the feasible region for the original problem is empty, and so the original problem has no solution.<ref name="DantzigThapa1"/><ref name="NeringTucker"/><ref name="Padberg"/>
 
===Example===
Consider the linear program
:Minimize
::<math>Z = -2 x - 3 y - 4 z\,</math>
 
:Subject to
::<math>\begin{align}
3 x + 2 y + z &= 10\\
2 x + 5 y + 3 z &= 15\\
x,\, y,\, z &\ge 0
\end{align}</math>
 
It differs from the previous example by having equality instead of inequality constraints. The previous solution <math>x=y=0\, , z=5</math> violates the first constraint.
This new problem is represented by the (non-canonical) tableau
:<math>
\begin{bmatrix}
1 & 2 & 3 & 4 & 0 \\
\mathbf{c}_B \mathbf{B}^{-1} \mathbf{b} \\ \mathbf{B}^{-1}\mathbf{b}
0 & 3 & 2 & 1 & 10 \\
0 & 2 & 5 & 3 & 15
\end{bmatrix}
</math>
where <math>\mathbf{c}_B</math> are the coefficients of basic variables in the '''c'''-matrix; and '''B''' is the columns of <math>[\mathbf{A} \, \mathbf{I}]</math> corresponding to the basic variables.
 
Introduce artificial variables ''u'' and ''v'' and objective function ''W''&nbsp;=&nbsp;''u''&nbsp;+&nbsp;''v'', giving a new tableau
It is worth noting that '''B''' and <math>\mathbf{c}_B</math> are the only variables in this equation (except ''Z'' and '''x''' of course). Everything else is constant throughout the algorithm.
:<math>
\begin{bmatrix}
1 & 0 & 0 & 0 & 0 & -1 & -1 & 0 \\
0 & 1 & 2 & 3 & 4 & 0 & 0 & 0 \\
0 & 0 & 3 & 2 & 1 & 1 & 0 & 10 \\
0 & 0 & 2 & 5 & 3 & 0 & 1 & 15
\end{bmatrix}
</math>
 
The equation defining the original objective function is retained in anticipation of Phase II.
 
By construction, ''u'' and ''v'' are both basic variables since they are part of the initial identity matrix. However, the objective function ''W'' currently assumes that ''u'' and ''v'' are both&nbsp;0. In order to adjust the objective function to be the correct value where ''u''&nbsp;=&nbsp;10 and ''v''&nbsp;=&nbsp;15, add the third and fourth rows to the first row giving
:<math>
\begin{bmatrix}
1 & 0 & 5 & 7 & 4 & 0 & 0 & 25 \\
0 & 1 & 2 & 3 & 4 & 0 & 0 & 0 \\
0 & 0 & 3 & 2 & 1 & 1 & 0 & 10 \\
0 & 0 & 2 & 5 & 3 & 0 & 1 & 15
\end{bmatrix}
</math>
 
Select column 5 as a pivot column, so the pivot row must be row 4, and the updated tableau is
:<math>
\begin{bmatrix}
3 & 0 & 7 & 1 & 0 & 0 & -4 & 15 \\
0 & 3 & -2 & -11 & 0 & 0 & -4 & -60 \\
0 & 0 & 7 & 1 & 0 & 3 & -1 & 15 \\
0 & 0 & 2 & 5 & 3 & 0 & 1 & 15
\end{bmatrix}
</math>
 
Now select column 3 as a pivot column, for which row 3 must be the pivot row, to get
:<math>
\begin{bmatrix}
7 & 0 & 0 & 0 & 0 & -7 & -7 & 0 \\
0 & 7 & 0 & -25 & 0 & 2 & -10 & -130 \\
0 & 0 & 7 & 1 & 0 & 3 & -1 & 15 \\
0 & 0 & 0 & 11 & 7 & -2 & 3 & 25
\end{bmatrix}
</math>
 
The artificial variables are now 0 and they may be dropped giving a canonical tableau equivalent to the original problem:
:<math>
\begin{bmatrix}
7 & 0 & -25 & 0 & -130 \\
0 & 7 & 1 & 0 & 15 \\
0 & 0 & 11 & 7 & 25
\end{bmatrix}
</math>
 
This is, fortuitously, already optimal and the optimum value for the original linear program is&nbsp;−130/7. This value is "worse" than -20 which is to be expected for a problem which is more constrained.
 
==Advanced topics==
 
===Implementation===
{{main|Revised simplex algorithm}}
The tableau form used above to describe the algorithm lends itself to an immediate implementation in which the tableau is maintained as a rectangular (''m''&nbsp;+&nbsp;1)-by-(''m''&nbsp;+&nbsp;''n''&nbsp;+&nbsp;1) array. It is straightforward to avoid storing the m explicit columns of the identity matrix that will occur within the tableau by virtue of '''B''' being a subset of the columns of ['''A''',&nbsp;'''I''']. This implementation is referred to as the "''standard'' simplex algorithm". The storage and computation overhead is such that the standard simplex method is a prohibitively expensive approach to solving large linear programming problems.
 
In each simplex iteration, the only data required are the first row of the tableau, the (pivotal) column of the tableau corresponding to the entering variable and the right-hand-side. The latter can be updated using the pivotal column and the first row of the tableau can be updated using the (pivotal) row corresponding to the leaving variable. Both the pivotal column and pivotal row may be computed directly using the solutions of linear systems of equations involving the matrix '''B''' and a matrix-vector product using '''A'''. These observations motivate the "[[Revised simplex algorithm|''revised'' simplex algorithm]]", for which implementations are distinguished by their invertible representation of&nbsp;'''B'''.<ref name="DantzigThapa2" >{{cite book |first1=George B. |last1=Dantzig |authorlink=George B. Dantzig |first2=Mukund N. |last2=Thapa |year=2003 |title=Linear Programming 2: Theory and Extensions |publisher=Springer-Verlag }}</ref>
=== Algorithm ===
* Choose an initial BF as shown above
: This implies that '''B''' is the identity matrix, and <math>\mathbf{c}_B</math> is a zero-vector.
 
In large linear-programming problems '''A''' is typically a [[sparse matrix]] and, when the resulting sparsity of '''B''' is exploited when maintaining its invertible representation, the revised simplex algorithm is much more efficient than the standard simplex method. Commercial simplex solvers are based on the revised simplex algorithm.<ref name="Padberg" >{{cite book |first=M. |last=Padberg |title=Linear Optimization and Extensions |edition=Second |publisher=Springer-Verlag |year=1999 |isbn=3-540-65833-5 }}</ref><ref name="DantzigThapa2"/><ref>{{cite book |first1=Dmitris |last1=Alevras |first2=Manfred W. |last2=Padberg |title=Linear Optimization and Extensions: Problems and Solutions |series=Universitext |publisher=Springer-Verlag |year=2001 |isbn=3-540-41744-3 }} (Problems from Padberg with solutions.)</ref><ref name="MarosMitra" >{{cite book|last1=Maros|first1=István|last2=Mitra|author2-link=Gautam Mitra|first2=Gautam|chapter=Simplex algorithms|mr=1438309|title=Advances in linear and integer programming|pages=1–46|editor=J. E. Beasley|publisher=Oxford Science|year=1996}}</ref><ref>{{cite book|mr=1960274|last=Maros|first=István|title=Computational techniques of the simplex method|series=International Series in Operations Research & Management Science|volume=61|publisher=Kluwer Academic Publishers|___location=Boston, MA|year=2003|pages=xx+325|isbn=978-1-4020-7332-8}}</ref>
* While nonoptimal solution:
** '''Determine direction of highest gradient'''
*: Choose the variable associated with the coefficient in <math>\mathbf{c}_B \mathbf{B}^{-1}\mathbf{A} -\mathbf{c}</math> 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 <math>\begin{bmatrix} \mathbf{B}^{-1}\mathbf{A} & \mathbf{B}^{-1} \end{bmatrix} \begin{bmatrix} \mathbf{x} \\ \mathbf{x}_s \end{bmatrix} = \mathbf{B}^{-1}\mathbf{b}</math> 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 <math>\mathbf{c}_B</math> 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 <math>\mathbf{c}_B \mathbf{B}^{-1}\mathbf{A} -\mathbf{c}</math> are positive. Procedure is also terminated if all coefficients are zero, and the algorithm have been walking in a circle and revisited a previous state.
 
===Degeneracy: stalling and cycling===
== Description ==
If the values of all basic variables are strictly positive, then a pivot must result in an improvement in the objective value. When this is always the case no set of basic variables occurs twice and the simplex algorithm must terminate after a finite number of steps. Basic feasible solutions where at least one of the ''basic ''variables is zero are called ''degenerate'' and may result in pivots for which there is no improvement in the objective value. In this case there is no actual change in the solution but only a change in the set of basic variables. When several such pivots occur in succession, there is no improvement; in large industrial applications, degeneracy is common and such "''stalling''" is notable.
Worse than stalling is the possibility the same set of basic variables occurs twice, in which case, the deterministic pivoting rules of the simplex algorithm will produce an infinite loop, or "cycle". While degeneracy is the rule in practice and stalling is common, cycling is rare in practice. A discussion of an example of practical cycling occurs in [[Manfred W. Padberg|Padberg]].<ref name="Padberg"/> [[Bland's rule]] prevents cycling and thus guarantees that the simplex algorithm always terminates.<ref name="Padberg"/><ref name="Bland">
{{cite journal
| title=New finite pivoting rules for the simplex method
| first1=Robert G. | last1=Bland | authorlink1=Robert G. Bland
| journal=[[Mathematics of Operations Research]]
| volume=2
| issue=2
| date=May 1977
| pages=103–107
| doi=10.1287/moor.2.2.103
| jstor=3689647
| mr=459599
| s2cid=18493293}}</ref><ref>{{harvtxt|Murty|1983|p=79}}</ref> Another pivoting algorithm, the [[criss-cross algorithm]] never cycles on linear programs.<ref>There are abstract optimization problems, called [[oriented matroid]] programs, on which Bland's rule cycles (incorrectly) while the [[criss-cross algorithm]] terminates correctly.</ref>
 
History-based pivot rules such as [[Zadeh's rule]] and [[Cunningham's rule]] also try to circumvent the issue of stalling and cycling by keeping track of how often particular variables are being used and then favor such variables that have been used least often.
[[Image:Simplex description.png|thumb|240px|A series of linear inequalities defines a [[polytope]] as a feasible region. The simplex algorithm begins at a starting [[vertex]] and moves along the edges of the polytope until it reaches the vertex of the optimum solution.]]
 
===Efficiency in the worst case===
A linear programming problem consists of a collection of [[linear]] inequalities on a number of [[real number|real]] [[variable]]s and a fixed linear functional which is to be maximized (or minimized). Some further details are given in the linear programming article.
The simplex method is remarkably efficient in practice and was a great improvement over earlier methods such as [[Fourier–Motzkin elimination]]. However, in 1972, [[Victor Klee|Klee]] and Minty<ref name="KleeMinty">{{cite book|title=Inequalities III (Proceedings of the Third Symposium on Inequalities held at the University of California, Los Angeles, Calif., September 1–9, 1969, dedicated to the memory of Theodore S. Motzkin)|editor-first=Oved|editor-last=Shisha|publisher=Academic Press|___location=New York-London|year=1972|mr=332165|last1=Klee|first1=Victor|author-link1=Victor Klee|last2=Minty|first2= George J.|author-link2=George J. Minty|chapter=How good is the simplex algorithm?|pages=159–175}}</ref> gave an example, the [[Klee–Minty cube]], showing that the worst-case complexity of simplex method as formulated by Dantzig is [[exponential time]]. Since then, for almost every variation on the method, it has been shown that there is a family of linear programs for which it performs badly. It is an open question if there is a variation with [[polynomial time]], although sub-exponential pivot rules are known.<ref>{{Citation
| last1 = Hansen
| first1 = Thomas
| last2 = Zwick
| first2 = Uri
| title = Proceedings of the forty-seventh annual ACM symposium on Theory of Computing
| chapter = An Improved Version of the Random-Facet Pivoting Rule for the Simplex Algorithm
| author2-link = Uri Zwick
| pages = 209–218
| year = 2015
| doi = 10.1145/2746539.2746557
| citeseerx = 10.1.1.697.2526
| isbn = 9781450335362
| s2cid = 1980659
}}
</ref>
 
In 2014, it was proved{{citation-needed|date=January 2024}} that a particular variant of the simplex method is [[NP-mighty]], i.e., it can be used to solve, with polynomial overhead, any problem in NP implicitly during the algorithm's execution. Moreover, deciding whether a given variable ever enters the basis during the algorithm's execution on a given input, and determining the number of iterations needed for solving a given problem, are both [[NP-hardness|NP-hard]] problems.<ref>{{Cite journal|last1=Disser|first1=Yann|last2=Skutella|first2=Martin|date=2018-11-01|title=The Simplex Algorithm Is NP-Mighty|journal=ACM Trans. Algorithms|volume=15|issue=1|pages=5:1–5:19|doi=10.1145/3280847|issn=1549-6325|arxiv=1311.5935|s2cid=54445546}}</ref> At about the same time it was shown that there exists an artificial pivot rule for which computing its output is [[PSPACE-complete]].<ref>{{Citation | last1 = Adler | first1 = Ilan|author1-link=Ilan Adler | last2 = Christos | first2 = Papadimitriou | author2-link = Christos Papadimitriou | last3 = Rubinstein | first3 = Aviad | title = Integer Programming and Combinatorial Optimization | chapter = On Simplex Pivoting Rules and Complexity Theory | volume = 17 | pages = 13–24 | year = 2014 | arxiv = 1404.3320 | doi = 10.1007/978-3-319-07557-0_2| series = Lecture Notes in Computer Science | isbn = 978-3-319-07556-3 | s2cid = 891022 }}</ref> In 2015, this was strengthened to show that computing the output of Dantzig's pivot rule is [[PSPACE-complete]].<ref>{{Citation | last1 = Fearnly | first1 = John | last2 = Savani | first2 = Rahul | title = Proceedings of the forty-seventh annual ACM symposium on Theory of Computing | chapter = The Complexity of the Simplex Method | pages = 201–208 | year = 2015 | arxiv = 1404.0605 | doi = 10.1145/2746539.2746558| isbn = 9781450335362 | s2cid = 2116116 }}</ref>
In geometric terms we are considering a [[closed]] [[convex]] polytope P, defined by intersecting a number of half-spaces in ''n''-dimensional [[Euclidean space]], which lie to one side of a [[hyperplane]]. The objective is to maximise a linear functional L; if we consider the hyperplanes H(c) defined by L(x) = c 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 have a choice of improving a possible point by moving through the interior of P (so-called ''interior point methods''), or starting and remaining on the boundary.
 
===Efficiency in practice===
The simplex algorithm falls into the latter class of method. The idea is to move along the facets of P in search of the optimum, from point to point. Note that the optimum cannot occur at a mid-point, for example in the middle of an edge lying as a line segment on the boundary of P, unless the whole relevant 'face' is parallel to H. Therefore it is possible to look solely at moves skirting the edge of a [[simplex]], ignoring the interior. The algorithm specifies how this is to be done.
Analyzing and quantifying the observation that the simplex algorithm is efficient in practice despite its exponential worst-case complexity has led to the development of other measures of complexity. The simplex algorithm has polynomial-time [[Best, worst and average case|average-case complexity]] under various [[probability distribution]]s, with the precise average-case performance of the simplex algorithm depending on the choice of a probability distribution for the [[random matrix|random matrices]].<ref name="Schrijver">[[Alexander Schrijver]], ''Theory of Linear and Integer Programming''. John Wiley & sons, 1998, {{isbn|0-471-98232-6}} (mathematical)</ref><ref name="Borgwardt">The simplex algorithm takes on average ''D'' steps for a cube. {{harvtxt|Borgwardt|1987}}: {{cite book|last=Borgwardt|first=Karl-Heinz|title=The simplex method: A probabilistic analysis|series=Algorithms and Combinatorics (Study and Research Texts)|volume=1|publisher=Springer-Verlag|___location=Berlin|year=1987|pages=xii+268|isbn=978-3-540-17096-9|mr=868467}}</ref> Another approach to studying "[[porous set|typical phenomena]]" uses [[Baire category theory]] from [[general topology]], and to show that (topologically) "most" matrices can be solved by the simplex algorithm in a polynomial number of steps.{{Citation needed|date=June 2019}}
 
Another method to analyze the performance of the simplex algorithm studies the behavior of worst-case scenarios under small perturbation – are worst-case scenarios stable under a small change (in the sense of [[structural stability]]), or do they become tractable? This area of research, called [[smoothed analysis]], was introduced specifically to study the simplex method. Indeed, the running time of the simplex method on input with noise is polynomial in the number of variables and the magnitude of the perturbations.<ref>{{Cite book | last1=Spielman | first1=Daniel | last2=Teng | first2=Shang-Hua | author2-link=Shanghua Teng | title=Proceedings of the Thirty-Third Annual ACM Symposium on Theory of Computing | publisher=ACM | isbn=978-1-58113-349-3 | doi=10.1145/380752.380813 | year=2001 | chapter=Smoothed analysis of algorithms: why the simplex algorithm usually takes polynomial time| pages=296–305 | arxiv=cs/0111050| s2cid=1471 }}</ref><ref>{{Cite journal|last1=Dadush|first1=Daniel|last2=Huiberts|first2=Sophie|date=2020-01-01|title=A Friendly Smoothed Analysis of the Simplex Method|url=https://epubs.siam.org/doi/abs/10.1137/18M1197205|journal=SIAM Journal on Computing|volume=49|issue=5|pages=STOC18–449|doi=10.1137/18M1197205|s2cid=226351624|issn=0097-5397|arxiv=1711.05667}}</ref>
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.
 
==Other algorithms==
In [[1972]], Klee and Minty{{rf|1|Greenberg}} gave an example of a linear programming problem in which the [[polytope]] P is a distortion of an ''n''-dimensional cube. They showed that the simplex method as formulated by Dantzig visits all 2<sup>''n''</sup> vertices before arriving at the optimal vertex. This shows that the worst-case complexity of the algorithm is [[exponential time]]. Similar examples have been found for other pivot rules. It is an open question if there is a pivot rule with [[polynomial time]] worst-case complexity.
Other algorithms for solving linear-programming problems are described in the [[linear programming|linear-programming]] article. Another basis-exchange pivoting algorithm is the [[criss-cross algorithm]].<ref>{{cite journal|last1=Terlaky|first1=Tamás|last2=Zhang|first2=Shu Zhong|title=Pivot rules for linear programming: A Survey on recent theoretical developments|issue=1|journal=Annals of Operations Research|volume=46–47|year=1993|pages=203–233|doi=10.1007/BF02096264|mr=1260019|citeseerx = 10.1.1.36.7658 |s2cid=6058077|issn=0254-5330}}</ref><ref>{{cite journal|first1=Komei|last1=Fukuda|author1-link=Komei Fukuda|first2=Tamás|last2=Terlaky|author2-link=Tamás Terlaky|title=Criss-cross methods: A fresh view on pivot algorithms |journal=Mathematical Programming, Series B|volume=79|number=1–3|pages=369–395|editor1=Thomas M. Liebling |editor2=Dominique de Werra|publisher=North-Holland Publishing |___location=Amsterdam|year=1997|doi=10.1007/BF02614325|mr=1464775|s2cid=2794181 |url=http://infoscience.epfl.ch/record/77270 }}</ref> There are polynomial-time algorithms for linear programming that use interior point methods: these include [[Khachiyan]]'s [[ellipsoidal algorithm]], [[Karmarkar]]'s [[Karmarkar's algorithm|projective algorithm]], and [[interior point method|path-following algorithm]]s.<ref name="Vanderbei"/> The [[Big_M_method|Big-M method]] is an alternative strategy for solving a linear program, using a single-phase simplex.
 
==Linear-fractional programming==
Nevertheless, the simplex method is remarkably efficient in practice. Attempts to explain this employ the notion of average complexity or (recently) smoothed complexity.
{{Main|Linear-fractional programming}}
[[Linear-fractional programming|Linear–fractional programming]] (LFP) is a generalization of [[linear programming]] (LP). In LP the objective function is a [[linear functional|linear function]], while the objective function of a linear–fractional program is a ratio of two linear functions. In other words, a linear program is a fractional–linear program in which the denominator is the constant function having the value one everywhere. A linear–fractional program can be solved by a variant of the simplex algorithm<ref>{{harvtxt|Murty|1983|loc=Chapter 3.20 (pp. 160–164) and pp. 168 and 179}}</ref><ref>Chapter five: {{cite book|last=Craven|first=B. D.|title=Fractional programming|series=Sigma Series in Applied Mathematics|volume=4|publisher=Heldermann Verlag|___location=Berlin|year=1988|pages=145|isbn=978-3-88538-404-5|mr=949209}}</ref><ref>{{cite journal|last1=Kruk|first1=Serge|last2=Wolkowicz|first2=Henry|title=Pseudolinear programming|journal=[[SIAM Review]]|volume=41|year=1999|issue=4|pages=795–805|mr=1723002|jstor=2653207|doi=10.1137/S0036144598335259|citeseerx=10.1.1.53.7355|bibcode=1999SIAMR..41..795K}}
</ref><ref>{{cite journal|last1=Mathis|first1=Frank H.|last2=Mathis|first2=Lenora Jane|title=A nonlinear programming algorithm for hospital management|journal=[[SIAM Review]]|volume=37 |year=1995 |issue=2 |pages=230–234|mr=1343214|jstor=2132826|doi=10.1137/1037046|s2cid=120626738 }}
</ref> or by the [[criss-cross algorithm]].<ref>{{cite journal|title=The finite criss-cross method for hyperbolic programming|journal=European Journal of Operational Research|volume=114|issue=1|
pages=198–214|year=1999|issn=0377-2217|doi=10.1016/S0377-2217(98)00049-6|first1=Tibor|last1=Illés|first2=Ákos|last2=Szirmai|first3=Tamás|last3=Terlaky|url=http://www.cas.mcmaster.ca/~terlaky/files/dut-twi-96-103.ps.gz |citeseerx=10.1.1.36.7090}}</ref>
 
==See also==
Other algorithms for solving linear programming problems are described in the [[linear programming#algorithms|linear programming]] article.
{{div col}}
* [[Bland's rule|Pivoting rule of Bland]], which avoids cycling
* [[Criss-cross algorithm]]
* [[Cutting-plane method]]
* [[Devex algorithm]]
* [[Fourier–Motzkin elimination]]
* [[Gradient descent]]
* [[Karmarkar's algorithm]]
* [[Nelder–Mead method|Nelder–Mead simplicial heuristic]]
* [[Loss Functions]] - a type of Objective Function
{{colend}}
 
== References Notes==
{{reflist|2}}
* Greenberg, Harvey J., ''Klee-Minty Polytope Shows Exponential Time Complexity of Simplex Method'' University of Colorado at Denver (1997) [http://carbon.cudenver.edu/~hgreenbe/glossary/notes/Klee-Minty.pdf PDF download]
* Frederick S. Hiller and Gerald J. Lieberman: ''Introduction to Operations Research'', 8th edition. McGraw-Hill. ISBN 007123828X
* [[Thomas H. Cormen]], [[Charles E. Leiserson]], [[Ronald L. Rivest]], and [[Clifford Stein]]. ''Introduction to Algorithms'', Second Edition. MIT Press and McGraw-Hill, 2001. ISBN 0262032937. Section 29.3: The simplex algorithm, pp.790&ndash;804.
 
== Note References==
* {{cite book|last=Murty|first=Katta G.|author-link=Katta G. Murty|title=Linear programming|publisher=John Wiley & Sons, Inc.|___location=New York|year=1983|pages=xix+482|isbn=978-0-471-09725-9|mr=720547}}
{{ent|1|Greenberg}} Greenberg, cites: Klee and G.J. Minty. "How Good is the Simplex Algorithm?" In O. Shisha, editor, ''Inequalities, III'', pages 159&ndash;175. Academic Press, New York, NY, 1972
 
==Further See also reading==
These introductions are written for students of [[computer science]] and [[operations research]]:
* [[Nelder-Mead method]]
* [[Thomas H. Cormen]], [[Charles E. Leiserson]], [[Ronald L. Rivest]], and [[Clifford Stein]]. ''Introduction to Algorithms'', Second Edition. MIT Press and McGraw-Hill, 2001. {{isbn|0-262-03293-7}}. Section 29.3: The simplex algorithm, pp.&nbsp;790&ndash;804.
* Frederick S. Hillier and Gerald J. Lieberman: ''Introduction to Operations Research'', 8th edition. McGraw-Hill. {{isbn|0-07-123828-X}}
* {{cite book|title=Optimization in operations research|first=Ronald L.|last=Rardin|year=1997|publisher=Prentice Hall|pages=919|isbn=978-0-02-398415-0}}
 
==External links==
{{wikibooks|Operations Research|The Simplex Method}}
*[http://www.isye.gatech.edu/~spyros/LP/LP.html An Introduction to Linear Programming and the Simplex Algorithm] by Spyros Reveliotis of the Georgia Institute of Technology.
* [http://www.isye.gatech.edu/~spyros/LP/LP.html An Introduction to Linear Programming and the Simplex Algorithm] by Spyros Reveliotis of the Georgia Institute of Technology.
*Java-based [http://www-fp.mcs.anl.gov/otc/Guide/CaseStudies/simplex/ interactive simplex tool] hosted by Argonne National Laboratory.
* Greenberg, Harvey J., ''Klee–Minty Polytope Shows Exponential Time Complexity of Simplex Method'' the University of Colorado at Denver (1997) [http://glossary.computing.society.informs.org/notes/Klee-Minty.pdf PDF download]
*[http://www.egwald.com/operationsresearch/lpsimplex.php Simplex Algorithm] by Elmer G. Wiens. Demonstrates algorithm in detail, using the ''simplex tableau''.
* [http://www.lokminglui.com/lpch3.pdf Simplex Method] A tutorial for Simplex Method with examples (also two-phase and M-method).
*[http://people.hofstra.edu/faculty/Stefan_Waner/RealWorld/tutorialsf4/frames4_3.html Tutorial for The Simplex Method] by Stefan Waner, hofstra.edu. Interactive worked example.
* [https://www.mathstools.com/section/main/simplex_online_calculator Mathstools] Simplex Calculator from www.mathstools.com
*[http://learning.mazoo.net/archives/001240.html A simple example - step by step] by Mazoo's Learning Blog.
* [http://math.uww.edu/~mcfarlat/s-prob.htm Example of Simplex Procedure for a Standard Linear Programming Problem] by Thomas McFarland of the University of Wisconsin-Whitewater.
* [http://www.phpsimplex.com/simplex/simplex.htm?l=en PHPSimplex: online tool to solve Linear Programming Problems] by Daniel Izquierdo and Juan José Ruiz of the University of Málaga (UMA, Spain)
* [https://web.archive.org/web/20180513100217/http://simplex-m.com/ simplex-m] Online Simplex Solver
 
{{Optimization algorithms|convex}}
[[Category:Combinatorial optimization]]
{{Mathematical programming}}
[[Category:Operations research]]
{{Authority control}}
 
[[de{{DEFAULTSORT:Simplex-Verfahren]] Algorithm}}
[[Category:Optimization algorithms and methods]]
[[es:Algoritmo simplex]]
[[Category:1947 in computing]]
[[fr:Algorithme du simplexe]]
[[Category:Exchange algorithms]]
[[it:Algoritmo del simplesso]]
[[Category:Linear programming]]
[[he:שיטת הסימפלקס]]
[[Category:Computer-related introductions in 1947]]
[[nl:Simplexmethode]]
[[ja:シンプレックス法]]
[[pl:Algorytm sympleksowy]]