Algebraic Solution of LPPs - Simplex
Method
To solve an LPP algebraically, we first put it
in the standard form. This means all
decision variables are nonnegative and all
constraints (other than the nonnegativity
restrictions) are equations with nonnegative
RHS.
Converting inequalities into equations
21 32 xxz +=
Subject to
0,
623
63
21
21
21
≥
≤+
≤+
xx
xx
xx
Maximize
Consider the LPP
We make the ≤ inequalities into equations by
adding to each inequality a “slack” variable
(which is nonnegative). Thus the given LPP
can be written in the equivalent form
21 32 xxz +=
Subject to
0,,,
623
63
2121
221
121
≥
=++
=++
ssxx
sxx
sxx
are slack variables.21,ss
Maximize
Thus we seem to have complicated the
problem by introducing two more variables;
but then we shall see that this is easier to
solve. This is one of the “beauties” in
mathematical problem solving.
The ≥ inequalities are made into equations
by subtracting from each such inequality a
“surplus” (non-negative) variable.
Thus the LPP
21 32 xxz +=
Subject to
0,
223
63
21
21
21
≥
≥+
≤+
xx
xx
xx
Maximize
is equivalent to the LPP
21 32 xxz +=
Subject to
0,,,
223
63
2121
221
121
≥
=−+
=++
ssxx
sxx
sxx
is a slack variable; is a surplus variable.2s1s
Maximize
If in a constraint, the RHS constant is
negative, we make it positive by
multiplying the constraint by -1.
Thus the LPP
21 32 xxz +=
Subject to
0,
223
63
21
21
21
≥
−≥+
≤+
xx
xx
xx
Maximize
is equivalent to the LPP
21 32 xxz +=
Subject to 1 2
1 2
1 2
3 6
3 2 2
, 0
x x
x x
x x
+ ≤
− − ≤
≥
Maximize
Its standard form is the LPP
21 32 xxz +=
Subject to
0,,,
223
63
2121
221
121
≥
=+−−
=++
ssxx
sxx
sxx
Maximize
are slack variables.21,ss
Dealing with unrestricted variables
If, in an LPP, a decision variable xi is
unrestricted (in sign) i.e. it can take positive
as well as negative values, then we can, by
writing i i ix x x+ −
= − ,i ix x+ −
are (defined below and are) nonnegative, make
the LPP into an equivalent LPP where all the
decision variables are ≥ 0.
Note:
| |
;
2
i i
i
x x
x+ +
=
if 0 and otherwisei i i ix x x x+ −
= ≥ −
where
| |
2
i i
i
x x
x− −
=
Thus the LPP
Maximize 21 3xxz +=
Subject to
1 2
1 2
1 2
2
4
unrestricted, 0
x x
x x
x x
+ ≤
− + ≤
≥
is equivalent to the LPP
211 3xxxz +−= −+
Subject to
1 1 2 1
1 1 2 2
1 1 2 1 2
2
4
, , , , 0
x x x s
x x x s
x x x s s
+ −
+ −
+ −
− + + =
− + + + =
≥
Maximize
Basic variables, Basic feasible Solutions
Consider an LPP (in standard form) with m
constraints and n decision variables. We
assume m ≤ n. We choose n –m variables and
set them equal to zero. Thus we will be left
with a system of m equations in m variables.
If this m×m square system has a unique
solution, this solution is called a basic
solution. If further if it is feasible, it is called
a Basic Feasible Solution (BFS).
The n-m variables set to zero are called
nonbasic and the m variables which we are
solving for are known as basic variables.
Thus a basic solution is of the form
x = (x1, x2, …, xn) where n-m “components”
are zero and the remaining m components
form the unique solution of the square
system (formed by the m constraint
equations).
Note that we may have a maximum of
basic solutions.
n
m
 
 ÷
 
