Understanding Linear Programming: Simplex Method I and Basic Solutions, Study notes of Engineering

An introduction to the simplex method, a popular algorithm for solving linear programs. The method is based on the observations made from the graphical method, which includes the finiteness of vertices in the feasible region, the optimality of vertices, and the existence of a better adjacent vertex if the current vertex is not optimal. The document further explains the idea of the simplex method, the handling of inequality constraints, unrestricted variables, and variables with upper and lower bounds. It also includes examples and the conversion of a linear program to the standard form.

Typology: Study notes

Pre 2010

Uploaded on 03/10/2009

koofers-user-v8s
koofers-user-v8s 🇺🇸

10 documents

1 / 13

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Lecture 3
Simplex Method I
January 27, 2009
pf3
pf4
pf5
pf8
pf9
pfa
pfd

Partial preview of the text

Download Understanding Linear Programming: Simplex Method I and Basic Solutions and more Study notes Engineering in PDF only on Docsity!

Lecture 3

Simplex Method I

January 27, 2009

Solving Linear Programs

The graphical method is only applicable for simple problems (e.g. problems with two variables). However, it provides some very important observations.

  • The feasible region has finite many vertices (corner points);
  • If the problem is bounded, then at least one optimal solution is also a vertex of the feasible region (the problem could have multiple optimal solutions, but at least one of them is a vertex of the feasible region);
  • If a vertex is not an optimal solution then there exists an adjacent vertex which is better than the current vertex in terms of the objective function value.

These observations form the basis of the Simplex Method.

Linear Programs in the Standard Form

A linear program is in the standard form if

  • All constraints (except those nonnegativity constraints of variables) are equalities;
  • All variables are nonnegative;
  • The objective function and the constraints are simplified so that variables appear at most once on the left-hand side and any constant term appears on the right-hand side. (no constant term in the objective function)

Example:

min x 1 + 3x 2 + 4x 3 x 1 − x 2 + x 3 = 4 x 1 + 2x 2 − x 3 = 3 x 1 , x 2 , x 3 ≥ 0

Linear Programs in the Standard Form

  • max 3 x 1 + 3x 2 + 4x Is each of the following linear programs in the standard form? - x 1 − x 2 + x 3 ≥ - x 1 + 2x 2 − x 3 = - x 1 , x 2 , x 3 ≥ - min 2 x 1 + 3x 2 + x - x 1 + 2x 2 + 3x 3 = - x 1 + 2x 2 − 2 x 3 = - x 1 , x 2 ≥
  • min x 1 + 3x 2 + 4x - x 1 − x 2 + x 3 + 2 = - x 1 + 2x 2 − x 3 − 1 = - x 1 , x 2 , x 3 ≥ - min x 1 + 3x 2 + 4x - x 1 − x 2 + x 3 = - x 1 + 2x 2 − x 3 = - x 1 , x 2 , x 3 ≥

Handling Unrestricted Variables

Unrestricted variables: no sign restriction on the variable xi.

  • Introduce a pair of nonnegative variables x− i ≥ 0 and x+ i ≥ 0, substitute all xi’s with x+ i −x− i (in both the objective function and constraints).
  • In any simplex solution, at most one of the pair of variables can be positive. In fact, if both of them are positive, we can always make one of them 0 without changing the objective value. e.g. x+ i = 5, x− i = 3 can be changed to x+ i = 2, x− i =
    1. The objective value dose not change because x+ i − x− i always appears in the objective function as a whole.

Variables with Upper(Lower) Bounds

  • Nonpositive variables, xi ≤ 0. Introduce yi ≥ 0 and replace xi with −yi everywhere.
  • Variables with upper and lower bounds ai ≤ xi ≤ bi. We can first introduce slacks to make the upper and lower bounds constraints equation constraints. Then treat xi as unre- stricted variables.
  • If we use the above method, the problem can become very big. There is a variation of the simplex method which can handle upper and lower bounds efficiently.

From Vertex to Basic Solutions

Example 1:

max 2 x 1 + 3x 2 2 x 1 + x 2 ≤ 4 x 1 + 2x 2 ≤ 5 x 1 , x 2 ≥ 0 ,

max 2 x 1 + 3x 2 2 x 1 + x 2 + s 1 = 4 x 1 + 2x 2 + s 2 = 5 x 1 , x 2 , s 1 , s 2 ≥ 0 ,

1 2 3 4 5 x 1

x 2

1

2

3

4 2 x 1 + x 2 = 4

x 1 +2 x 2 = 5

1 2 3 4 5 x 1

x 2

1

2

3

4 s 1 = 0

s 2 = 0

Observations: after adding slacks, the boundaries of the feasible region can be represented by one of the variables being 0, the vertices can be represented by two of the variables being 0.

Basic Solutions

  • After converting an LP to the standard form, we have a linear system with n nonnegative variables and m equations. Usually, n > m.
  • By setting n − m variables to 0 and solving for the rest of the variables, we get a basic solution of the linear system. The maximum number of basic solutions is given by

Cmn = n! m!(n − m)!

  • Some of the basic solutions might not be feasible. Those which are feasible are called basic feasible solutions (BFS).
  • In a basic solution, the n − m variables being set to 0 are called nonbasic variables, the other variables are called ba- sic variables. The set of all basic variables is called the basis. Note: basic variables can also be 0, this situation is called degeneracy.

BFSs and Vertices

  • The BFSs and the vertices have one to one relationship. Each BFS corresponds to a vertex, and each vertex corre- sponds to a BFS.
  • If the LP has optimal solutions, then one of the optimal solution must be a BFS. Therefore, we can solve an LP by enumerating all the BFSs.
  • However, due to the large number of basic solutions, (e.g. when n = 20, m = 10, there are C 1020 = 184, 756 basic solu- tions.) it is not practical to enumerate all basic solutions.
  • We start from a vertex, keep moving to a better adjacent vertex until no better adjacent vertices exit. One can show that we must end up with an optimal solution.