Professional Documents
Culture Documents
CHAPTER THREE OF Simplex Method
CHAPTER THREE OF Simplex Method
CHAPTER THREE OF Simplex Method
CHAPTER THREE
The general linear programming problem with n decision variable and m constraints can stated
mathematically as follows
subject ¿
a 21 x2 + a22 x 2+ , … ,+ a2 n x n ( ≤ ,=, ≥ ) b2
⋮ ⋮⋮ ⋮
x i ≥ 0 for i=1 ,2 , … , n
max min
Objective function cT x cT x
Constraint Ax ≤ b Ax ≥ b
Decisional variable x≥0 x≥0
Then it called the canonical form of linear programming problem.
max min
Objective function cT x cT x
Constraint Ax=b Ax=b
Decisional variable x≥0 x≥0
Then it called the standard form of linear programming problem.
We call this the augmented form of the problem because the original form has been augmented
by some supplementary variables.
max c T x
subject ¿
Ax=b
x≥0
min c T x
subject ¿
Ax=b
x≥0
Constraint
If all constraint of LPP are equality constraints then it is already in standard form but if there is
an inequality constrain in our linear programming problem the linear programming problem is
not in standard form so the inequality constraint must be change to equality constraint by adding
or subtracting non-negative variables called slack or surplus variable.
i.e.
It can be transformed to one in standard form or equality constraint by adding slack variable
It can be transformed to one in standard form or equality constraint by adding negative slack
variable (surplus)
Decisional variable
If a variable x i has lower bound l iwhich is not zero ( x i ≥ l i ) , one obtains a non-negative variable
w iwith the substitution
x i=w i+ l i
If a variable x i has upper bound ui which is not zero( x i ≤ ui ) , one obtains a non-negative variable
w iwith the substitution
x i=ui −w i
An interval bound of the form l i ≤ x i ≤ ui can be transformed into one non-negativity constraint
and one linear inequality constraint in standard form by making the substitution
x i=w i+ l i
In this case, the bounds l i ≤ x i ≤ uiare equivalent to the constraints w i ≥ 0andw i ≤ ui−l i :
D, free variables
Sometimes a variable is given without any bounds. Such variables are called free variables. To
obtain standard form every free variable must be replaced by the difference of two non-negative
variables. That is, if x i is free, then we get
x i=ui−v i
withui ≥ 0 and vi ≥ 0 .
Example
Canonical form
Definition: -Consider the system Ax=b andx ≥ 0, where A is anm× n matrix and b is an m
vector. Suppose thatrank ( A ,b)=rank ( A)=m. After possibly rearranging the columns of A, let
A=[B , N ] where B is an m× m invertible matrix and N is an m×(n−m) matrix.
xB
The point x= [ ]
xN
where
x B =B−1 b
x N =0
is called a basic solution of the system. If x B ≥ 0, then x is called a basic feasible solution of the
system. Here B is called the basic matrix (or simply the basis) and N is called the nonbasic
matrix. The components of x B are called basic variables, and the components of x N are called
non-basic variables. If x B >0 , then x is called a non-degenerate basic feasible solution, and if at
least one component of x Bis zero then x is called a degenerate basic feasible solution.
n!
Note: - The number of basic feasible solutions is less than or equal to (mn )= m! ( n−m )!
Example
2 x1 + 4 x 2−2 x 3=10
Solution
A1 x1 + A 2 x 2+ A 3 x 3=bWhere
A1= 2 , A 2= 4 , A3 = −2 ∧b= 10
[ ] [] [ ] [ ]
10 3 −7 33
A=[ A 1 , A2 , A 3 ] = 2 4 −2
[ 10 3 −7 ]
Rank of A is 2.
B1= 2 4 , B 2= 2 −2 , B 3= 4 −2
[
10 3 ] [
10 −7 3 −7 ] [ ]
det (¿ B1)=−34 ≠ 0 , det ( B2 )=6≠ 0 , det ( B 3) =−22 ≠ 0 ¿
All the above square sub matrixes are non-singular and therefore all of them are basis matrix and
thus there exist three basic solutions.
For basic B1
x B =B1−1 b
1
−3 2
[ ][ ] [ ]
x B = 34
10
34
17 10 = 3
−1 33
17
1
For basic B2
x B =B2−1 b
2
−7 1 −2
xB = 6
2
−5
3
[ ][ ] [ ]
3 10 = 3
1 33
3
−17
3
For basic B3
x B =B3−1 b
3
7 1 2
[ ][ ] [ ]
x B = 22
−3
22
11 10 = 11
2 33
11
−51
11
2 51
(
Hence X 3 =( x 1 , x 2 , x 3 )= 0 , ,−
11 11 )
, x 2∧x 3 are basic variables and x 1 is non-basic variable
Example
Consider
4 x1 +2 x 2+3 x 3−8 x 4 =6
3 x 1+5 x 2 +4 x 3−6 x 4 =8
x1 , x2 , x3 , x4 ≥ 0
Solution
A1 x1 + A 2 x 2+ A 3 x 3 + A4 x 4 =bWhere
A=[ A 1 , A2 , A 3 , A 4 ] = [ 43 2 3 −8
5 4 −6 ]
Rank of A is 2.
This implies that the size of basic matrix is2 ×2.
det (¿ B1)=14 ≠ 0 , det ( B2 )=7 ≠ 0 , det ( B3 ) =0 , det (¿ B 4 )=−7 ≠ 0 , det ( B5 )=28≠ 0 , det ( B6 ) =14 ≠ 0 ¿ ¿
x B =Bi−1 b
i
5 −1 4 −3 −4 3
[ ][ ] [ ] [ ][ ] [ ] [ ] [ ] [ ]
x B = 14
−3
14
7 6 = 1 ,x =
2 8
7
1 B 2
7
−3
7
7 6 = 0 ,x =
4 8
7
2 B 4
7
5
7
7 6=0
−2 8
7
2
−3 2 −3 4
[ ][ ] [ ] [ ][ ] [ ]
x B = 14
5
28
7 6=
1 8
14
1
−1 , x B =
2
6
7
−2
7
7 6=2
3 8
14
0
X 1 =[ x1 , x2 , x3 , x 4 ]= [ 1,10,0 ]
X 2 =[ x1 , x2 , x3 , x 4 ]= [ 0,0,2,0 ]
X 4=[ x 1 , x 2 , x 3 , x 4 ] =[ 0,0,2,0 ]
1
[
X 5 =[ x1 , x 2 , x 3 , x 4 ] = 0,1,0 ,−
2 ]
X 6 =[ x 1 , x 2 , x 3 , x 4 ] = [ 0,0,2,0 ]
We shall now show that the collection of basic feasible solutions and the collection of extreme
points are equivalent. In other words, a point is a basic feasible solution if and only if it is an
extreme point. Since a linear programming problem, with a finite optimal value, has an optimal
solution at an extreme point, an optimal basic feasible solution can always be found.
Graphic solution method is a method which is suitable for solving linear programming problems
those has at most two variables. But when we formulate real- life problems as linear
programming model most of them have more than two variables and are too large for the
graphical solution method.
Thus, a more general method known as simplex method is suitable for solving linear
programming problems those has a large number of variables. The method through an iterative
process progressively approaches and ultimately reaches to the maximum or minimum value of
the objective function. The method also helps the decision maker to identify the redundant
constraints, an unbounded solution, multiple solutions and an infeasible problem.
Algebraic form
Tabular form
Example
Solve the following linear programming problem by using simplex algorithm method in
algebraic form
max 6 x 1+ 5 x 2
s.t
x 1+ x2 ≤5
3 x 1+2 x 2 ≤ 2
x1 , x2 ≥ 0
Solution
max 6 x 1+ 5 x 2 +0 x 3+ 0 x 4
s.t
x 1+ x2 + x 3=5
3 x 1+2 x 2+ x 4=12
x1 , x2 , x3 , x4 ≥ 0
Iteration one
Simplex algorithm method always start from initial basic feasible solution
x 3∧x 4are basic feasible variables but x 1∧x 2 are non-basic feasible variables
x 3=5−x1 −x2
x 4 =12−3 x1 −2 x 2
z=6 x 1 +5 x 2
The value of z can increase by increasing ether the value of x 1∨x 2 or both x 1∧x 2
Iteration two
x 1∧x 3are basic feasible variables but x 2∧x 4 are non-basic feasible variables
1
x 1= ( 12−2 x 2−x 4 )
3
2 1
x 1=4− x 2− x 4
3 3
2 1
(
x 3=5− 4− x 2− x 4 −x 2
3 3 )
1 1
x 3=1− x 2 + x 4
3 3
2 1
(
z=6 4− x 2− x 4 +5 x 2
3 3 )
By:-Mengistu C (MSc in optimization theory) Page 10
Linear Optimization:- Chapter Four 2009E.c
z=24 + x 2−2 x 4
The value of z can increase by increasing the value of x 2or by decreasing the value of x 4 . But the
value of x 4 cannot decrease because the value of x 4 is zero .
This implies that x 2 is our interring variable and x 3 is our leaving variable
Iteration three
x 1∧x 2are basic feasible variables but x 3∧x 4are non-basic feasible variables
1
(
x 2=3 1+ x 4 −3 x 3
3 )
x 2=3−3 x 3 + x 4
2 1
x 1=4− ( 3−3 x 3+ x 4 )− x 4
3 3
x 1=2+2 x3 −x 4
z=27−3 x 3−x 4
The value ofzincreases by decreasing the values of x 3∧x 4 . but the value of x 3∧x 4 cannot
decrease because the value of x 3∧x 4is zero
Example 2
Min z=x 1 +2 x 2
Subject to
2 x1 + x 2 ≥ 3
x 1+ 2 x 2 ≥ 6
x2 ≤ 3
x1 ≤ 6
x1 , x2 ≥ 0
Solution
min x 1+ 2 x 2+ 0 s 1+ 0 s 2+ 0 s 3+ 0 s 4 + M a1+ M a 2
subject ¿
2 x1 + x 2−s1 +a 1=3
x 1+ 2 x 2−s2 +a 2=6
x 2+ s 3=3
x 1+ s 4=6
x 1 , x 2 , s1 , s 2 , s 3 , s 4 ≥0
Iteration one
Simplex algorithm method always start from initial basic feasible solution
a 1 , a2 , s 3∧s4 are basic feasible variables but x 1 , x 2 , s1∧s 2 are non-basic feasible variables
a 1=3−2 x 1−x 2+ s 1
a 2=6− x1−2 x 2 +s 2
s3=3−x 2
s4 =6−x 1
The value of z can decrease by increasing ether the value of x 1∨x 2 and by decreasing the value
of s1∨s2 .but the value of s1∧s2 cannot decrease because there value is zero
Iteration two
x 1 , a 2 , s 3∧s 4are basic feasible variables but a 1 , x 2 , s 1∧s2 are non-basic feasible variables
a 1=3−2 x 1−x 2+ s 1
3 1 1 1
x 1= − x2 + s1− a 1
2 2 2 2
a 2=6− x1−2 x 2 +s 2
3 1 1 1
a 2=6− + x 2− s 1+ a1−2 x2 + s2
2 2 2 2
9 3 1 1
a 2 = − x 2 − s 1 + a1 + s 2
2 2 2 2
s3=3−x 2
s4 =6−x 1
3 1 1 1
s4 =6− + x 2− s 1+ a1
2 2 2 2
9 1 1 1
s4 = + x 2− s1 + a1
2 2 2 2
z= ( 32 − 92 M )+( 32 M − 12 ) x +( 12 − 32 M ) s +( 32 M − 12 ) a +( 2−3 M ) x + M s + M s + 9 M
2 1 1 2 1 2
3 3 1 1 3 1 9 3
z= ( 2 2 ) ( 2 2 2 2 ) (
− M x2 + − M s1 + M − a1+ M s2 + M +
2 )
2
The value of z can decrease by increasing ether the value of s1∨x 2 and by decreasing the value
of a 1∨s 2.but the value of a 1∧s 2 cannot decrease because there value is zero
Iteration three
x 1 , x 2 , s3∧s 4are basic feasible variables but a 1 , a2 , s 1∧s 2 are non-basic feasible variables
9 3 1 1
a 2 = − x 2 − s 1 + a1 + s 2
2 2 2 2
1 1 2 2
x 2=3− s 1+ a1 + s 2− a 2
3 3 3 3
3 1 1 1
x 1= − x2 + s1− a 1
2 2 2 2
3 1 1 1 2 2 1 1
(
x 1= − 3− s 1 + a1 + s2− a2 + s1− a 1
2 2 3 3 3 3 2 2 )
3 3 1 1 1 1 1 1
x 1= − + s1 − a1− s 2+ a2 + s 1− a1
2 2 6 6 3 3 2 2
2 2 1 1
x 1= s1− a1− s2 + a2
3 3 3 3
s3=3−x 2
1 1 2 2
s3=3−3+ s1 − a1− s2 + a2
3 3 3 3
1 1 2 2
s3= s 1− a1− s 2+ a2
3 3 3 3
9 1 1 1
s4 = + x 2− s1 + a1
2 2 2 2
9 1 1 1 2 2 1 1
(
s4 = + 3− s 1+ a1 + s 2− a 2 − s1 + a1
2 2 3 3 3 3 2 2 )
9 3 1 1 1 1 1 1
s4 = + − s 1+ a1 + s 2− a2− s 1+ a1
2 2 6 6 3 3 2 2
2 2 1 1
s4 =6− s 1+ a1 + s2− a2
3 3 3 3
z= ( 32 − 32 M ) x +( 12 − 12 M ) s +( 32 M − 12 ) a + M s + 272 M + 32
2 1 1 2
z=M a1 +s 2 +0 s 1 + ( M −1 ) a2 +6
The value of z can decrease by increasing ether the value of s1and by decreasing the value of
a 1∨s 2∨a 2.but the value of a 1 , a2∧s 2cannot decrease because there value is zero and when the
value of s1increase the value of z remain constant that means our problem has alternative
solution.
Iteration three
x 2 , s1 , s 3∧s 4 are basic feasible variables but a 1 , a2 , x1∧s 2 are non-basic feasible variables
2 2 1 1
x 1= s1− a1− s2 + a2
3 3 3 3
2 2 1 1
s1=x 1 + a1 + s2− a2
3 3 3 3
3 1 1
s1= x 1 +a1 + s2− a 2
2 2 2
1 1 2 2
x 2=3− s 1+ a1 + s 2− a 2
3 3 3 3
1 3 1 1 1 2 2
x 2=3− (
3 2 2 2 )
x 1 +a1 + s 2− a 2 + a1 + s2 − a2
3 3 3
1 1 1 1 1 2 2
x 2=3− x 1− a1− s2 + a2 + a1 + s2− a2
2 3 6 6 3 3 3
1 1 1
x 2=3− x 1 + s 2− a2
2 2 2
1 1 2 2
s3= s 1− a1− s 2+ a2
3 3 3 3
1 3 1 1 1 2 2
s3= (
3 2 2 2 3)
x 1+ a1 + s 2− a2 − a 1− s 2 + a2
3 3
1 1 1 1 1 2 2
s3= x 1 + a1 + s2 − a2− a1− s2 + a 2
2 3 6 6 3 3 3
1 1 1
s3= x 1− s2 + a2
2 2 2
2 2 1 1
s4 =6− s 1+ a1 + s2− a2
3 3 3 3
2 3 1 1 2 1 1
s4 =6− (
3 2 2 2 3 )
x 1 +a1 + s2− a 2 + a 1+ s2 − a2
3 3
2 1 1 2 1 1
s4 =6−x 1− a1− s 2+ a2+ a1 + s 2− a2
3 3 3 3 3 3
s4 =6−x 1
z=M a1 +s 2 +0 s 1 + ( M −1 ) a2 +6
z=M a1 +s 2 +0 ( 32 x +a + 12 s − 12 a )+( M −1 ) a +6
1 1 2 2 2
z=M a1 +s 2 + ( M −1 ) a2 +6
The value of z can decrease by increasing ether the value of x 1and by decreasing the value of
a 1∨s 2∨a 2.but the value of a 1 , a2∧s 2cannot decrease because there value is zero and when the
value of x 1increase the value of z remain constant that means our problem has alternative
solution.
f(x) = 2∙x + 3 8
1
g(x) = ∙x + 3
2
6
h(x) = 3
q(y) = 6
n = 6.00
4
1 n
r(x) = ∙x +
2 2
2
15 10 5 5 10 15
The step of the simplex algorithm to obtain an optimal solution (if it exists) to a linear
programming problem as follows
Cj C1 C2 ⋯ Cn 0 0 ⋯0
Coefficient Variables in x1 x1 ⋯ xn s1 s1 ⋯ sm value of Minimu
of basic basic B basic m ratio
variables ( variable
c β) b ( x β)
c β 1=0 s1 a 11 a 12 ⋯ a1 n 1 0 ⋯0 b1
c β 2=0 s2 a 21 a 22 ⋯ a2 n 0 1 ⋯0 b2
⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮
c βm=0 sm am1 a m2 ⋯ amn 0 0 ⋯1 bm
Z j=∑ C β 1 x j 0 0 ⋯0 0 0 ⋯0
∆ j=C j−Z j ∆1 ∆2 ⋯ ∆n 0 0 ⋯0
The variable corresponding to the columns of the identity matrix is called basic
variables.
The first row in the above table indicates the coefficients C j of the variables in the
objective function which remain the same in successive simplex tables.
The second row provides the major column heading for the simplex table.
c β Lists the coefficients of the current basic variables in the objective function. These
values are used to calculate value of Z when one unit of any variable brought into the
solution.
Column headed by x β represent the current value of the corresponding variables in the
basis.
The identity matrix (or basis matrix) represents the coefficient of slack or surplus
variables which have been added or subtracted to the constraint. Each column of the
identity matrix also represents a basic variable to be listed in the columnB.
Number a ij in the column under variable are also called substitution rate or exchange
coefficients.
The value of z j represent the amount by which the value of the objective function Z
would be decreased (or increased) if one unit of given variable is added to the new
solution.
Each of the value in the C j−Z j represent the net amount of increase (decrease) in the
objective function that would occur when one unit of the variable represented by the column
head is introduce into the solution
Test is done by computing an evaluation∆ j j=1 , 2 , ⋯ , nfor each non-basic variable (zero
variables) x j by the formula∆ j=C j−C βi x j
Examine the values of ∆ j=C j−Z j there may arise three cases
a) If none of ∆ jis positive, but any are zero, then other optimal solution
exist with the same value of Z .
b) If all of ∆ j are negative, then the solution under test is unique optimal
solution.
II. If ∆ j >0 for all j , i.e. if any or more of ∆ j are positive , then the solution under
test is not optimal
If the solution under test is not optimal, we must proceed to the next step
a) If the corresponding to maximum positive∆ j, all the elements in the column x j are
negative or zero, then the solution under test will be unbounded.
b) If the value at least one artificial variable appearing in the basis is non-zero and
the optimality condition is satisfied, then we shall say that the problem has no
feasible solution.
If case (ii) of step 4 holds, then select a variable that has the largest value to enter into the new
solution. i.e. ∆ k =C k −Z k =max {C J −Z j ; C J −Z j >0 } The column to be entered is called the key
or pivot column.
Step 6:- Test for feasibility (variable to leave the basis or outgoing vector)
After identifying the variable to become basic variable, the variable to be removed from the
existing set of basic variables is determined. For this, each number in x β column (i.e.b i values) is
divided by the corresponding (but positive) number in the key column and we select the row for
constant column
which this ratio, [ key column ]is non-negative and minimum. This ratio is called
x βr x βr
replacement(exchange) ratio.i.e.
a rj
=min{ : a >0
arj rj }
By:-Mengistu C (MSc in optimization theory) Page 19
Linear Optimization:- Chapter Four 2009E.c
The row selected in this manner is called the key or pivot row and represents the variable,
which will leave the solution.
The element that lies at the intersection of the key row and key column of the simplex table
called key or pivot element.
i. If the key element is 1, then the row remains the same in the new simplex table.
ii. If the key element is other than 1, then divided each element in the key row
(including the element in x β -column) by the key element, to find the new values
for that row.
iii. The new values of the elements in the remaining rows for the new simplex table
can be obtained by performing elementary row operation on all rows so that all
elements except the key element in the key column are zero.
The new entries in c β (coefficient of basic variables) and x β (value of basic variables) column are
updated in the new simplex table of the current solution.
Got to step 4 and repeat the procedure until all entries in the ∆ j=C j−Z j row are either negative
or zero.
Example 1
Solve the following linear programming problem by using simplex algorithm method in tabular
form
max 6 x 1+ 5 x 2
s.t
x 1+ x2 ≤5
3 x 1+2 x 2 ≤ 12
x1 , x2 ≥ 0
Solution
max 6 x 1+ 5 x 2 +0 s1 +0 s 1
s.t
x 1+ x2 + s1=5
3 x 1+2 x 2+ s 2=12
x 1 , x 2 , s1 , s 2 ≥ 0
s1∧s2 are basic feasible variables but x 1∧x 2are non-basic feasible variables
Cj 6 5 0 0
CB B x1 x2 s1 s2 b=x B Minimum ratio
0 s1 1 1 1 0 5 5
0 s2 3 2 0 1 12 4→
zj 0 0 0 0 0
∆ z=C j−z j 6 ↑ 5 0 0
0 s1 0 1/3 1 1 −1/ 3 3→
6 x1 1 2/3 0 4 1/3 6
zj 6 4 024 2
∆ z=C j−z j 0 1 ↑ 0 -2
5 x2 0 1 3 3 -1
6 x1 1 0 -2 2 1
zj 6 5 3 1 27
∆ z=C j−z j 0 0 -3 -1
As we see from the above table our linear programming problem has unique solution.
Example 2
Solve the following linear programming problem by using simplex algorithm method in tabular
form
max 12 x1 +8 x 2
s.t
4 x1 +2 x 2 ≤ 80
2 x1 +3 x 2 ≤ 100
5 x 1+ x 2 ≤75
x1 , x2 ≥ 0
Solution
max 12 x1 +8 x 2 +0 s 1+ 0 s 2+ s 3
s.t
4 x1 +2 x 2+ s 1=80
2 x1 +3 x 2+ s 2=100
5 x 1+ x 2 +s 3=75
x 1 , x 2 , s1 , s 2 , s 3 ≥0
Cj 12 8 0 0 0
12 x1 1 0 −1 0 1 35 35
6 3 3
zj 12 8 14 0 −4 820
3 3 3
∆ z=C j−z j 0 0 −14 0 4
↑
3 3
8 x2 0 1 −1 1 0 30
4 2
0 s3 0 0 −13 3 1 20
8 4
12 x1 1 0 3 −1 0 5
8 4
zj 12 8 5 1 0 300
2
∆ z=C j−z j 0 0 −5 -1 0
2
As we see from the above table our linear programming problem has unique solution.
Example 3
Solve the following linear programming problem by using simplex algorithm method in tabular
form
max 10 x 1+20 x 2
s.t
x 1 ≤ 10
x2 ≤ 6
2 x1 + 4 x 2 ≤ 32
x1 , x2 ≥ 0
Solution
max 10 x 1+20 x 2 +0 s 1 +0 s 2+ 0 s 3
s.t
x 1+ s 1=10
x 2+ s 2=6
2 x1 + 4 x 2 s3=32
x 1 , x 2 , s1 , s 2 , s 3 ≥0
Cj 10 20 0 0 0
CB B x1 x2 s1 s2 s3 b=x B Minimum ratio
0 s1 1 0 1 0 0 10 -
0 s2 0 1 0 1 0 6 6→
0 s3 2 4 0 0 1 32 8
zj 0 0 0 0 0 0
∆ z=C j−z j 10 20↑ 0 0 0
0 s1 1 0 1 0 0 10 10
20 x2 0 1 0 1 0 6 -
0 s3 2 0 0 -4 1 8 4→
zj 0 20 0 20 0 120
∆ z=C j−z j 10↑ 0 0 -20 0
0 s1 0 0 1 2 −1 6 3→
2
20 x2 0 1 0 1 0 6 6
10 x1 1 0 0 -2 1 4 -
2
zj 10 20 0 0 5 160
∆ z=C j−z j 0 0 0 0↑ -5
0 s2 0 0 1 1 −1 3
2 4
20 x2 0 1 −1 0 1 3
2 4
10 x1 1 0 1 0 0 10
zj 10 20 0 0 5 160
∆ z=C j−z j 0 0 0 0 -5
As we see from the above table our linear programming problem has many solutions.
Alternative solution
Cj 10 20 0 0 0
CB B x1 x2 s1 s2 s3 b=x B Minimum ratio
0 s2 0 0 1 1 −1 3 6→
2 4
20 x2 0 1 −1 0 1 3 -
2 4
10 x1 1 0 1 0 0 10 10
zj 10 20 0 0 5 160
∆ z=C j−z j 0 0 0 ↑ 0 -5
0 s1 0 0 1 2 −1 6
2
20 x2 0 1 0 1 0 6
10 x1 1 0 0 -2 1 4
2
zj 10 20 0 0 5 160
∆ z=C j−z j 0 0 0 0 -5
( x 1 , x 2 )=( 4,6 )
And the optimal value is
This implies that elements of the line segment joining ( 10,3 )and ( 4,6 ) are also optimal solutions
In certain cases it is difficult to obtain an initial basic feasible solution from the standard form of
linear programming problem. So In order to get initial basic feasible solution we are going to
apply artificial variable technique.
after adding the surplus variable (negative slack variable) si in to the i thconstrain, and by
letting x j=0 for j=1 ,2 , ⋯ , n we get initial solution si=−bi form same i. But It is not
feasible solution because it violates the non-negative condition of the surplus variable
(i.e. si ≥0 ). In this case we add artificial variable a i to get initial basic feasible solution i.e.
n
∑ aij x j −s i+ ai=¿ b i ¿
j=1
n
2. When the constrains are of ≤ type ( i.e. ∑ aij x j ≤ bi , x j ≥ 0) and some of them have negative
j=1
after adding the non-negative slack variable si in to the i thconstrain, and by letting
x j=0 for j=1 ,2 , ⋯ , n we get initial solution si=bi form same i. But It is not feasible
solution because it violates the non-negative condition of the slack variable (i.e. si ≥0 ). In
this case we are going to multiply both side of the i thconstrain by −1 and it become the
same condition as we state above
Artificial variables have no meaning in the physical sense and are only used as tool for
generating an initial basic feasible solution. Before the final simplex solution is reached all the
artificial variables must be dropped out from the solution mix. This is done by assigning
coefficients to those variables in the objective function.
There are two methods for eliminating artificial variables from the solution
I. Two-phase method
II. Big-M method or method of penalties
TWO-PHASE METHOD
In the first phase of this method the sum of the artificial variables is minimized subject to the
given constraints to get initial basic feasible solution of the linear programming problem. The
second phase minimizes the original objective function starting with the initial basic feasible
solution obtained at the end of the first phase. Since the solution of the linear programming
problem is completed in two phases this is called two-phase method.
Phase I
Step1:-
a. If all the constraints in the given linear programming problem are ≤ type and have
non-negative right hand side value, then phase II can be directly used to solve the
problem. Otherwise, the necessary numbers of surplus and artificial variables are
added to convert constraints into equality constraints.
Step2:- Assign zero coefficients to each of the decisional variables and to the surplus variables,
and assign (−1) coefficient to each of the artificial variables. This yields the following auxiliary
linear programming problem.
m
¿
max z =∑ (−1 ) ai
i=1
subject ¿
n
x j , si , ai ≥ 0
Step 3 :- Apply simplex algorithm to solve this auxiliary linear programming problem . The
following three cases may arise at optimality
i. max z ¿ =0and at least one artificial variable is present in the basis with positive
value. Then no feasible solution exists for the original linear programming
problem.
ii. max z ¿ =0and no artificial variables is present in the basis. Then we move to phase
II to obtain an optimal basic feasible solution to the original linear programming
problem.
iii. max z ¿ =0and at least one artificial variable is present in the basis at zero value.
Then a feasible solution to the auxiliary linear programming problem is also a
feasible solution to the original linear programming problem.
Phase II
Assign actual coefficient to the variables in the objective function and zero to the
artificial variables which appear at zero value in the basis at the end of phase I. i.e. the
last simplex table of the phase I can be used as the initial simplex table for phase II. Then
apply the usual simplex algorithm to the modified simplex table to get the optimal
solution to the original problem. Artificial variables which do not appear in the basis may
be removed
Example
s.t
2 x1 + x 2 ≥ 2
x 1+ 3 x 2 ≤2
x2 ≤ 4
x1 , x2 ≥ 0
Solution
s.t
2 x1 + x 2−s1 +a 1=2
x 1+ 3 x 2 + s2=2
x 2+ s 3=4
x 1 , x 2 , s1 , s 2 , s 3 , a1 ≥ 0
max z=−¿ a1 ¿
s.t
2 x1 + x 2−s1 +a 1=2
x 1+ 3 x 2 + s2=2
x 2+ s 3=4
x 1 , x 2 , s1 , s 2 , s 3 , a1 ≥ 0
Phase I
Cj 0 0 0 0 0 −1
CB B x1 x2 s1 s2 s3 a1 b=x B Minimum
ratio
-1 a1 2 1 −1 0 0 1 2 1→
0 s2 1 3 0 1 0 0 2 2
0 s3 0 1 0 0 1 0 4 −¿
zj −2 −1 1 0 0 −1
∆ z=C j−z j 2↑ 1 −1 0 0 0
0 x1 1 1 −1 0 0 1 1 1→
2 2 2
0 s2 0 5 1 1 0 −1 1 2
2 2 2
0 s3 0 1 0 0 1 0 4 −¿
zj 0 0 0 0 0 0
∆ z=C j−z j 0 0 0 0 0 −1
Since all Δz ≥ 0 , Max Z∗¿ 0and no artificial vector appears in the basis, we proceed to phase II.
Phase II
Cj 3 −1 0 0 0
CB B x1 x2 s1 s2 s3 b=x B Minimum ratio
3 x1 1 1 −1 0 0 1 −¿
2 2
0 s2 0 5 1 1 0 1 2→
2 2
0 s3 0 1 0 0 1 4 −¿
zj 3 3 −3 0 0
2 2
∆ z=C j−z j 0 −5 3 0 0
↑
2 2
3 x1 1 3 0 1 0 2
0 s1 0 5 1 2 0 2
0 s3 0 1 0 0 1 4
zj 3 9 0 3 0
∆ z=C j−z j 0 −10 0 −3 0
BIG-M METHOD
The big –M method is another method of removing artificial variable from the basis. In this
method, we assign coefficient to the artificial variable undesirable from the objective point of
view. If objective function is to be minimized, then a very large positive price (called penalty) is
assigned to each artificial variable. Similarly if the objective function is to be maximized, then a
very large negative price (also called penalty) is assigned to each of these variables. The penalty
will be designated by −M for maximization problem and + M for minimization problem where
M >0.
Steps of big-M method are the same as Steps of simplex method except when we formulate the
standard form of linear programming problem.
big-M method assign a very large positive coefficient + M (for minimization case) and
very large negative coefficient −M (for maximization case) to artificial variables in the
objective function
Step 1:-Modify the constraints so that the RHS of each constraint is nonnegative (This requires
that each constraint with a negative RHS be multiplied by−1. Remember that if you multiply an
inequality by any negative number, the direction of the inequality is reversed!). After
modification, identify each constraint as a ≤ , ≥∨¿ constraint.
Step 3:- Add an artificial variable a i to the constraints identified as ≥∨¿constraints at the end of
Step 1. Also add the sign restrictiona i ≥ 0.
Step 4:- LetM denote a very large positive number. If the LP is a min problem, add (for each
artificial variable) M aito the objective function. If the LP is a max problem, add (for each
artificial variable) −M aito the objective function.
Step 5:- solve the transformed linear optimization problem by using simplex algorithm
method (In choosing the entering variable, remember that M is a very large positive number!).
Example
max 3 x 1+ 2 x 2+ x3
s.t
x 1+ 2 x 2 +2 x 3=10
x 1+ x2 + x 3=6
x1, x2 , x3≥ 0
Solution
The standard form of the above linear optimization problem with artificial variable
max 3 x 1+ 2 x 2+ x3 −M a 1−M a2
s.t
x 1+ 2 x 2 +2 x 3 +a 1=10
x 1+ x2 + x 3 +a2=6
x 1 , x 2 , x 3 ,a 1 , a2 ≥ 0
Cj 3 2 1 −M −M
CB B x1 x2 x3 a1 a2 b=x B Minimum ratio
−M a1 1 2 2 1 0 10 5→
−M a2 1 1 1 0 1 6 6
Zj −2 M −3 M −3 M −M −M
∆j 3+2 M 2+3 M ↑ 1+3 M 0 0
2 x2 1/2 1 1 ½ 0 5 10
−M a2 1/2 0 0 −1/2 1 1 2→
Zj M 2 2 M −M
1− 1+
2 2
∆j M 0 −1 3M
2+ −1−
2 2
2 x2 0 1 1 1 −1 4
3 x1 1 0 0 −1 2 2
Zj 3 2 2 −1 4 14
∆j 0 0 −1 −M +1 −M −4