Consider the LPP:
Maximize 21 32 xxz +=
Subject to
0,
623
63
21
21
21
≥
≤+
≤+
xx
xx
xx
C
This is equivalent to the LPP (in standard form)
Maximize 21 32 xxz +=
Subject to
0,,,
623
63
2121
221
121
≥
=++
=++
ssxx
sxx
sxx
are slack variables.21,ss
NonbasicNonbasic
(zero)(zero)
variablesvariables
BasicBasic
variablesvariables
BasicBasic
solutionsolution
AssocAssoc
-iated-iated
cornercorner
pointpoint
Feasible?Feasible?
Object-Object-
ive value,ive value,
zz
(0,0,6,6)(0,0,6,6) OO YesYes 00
(0,2,0,2)(0,2,0,2) BB YesYes 66
(0,3,-3,0)(0,3,-3,0) EE NoNo --
(6,0,0, -12)(6,0,0, -12) DD NoNo --
(2,0,4,0)(2,0,4,0) AA YesYes 44
CC YesYes
48/748/7
OptimalOptimal
)0,0,
7
12
,
7
6
(
),,,( 2121 ssxx
),( 21 xx
),( 11 sx
),( 21 sx
),( 12 sx
),( 22 sx
),( 21 ss ),( 21 xx
),( 11 sx
),( 21 sx
),( 12 sx
),( 22 sx
),( 21 ss
Graphical solution of the above LPP
x1
x2
O A D
B
E
C
(2,0) (6,0)
(0,2)
(0,3) (6/7, 12/7)
Optimal point
(0,0)
Thus every Basic Feasible Solution
corresponds to a corner(=vertex) of the set
SF of all feasible solutions.
SF
Consider the LPP:
Maximize 21 3xxz +=
Subject to 1 2
1 2
1 2unrestricted
2
4
, 0
x x
x x
x x
+ ≤
− + ≤
≥
Question 6 (Problem set 3.2A – Page 79)
This is equivalent to the LPP(in standard form)
Maximize 211 3xxxz +−= −+
Subject to
0,,,,
4
2
21211
2211
1211
≥
=+++−
=++−
−+
−+
−+
ssxxx
sxxx
sxxx
NonbasicNonbasic
(zero)(zero)
variablesvariables
BasicBasic
variablesvariables
BasicBasic
solutionsolution
Assoc-Assoc-
iatediated
cornercorner
pointpoint
Feasible?Feasible? ObjectiveObjective
value, zvalue, z
(0,0,0,2,4)(0,0,0,2,4) OO YesYes 00
(0,0,2,0,2)(0,0,2,0,2) BB YesYes 66
(0,0,4,-2,0)(0,0,4,-2,0) EE NoNo --
(0,-2,0,0,6)(0,-2,0,0,6) -- NoNo --
(0,4,0,6,0)(0,4,0,6,0) DD YesYes -4-4
(0,1,3,0,0)(0,1,3,0,0) CC YesYes 88
),,,,( 21211 ssxxx −+
),,( 111 sxx −+
),,( 121 sxx+
),,( 211 xxx −+
),,( 211 sxx −+
),,( 221 sxx+
),,( 211 ssx+
),( 21 ss
),( 21 xx−
),( 11 sx−
),( 21 sx−
),( 12 sx
),( 22 sx
Optimal value
NonbasicNonbasic
(zero)(zero)
variablesvariables
BasicBasic
variablesvariables
BasicBasic
solutionsolution
Associ-Associ-
atedated
cornercorner
pointpoint
FeasibleFeasible
??
ObjectiveObjective
value, zvalue, z
(2,0,0,0,6)(2,0,0,0,6) AA YesYes 22
(-4,0,0,6,0)(-4,0,0,6,0) -- NoNo --
(-1,0,3,0,0)(-1,0,3,0,0) -- NoNo --
N0N0
SolutionSolution -- -- --
),,,,( 21211 ssxxx −+
),,( 221 sxx−
),,( 212 ssx
),,( 211 ssx−
),,( 121 sxx−
),( 11
−+
xx
),( 21 xx+
),( 11 sx+
),( 21 sx+
Hence note that the number of Basic Solutions can be less
than n
m
 
 ÷
 
(-1,3)
z maximum 8
at
0
B
E
D A
C
Direction of
increasing z
21 3xxz +=
Example: Convert the following
optimization problem into a LPP:
Maximize
1 2 1 2max{| 2 3 |, | 3 7 |}z x x x x= + −
Subject to
1 2
1 2
1 2
2
4
, 0
x x
x x
x x
+ ≤
− + ≤
≥
Note that here the objective function is
NOT linear. Let us put
1 2 1 2max{| 2 3 |, | 3 7 |}y x x x x= + −
Hence 1 2 1 2| 2 3 | and | 3 7 |y x x y x x≥ + ≥ −
Which is equivalent to
1 2 1 22 3 , (2 3 )y x x y x x≥ + ≥ − +
( )1 2 1 23 7 , 3 7y x x y x x≥ − ≥ − −
Hence the given optimization problem
is equivalent to the LPP:
Maximize z y=
Subject to 1 2
1 2
2
4
x x
x x
+ ≤
− + ≤
1 2 1 22 3 0, 2 3 0x x y x x y+ − ≤ − − − ≤
1 2 1 2
1 2
3 7 0, 3 7 0.
, , 0
x x y x x y
x x y
− − ≤ − + − ≤
≥

optimization simplex method introduction

  • 1.
    Algebraic Solution ofLPPs - Simplex Method To solve an LPP algebraically, we first put it in the standard form. This means all decision variables are nonnegative and all constraints (other than the nonnegativity restrictions) are equations with nonnegative RHS.
  • 2.
    Converting inequalities intoequations 21 32 xxz += Subject to 0, 623 63 21 21 21 ≥ ≤+ ≤+ xx xx xx Maximize Consider the LPP
  • 3.
    We make the≤ inequalities into equations by adding to each inequality a “slack” variable (which is nonnegative). Thus the given LPP can be written in the equivalent form 21 32 xxz += Subject to 0,,, 623 63 2121 221 121 ≥ =++ =++ ssxx sxx sxx are slack variables.21,ss Maximize
  • 4.
    Thus we seemto have complicated the problem by introducing two more variables; but then we shall see that this is easier to solve. This is one of the “beauties” in mathematical problem solving. The ≥ inequalities are made into equations by subtracting from each such inequality a “surplus” (non-negative) variable.
  • 5.
    Thus the LPP 2132 xxz += Subject to 0, 223 63 21 21 21 ≥ ≥+ ≤+ xx xx xx Maximize
  • 6.
    is equivalent tothe LPP 21 32 xxz += Subject to 0,,, 223 63 2121 221 121 ≥ =−+ =++ ssxx sxx sxx is a slack variable; is a surplus variable.2s1s Maximize
  • 7.
    If in aconstraint, the RHS constant is negative, we make it positive by multiplying the constraint by -1. Thus the LPP 21 32 xxz += Subject to 0, 223 63 21 21 21 ≥ −≥+ ≤+ xx xx xx Maximize
  • 8.
    is equivalent tothe LPP 21 32 xxz += Subject to 1 2 1 2 1 2 3 6 3 2 2 , 0 x x x x x x + ≤ − − ≤ ≥ Maximize
  • 9.
    Its standard formis the LPP 21 32 xxz += Subject to 0,,, 223 63 2121 221 121 ≥ =+−− =++ ssxx sxx sxx Maximize are slack variables.21,ss
  • 10.
    Dealing with unrestrictedvariables If, in an LPP, a decision variable xi is unrestricted (in sign) i.e. it can take positive as well as negative values, then we can, by writing i i ix x x+ − = − ,i ix x+ − are (defined below and are) nonnegative, make the LPP into an equivalent LPP where all the decision variables are ≥ 0. Note: | | ; 2 i i i x x x+ + = if 0 and otherwisei i i ix x x x+ − = ≥ − where | | 2 i i i x x x− − =
  • 11.
    Thus the LPP Maximize21 3xxz += Subject to 1 2 1 2 1 2 2 4 unrestricted, 0 x x x x x x + ≤ − + ≤ ≥
  • 12.
    is equivalent tothe LPP 211 3xxxz +−= −+ Subject to 1 1 2 1 1 1 2 2 1 1 2 1 2 2 4 , , , , 0 x x x s x x x s x x x s s + − + − + − − + + = − + + + = ≥ Maximize
  • 13.
    Basic variables, Basicfeasible Solutions Consider an LPP (in standard form) with m constraints and n decision variables. We assume m ≤ n. We choose n –m variables and set them equal to zero. Thus we will be left with a system of m equations in m variables. If this m×m square system has a unique solution, this solution is called a basic solution. If further if it is feasible, it is called a Basic Feasible Solution (BFS).
  • 14.
    The n-m variablesset to zero are called nonbasic and the m variables which we are solving for are known as basic variables. Thus a basic solution is of the form x = (x1, x2, …, xn) where n-m “components” are zero and the remaining m components form the unique solution of the square system (formed by the m constraint equations). Note that we may have a maximum of basic solutions. n m    ÷  
  • 15.
    Consider the LPP: Maximize21 32 xxz += Subject to 0, 623 63 21 21 21 ≥ ≤+ ≤+ xx xx xx
  • 16.
    C This is equivalentto the LPP (in standard form) Maximize 21 32 xxz += Subject to 0,,, 623 63 2121 221 121 ≥ =++ =++ ssxx sxx sxx are slack variables.21,ss
  • 17.
    NonbasicNonbasic (zero)(zero) variablesvariables BasicBasic variablesvariables BasicBasic solutionsolution AssocAssoc -iated-iated cornercorner pointpoint Feasible?Feasible? Object-Object- ive value,ive value, zz (0,0,6,6)(0,0,6,6)OO YesYes 00 (0,2,0,2)(0,2,0,2) BB YesYes 66 (0,3,-3,0)(0,3,-3,0) EE NoNo -- (6,0,0, -12)(6,0,0, -12) DD NoNo -- (2,0,4,0)(2,0,4,0) AA YesYes 44 CC YesYes 48/748/7 OptimalOptimal )0,0, 7 12 , 7 6 ( ),,,( 2121 ssxx ),( 21 xx ),( 11 sx ),( 21 sx ),( 12 sx ),( 22 sx ),( 21 ss ),( 21 xx ),( 11 sx ),( 21 sx ),( 12 sx ),( 22 sx ),( 21 ss
  • 18.
    Graphical solution ofthe above LPP x1 x2 O A D B E C (2,0) (6,0) (0,2) (0,3) (6/7, 12/7) Optimal point (0,0) Thus every Basic Feasible Solution corresponds to a corner(=vertex) of the set SF of all feasible solutions. SF
  • 19.
    Consider the LPP: Maximize21 3xxz += Subject to 1 2 1 2 1 2unrestricted 2 4 , 0 x x x x x x + ≤ − + ≤ ≥ Question 6 (Problem set 3.2A – Page 79)
  • 20.
    This is equivalentto the LPP(in standard form) Maximize 211 3xxxz +−= −+ Subject to 0,,,, 4 2 21211 2211 1211 ≥ =+++− =++− −+ −+ −+ ssxxx sxxx sxxx
  • 21.
    NonbasicNonbasic (zero)(zero) variablesvariables BasicBasic variablesvariables BasicBasic solutionsolution Assoc-Assoc- iatediated cornercorner pointpoint Feasible?Feasible? ObjectiveObjective value, zvalue,z (0,0,0,2,4)(0,0,0,2,4) OO YesYes 00 (0,0,2,0,2)(0,0,2,0,2) BB YesYes 66 (0,0,4,-2,0)(0,0,4,-2,0) EE NoNo -- (0,-2,0,0,6)(0,-2,0,0,6) -- NoNo -- (0,4,0,6,0)(0,4,0,6,0) DD YesYes -4-4 (0,1,3,0,0)(0,1,3,0,0) CC YesYes 88 ),,,,( 21211 ssxxx −+ ),,( 111 sxx −+ ),,( 121 sxx+ ),,( 211 xxx −+ ),,( 211 sxx −+ ),,( 221 sxx+ ),,( 211 ssx+ ),( 21 ss ),( 21 xx− ),( 11 sx− ),( 21 sx− ),( 12 sx ),( 22 sx Optimal value
  • 22.
    NonbasicNonbasic (zero)(zero) variablesvariables BasicBasic variablesvariables BasicBasic solutionsolution Associ-Associ- atedated cornercorner pointpoint FeasibleFeasible ?? ObjectiveObjective value, zvalue, z (2,0,0,0,6)(2,0,0,0,6)AA YesYes 22 (-4,0,0,6,0)(-4,0,0,6,0) -- NoNo -- (-1,0,3,0,0)(-1,0,3,0,0) -- NoNo -- N0N0 SolutionSolution -- -- -- ),,,,( 21211 ssxxx −+ ),,( 221 sxx− ),,( 212 ssx ),,( 211 ssx− ),,( 121 sxx− ),( 11 −+ xx ),( 21 xx+ ),( 11 sx+ ),( 21 sx+ Hence note that the number of Basic Solutions can be less than n m    ÷  
  • 23.
    (-1,3) z maximum 8 at 0 B E DA C Direction of increasing z 21 3xxz +=
  • 24.
    Example: Convert thefollowing optimization problem into a LPP: Maximize 1 2 1 2max{| 2 3 |, | 3 7 |}z x x x x= + − Subject to 1 2 1 2 1 2 2 4 , 0 x x x x x x + ≤ − + ≤ ≥
  • 25.
    Note that herethe objective function is NOT linear. Let us put 1 2 1 2max{| 2 3 |, | 3 7 |}y x x x x= + − Hence 1 2 1 2| 2 3 | and | 3 7 |y x x y x x≥ + ≥ − Which is equivalent to 1 2 1 22 3 , (2 3 )y x x y x x≥ + ≥ − + ( )1 2 1 23 7 , 3 7y x x y x x≥ − ≥ − −
  • 26.
    Hence the givenoptimization problem is equivalent to the LPP: Maximize z y= Subject to 1 2 1 2 2 4 x x x x + ≤ − + ≤ 1 2 1 22 3 0, 2 3 0x x y x x y+ − ≤ − − − ≤ 1 2 1 2 1 2 3 7 0, 3 7 0. , , 0 x x y x x y x x y − − ≤ − + − ≤ ≥