Simplex algorithm

From Cornell University Computational Optimization Open Textbook - Optimization Wiki
Revision as of 22:21, 18 November 2020 by 502356864 (talk | contribs)
Jump to navigation Jump to search

Author: Guoqing Hu (SysEn 6800 Fall 2020)

Steward: Allen Yang, Fengqi You


Simplex algorithm (or Simplex method) is a widely-used algorithm to solve the Linear Programming(LP). Simplex algorithm can be thought as one of the elementary steps for solving the inequality problem, since many of those will be converted to LP and solved via Simplex algorithm.[1] Simplex algorithm has been proposed by George Dantzig, initiated from the idea of step by step downgrade to one of the vortices on the convex polyhedral.[2] "Simplex" could be possibly referred as the top vertex on the simplicial cone which is the geometric illustration of the constraints within LP problems[3].

Algorithmic Discussion

There are two theorems in LP:

  1. The feasible region for any LP problem is a convex set (Every linear equation's second derivative is 0, implying the monotonicity of the trend). Therefore, if an LP has an optimal solution, there must be an extreme point of the feasible region that is optimal
  2. For any LP, there is only one extreme point of the LP's feasible region regarding to every basic feasible solution. Plus, there will be at minimum of one basic feasible solution corresponding to every extreme point in the feasible region.[4]
Geometric Illustration of LP problem

Based on two theorems above, the geometric illustration of the LP problem could be depicted. Each line of this polyhedral will be the boundary of the LP constraints, in which every vertex will be the extreme points according to the theorem. Simplex method is the way to reasonably sort out the shortest path to the optimal solutions.

Consider the following expression as the general linear programming problem standard form:

With the following constraints:

The first step of the simplex method is to add slack variables and symbols which represent the objective functions:

The new introduced slack variables may be confused with the original values. Therefore, it will be convenient to add those slack variables to the end of the list of x-variables with the following expression:

With the progression of simplex method, the starting dictionary (which is the equations above) switches between the dictionaries in seeking for optimal values. Every dictionary will have m basic variables which form the feasible area, as well as n non-basic variables which compose the objective function. Afterward, the dictionary function will be written in the form of:

Where the variables with bar suggest that those corresponding values will change accordingly with the progression of simplex method. The observation could be made that there will specifically one variable goes from non-basic to basic and one acts oppositely. As this kind of variable is referred as entering variable. Under the goal of increasing , the entering variables are selected from the set {1,2,...,n}. As long as there are no repetitive entering variables can be selected, the optimal values will be found. The decision of which entering variable should be selected at first place should be made based on the consideration that there usually are multiple constraints (n>1). For Simplex algorithm, the coefficient with least value is preferred since the major objective is maximization.

The leaving variables are defined as which go from basic to non-basic. The reason of their existence is to ensure the non-negativity of those basic variables. Once the entering variables are determined, the corresponding leaving variables will change accordingly from the equation below:

Since the non-negativity of entering variables should be ensured, the following inequality can be derived:

Where is immutable. The minimum should be zero to get the minimum value since this cannot be negative. Therefore, the following equation should be derived:

Due the nonnegativity of all variables, the value of should be raised to the largest of all of those values calculated from above equation. Hence, the following equation can be derived:

Once the leaving-basic and entering-nonbasic variables are chosen, reasonable row operation should be conducted to switch from current dictionary to the new dictionary, as this step is referred as pivot.[4]

Numerical Example

Considering the following numerical example to gain better understanding:

with the following constraints:

With adding slack variables to get the following equations:

The simplex tableau can be derived as following:

In the last row, the column with the smallest value should be selected. Although there are two smallest values, the result will be the same no matter of which one is selected first. For this solution, the first column is selected. After the least coefficient is found, the pivot process will be conducted by searching for the coefficient . Since the value for the first row is 1 and second row is 4. Thus, the first row should be pivoted. And following tableau can be created:

By performing the row operation still every other rows (other than first row) in column 1 are zeroes:

Because there is one negative value in last row, the same processes should be performed again. The smallest value in the last row is in the third column. And in the third column, the second row has the smallest coefficients of which is 1.2. Thus, the second row will be selected for pivoting. The simplex tableau is the following:

By performing the row operation to make other columns 0's, the following could be derived

There is no need to further conduct calculation since all values in the last row are non-negative. From the tableau above, , and are basic variables since all rows in their columns are 0's except one row is 1.Therefore, the optimal solution will be , , , achieving the maximum value:


Simplex method can be used in many of programming problems since those will be converted to LP (Linear Programming) and solved by simplex method. Beside of mathematical application, many other industrial planning will use this method to maximize the profits or minimize the resources needed.

Mathematical Problem

Due to the heavy load of computing non-linear problem, many of non-linear problem (NLP) cannot be solved effectively. Consequently, many NLP will rely on the LP solver, namely simplex method, to do some of the work in finding the solution, or in many cases, those NLP will be linearized to LP and solved from simplex method.

Industrial Application

The industries from different field will use simplex method to plan under the constraints. With considering that it is usually the case that the constraints or tradeoffs and desired outcomes are linearly related to the controllable variables, many people will develop the models to solve the LP problem via simplex method, for instance, the agricultural and economic problems

Farmers usually need to rationally allocate the existed resources to obtain the maximum profits. The potential constraints are raised from multiple perspectives including: policy restriction, budget concerns as well as farmland area. Farmers may incline to use the simplex-method-based model to have the better plan, as those constraints may be constant in many scenarios and the profits are usually linearly related to the farm production, thereby forming the LP problem. Currently, there is existing plant-model which can accept inputs such as price, farm production and return the optimal plan to maximize the profits with given information[5].

Beside of the agricultural purposes, simplex method can also be used by enterprises to make the profits. The rational sale-strategy will be indispensable to the successful practice of marketing. Since there are so many enterprises from international wide, the marketing strategy from enamelware are selected for illustration. After widely collecting the data of the quality of varied products manufactured, cost of each and popularity among the customers, the company may need to determine which kind of products will worth the investment and continue making profits as well as which won't. Considering the cost and profit factors are linearly dependent on the production, economists will suggest a LP model which can be solved via simplex method.[6]

The above professional fields are only the a tip of the iceberg to the simplex method application. Many other fields will use this method since LP problem is gaining the popularity in recent days and simplex method plays crucial roles in solving those problems.