Undergraduate → Linear Programming and Optimization ↓
Simplex Method
Introduction to linear programming
Linear programming is a mathematical technique for optimizing a linear objective function, subject to linear equality and inequality constraints. It is a way to achieve the best result in a mathematical model whose requirements are represented by linear relationships. This kind of optimization is important in various fields such as economics, engineering, military, and business planning.
Objective function and constraints
In linear programming, our goal is to maximize or minimize a linear objective function. A general linear programming problem can be stated as:
Maximum or minimum: Z = c 1 x 1 + c 2 x 2 + ... + c n x n subject to: a 11 x 1 + a 12 x 2 + ... + a 1n x n ≤ b 1 a 21 x 1 + a 22 x 2 + ... + a 2n x n ≤ b 2 , a m1 x 1 + a m2 x 2 + ... + a mn x n ≤ b m x 1 , x 2 , ..., x n ≥ 0
Here, x 1 , x 2 , ..., x n
are variables, c 1 , c 2 , ..., c n
are the coefficients of the objective function, a ij
are the coefficients of the constraints, and b i
are constants in the constraint equations.
The simplex method: An overview
The simplex method is a popular algorithm used to solve linear programming problems. It was developed by George Dantzig in 1947. This method consists of the following main steps:
- Converting a linear programming problem to the standard form.
- Finding an initial feasible solution.
- Working iteratively to improve the objective function until the optimal solution is reached.
Converting to standard form
Before applying the simplex method, one must transform the given linear programming problem into standard form. This involves ensuring that all constraints are in the form of equality and adding relaxations, superpositions, or artificial variables if necessary.
Suppose we have a constraint like: a 11 x 1 + a 12 x 2 ≤ b 1
To turn this into equality, we introduce a loose variable s 1
:
a 11 x 1 + a 12 x 2 + s 1 = b 1
Finding the initial feasible solution
Once the problem is in standard form, we need to find a basic feasible solution. This involves setting the non-basic variables to zero and solving the system of equations to find the values of the basic variables.
Iterative process
The basic purpose of the simplex method is to improve the value of the objective function by processing through the feasible solutions to identify the optimal solution. This is done by pivoting.
Example
Let's look at a visual example of a linear programming problem. Let's say we have the following problem:
Maximize: Z = 3x 1 + 5x 2 subject to: x 1 + 2x 2 ≤ 8 3x 1 + 2x 2 ≤ 12 x 1 , x 2 ≥ 0
In the above example, the constraints x 1 + 2x 2 = 8
and 3x 1 + 2x 2 = 12
are drawn as lines. The feasible region bounded by the green polygon shows where all the conditions are met.
Pivoting in the simplex method
To improve the objective function, we will choose pivot elements. Entry criteria and exit criteria help to identify which variable enters the basis and which exits. Pivoting modifies our basis so that it moves to an adjacent feasible solution with a higher value (in case of maximization) for the objective function.
Steps involved in pivoting
The pivoting process includes these main steps:
- Identify the entering variable:
- Look at the objective row (also called the cost row) in the simplex tableau. Choose the variable whose coefficient is most positive (for maximization problems). This is our entering variable.
- Determine the departure variable:
- To find the leaving variable, calculate the minimum ratio of the right-hand side to the positive coefficients of the entering variable in each restriction line.
- Perform row operations:
- Adjust the table to reflect this new basis. This involves the pivot element row operation to set the other elements in the column of the entering variable to zero.
Continuation of the example
Let's apply these steps to our previous example.
Simplex tableau for initial basis
The initial table for converting inequalities to equalities is set up with relaxed variables s 1
and s 2
for each constraint:
| x 1 | x 2 | s 1 | s 2 | right hand side | , , 1 | 2 | 1 | 0 | 8 | , 3 | 2 | 0 | 1 | 12 | , , -3 | -5 | 0 | 0 | 0 |
Let us identify the entering and exiting variables:
For maximization, the most negative coefficient in the objective row is -5
(under x 2
). This means that x 2
is our entry variable.
To find the departure variable, we calculate the ratio of the RHS to the positive coefficient of x 2
:
8/2 = 4 (for the first row) 12/2 = 6 (for the second row) The minimum ratio is 4, which indicates that the first line will depart.
Perform row operations to create the original variable x 2
in the first row.
Update the rest of the table accordingly.
Optimal solution
Continue similar pivoting steps until there are no negative coefficients in the objective row (for maximization), indicating that the optimal solution has been found.
Conclusion
The simplex method is an efficient algorithm that works by iterating over the vertices of the feasible region in a systematic manner. It is particularly efficient for linear problems involving a large number of variables and constraints, proving its utility in both theoretical mathematics and practical decision-making scenarios. Through careful implementation and understanding of each step, students can effectively harness the power of the simplex method to find optimal solutions to complex problems.