Chap 1 Linear Programming Problem
Chap 1 Linear Programming Problem
Operation Research
Subject Orientation
Create mathematical model for a CO1: Formulate mathematical model for a Creating Unit 1-Linear Programming CO1
broad range of problems in broad range of problems in business and Problem(formulation)
business and industry. industry.
Obtain the optimum solution to real CO2: Apply mathematics and mathematical Applying Unit 1-Linear Programming CO2
world problems by applying modelling to forecast implications of various Problem(fgraphical and simplex
different methods choices in real world problems. method)
Unit 2-ransportation Problem
Unit 3- Assignment Problem &
Travelling Salesman Problem
learn to take decisions in various CO3: Think strategically and decide the Evaluating Unit 4: Game Theory & Decision CO3
business optimum alternative from various available Making :
environments using competitive options.
strategy for analysis
learn to analyze queuing and CO4: Evaluate performance parameters of Evaluating Unit 5:Queuing Models: CO4
simulation models performance in a real system using various methods. Unit 6: Simulation
real
world systems
Nature and meaning of O.R.
1. physical distribution:
▪ Location & size of ware house ,distribution centers
2. Facilities planning
▪ Number & location of factories warehouse
▪ Loading & unloading facilities for railroads & trucks determining the
transport schedule
3. Manufacturing
4. Maintenance & project scheduling
▪ Project scheduling & allocation of resources
▪ Maintenance policies & preventive maintenance
Personnel management
❖
❖
❖
Formulation of LP Problems
Example 1
A firm manufactures two types of products A and B and sells them at a
profit of Rs. 2 on type A and Rs. 3 on type B. Each product is processed on two
machines G and H.
Type A requires 1minute of processing time on G and 2 minutes on H;
type B requires 1 minute on G and 1 minute on H.
The machine G is available for not more than 6 hours 40 minutes while
machine H is available for 10 hours during any working day.
The machine G is available for not more than 6 hours 40 minutes while
machine H is available for 10 hours during any working day.
Profit 45 80
Zmax= 45x1+80x2
5x1+20x2<=400
10x1+15x2<=450
X1,x2>=0
Product A Product B Availability
Raw materials 5 20 400
Man hours 10 15 450
Profit 45 80
Hence
Maximize Z = 45x1 + 80x2→objective function
Subject to
5x1+ 20 x2 ≤ 400 →constraint 1
10x1 + 15x2 ≤ 450 →constraint 2
x1 ≥ 0 , x2 ≥ 0→ non-negativity restriction
Must >=
Example 3
A firm manufactures 3 products A, B and C. The profits are Rs. 3, Rs. 2 and Rs.
4 respectively.
The firm has 2 machines and below is given the required processing time in
minutes for each machine on each product.
Machine X and Y have 2000 and 2500 machine minutes. The firm must
manufacture 100 A’s, 200 B’s and 50 C’s type, but not more than 150 A’s.
Products
machine A B C
X 4 3 5
Y 2 2 4
Solution
x1 x2 x3
Zmax=3x1+2x2+4x3
4x1+3x2+5x3<=2000
2x1+2x2+4x3<=2500
x1,x2,x3>=0
Solution
x1 be the number of units of product A
x2 be the number of units of product B
x3 be the number of units of product C
Low 6 2 12
high 2 2 8
medium 4 12 24
Cost per day 1000 800
Solution
x1 be the no. of days a week the mill A has to work
x2 be the no. of days per week the mill B has to work
Minimize Z = 1000x1 + 800 x2
Subject to
low → 6x1 + 2x2 ≥ 12
High→ 2x1 + 2x2 ≥ 8
medium→ 4x1 +12x2 ≥ 24
x1 ≥ 0 , x2 ≥ 0
Example 5
method
1. Graphical method:
This method can be used if there are only two decision
variables in the LPP.
2. Simplex method:
This method can be used in case where LPP has only two
decision variables.
3. Optimal solution is a feasible solution that has the most favourable value of the objective
function.
4. Most favourable value is the largest value if the objective function is to be maximized,
1. Solution – Any specification of the values for decision variable among (x1, x2… xn) is called a
solution.
2. Feasible solution is a solution for which all constraints are satisfied.
3. Infeasible solution is a solution for which at least one constraint is not satisfied.
4. Feasible region is a collection of all feasible solutions.
5. Optimal solution is a feasible solution that has the most favourable value of the objective
function.
6. Most favourable value is the largest value if the objective function is to be maximized, whereas
it is the smallest value if the objective function is to be minimized.
7. Multiple optimal solution – More than one solution with the same optimal value of the objective
function.
8. Unbounded solution – If the value of the objective function can be increased or decreased
indefinitely such solutions are called unbounded solution.
Examples
Example 1
Solve 3x + 5y <= 15 graphically
Solution
3x+5y=15
Put x=0 y=5y=15 →y=15/5=3
Put y=0 3x=15 →x=15/3=5
(x,y)=(5,3)
Examples
Example 1
Solve 3x + 5y <= 15 graphically
Solution
Write the given constraint in the form of equation
i.e. 3x + 5y = 15
Put x=0 then the value y=3
Put y=0 then the value x=5
Therefore the coordinates are (0, 3) and (5, 0). Thus these points are joined to
form a straight line as shown in the graph . which is the feasible region.
Example 2
Solve 3x + 5y >=15
Solution
Example 2
Solve 3x + 5y >=15
Solution
Write the given constraint in the form of equation i.e.
3x + 5y = 15
Put x=0, then y=3
Put y=0, then x=5
So the coordinates are (0, 3) and (5, 0)→(5,3)
Example 3
2x1+4x2=32
2(8)+4x2=32
16+4x2=32
4x2=32-16=16
X2=16/4=4 B(x1,x2)=(8,4)
corner points Max Z = 80x1 + 55x2
O C
A(0,2)
C(6,0) corner points Max Z = 80x1 + 55x2
FOR B (8.25,1.25)
A (0, 2) =8
10x+70y =140→L1 B ( 5.25, 1.25) =15.5
10x+6y=60→ l2 C (6, 0) =12
O(0,0) =0
- - -
---------------------
64Y= 80 Y=80/64 =1.25 The maximum value is
obtained at the
10X+70(1.25)=140 X= 5.25 point B
Max Z = 15.5
x= 5.25 y=1.25
Example 5
Solution:
3x1 + 2x2 = 60
Put x1=0 2x2= 60 x2= 30
Put x2=0 3x1=60 x1=20 (x1,x2)= (20,30)– L1
7x1+2x2=84 – L2
Put x1=0 2x2= 84 x2= 42
X2=0 7x1= 84 x1= 12 (x1,x2)= (12,42)—L2
3x1+6x2=72
Put x1=0 6x2= 72 x2= 12
Put x2=0 3x1= 72 x1= 24---- (x1,x2)= ( 24,12)—L3
Solution
Solution
The first constraint 3x1 + 2x2 ≥ 60,
3x1 + 2x2 = 60
Put x1 =0, then x2 = 30
Put x2 =0, then x1 = 20
The coordinates are (0, 30) and (20, 0)
The second constraint 7x1 + 2x2 ≥ 84,
7x1 + 2x2 = 84
Put x1 =0, then x2 = 42
Put x2 =0, then x1 = 12
The coordinates are (0, 42) and (12, 0)
L1 L3
L2
For B - L1 and L2
3x1 + 2x2 = 60 L1
7x1 + 2x2= 84 L2
- - - -
- --------------------------
- -4x1=- 24 x1= 6 put L1 18+2x2= 60
- 2x2= 60-18 = 42 x2= 21
- B(x1,x2)= (6, 21)
For c L1 and L3
3x1 + 2x2 = 60 L1
3x1 +6x2 = 72 L3
- - -
-----------------------
-4x2= -12 x2= 3 put this in L1
3x1+6=60 3x1= 54 x1= 18
c(x1,x2)= ( 18,3)
The corner points of feasible region are A,
B, C and D.
A (0, 42)
B (6, 21) (Solve the two equations
7x1 + 2x2 = 84 and 3x1 + 2x2 = 60 to
get the coordinates)
C (18, 3) Solve the two equations
3x1 +6x2 = 72 and 3x1 + 2x2 = 60 to
get the coordinates)
D (24, 0)
corner points Min Z = = 10x1 + 4x2
x = ounce of A
y =ounce of B
For vitamin C : 2x + y >= 8
iron: 2x + 2y >=10
x >= 0, y >= 0
Cost = Zmin= 4x+3y
2x + y = 8
Put x=0 y =8
Put y=0 x= 4 (4,8) --L1
2x + 2y =10
X=0 2y=10 y=5
Y=0 2x=10 x=5 (5,5) –L2
Zmin= 4x+3y
A
c
2x + y = 8
Put x =0, then y= 8
Put y =0, then x = 4
vitamin C The coordinates are (0, 8)
and (4, 0)
2x + 2y =10
Put x =0, then y= 5
Put y =0, then x = 5
vitamin C The coordinates are (0, 5) and (5, 0)
Iron
All constraints
are >= type so
vitamin C shaded region is
outside part of
every constraints
Iron
vitamin C
Iron
A
corner pt. C = 4x + 3y
vitamin C
A(0,8) 4(0)+3(8)= 24
B(5,0) 4(5)+3(0)= 20
C(3,2) 4(3)+3(2)= 18
Iron
B
corner pt. C = 4x + 3y
Our requirements is for
A A(0,8) 4(0)+3(8)= 24 the least cost.
B(5,0) 4(5)+3(0)= 20
vitamin C C(3,2) 4(3)+3(2)= 18 As Objective function is
for minimization
Iron
B
corner pt. C = 4x + 3y
A A(0,8) 4(0)+3(8)= 24
B(5,0) 4(5)+3(0)= 20
vitamin C C(3,2) 4(3)+3(2)= 18
So Solution is at C(3,2)
Zmin= 18
C x=3 , y= 2
Iron
B
Example 7- bicycle factories
bikes has just arrived. How many days should each factory be operated
in order to fill this order at a minimum cost? What is the minimum cost?
Solution:
3-Speed 10-speed Cost
A 16 20 1000
B 12 20 800
At Least 96 140
10-speed
All constraints
are >= type so
shaded region is
3-speed outside part of
every constraints
10-speed
3-speed
10-speed
corner pts C = 1000x + 800y
A
10-speed
B
corner pts C = 1000x + 800y
A
10-speed
B
Example 8 - ski manufacturing
Birla Polar Products makes downhill and cross country skis. A pair of
downhill skis requires 2 man-hours for cutting, 1 man-hour for shaping and
3 man-hours for finishing while a pair of cross country skis requires 2 man-
hours for cutting, 2 man-hours for shaping and 1 man-hour for finishing.
Each day the company has available 140 man-hours for cutting, 120 man-
hours for shaping and 150 man-hours for finishing. How many pairs of each
type of ski should the company manufacture each day in order to maximize
Cross 2 2 1 8
country
availability 140 120 150
Zmax= 10x+8y
Cross 2 2 1 8
country
availability 140 120 150
cutting
shaping
finishing
cutting
B C
shaping
D
A E
For B 2x + 2y = 140—L1
x + 2y <= 120—L2
- - -
-------------------------------------------
B(20,50)
6x + 2y = 300—L3
2x + 2y = 140—L1
- - - -
- -----------------------------
4x= 160 x=40 put in l1 2y= 60 y= 30 D( 40,30)
corners Points z = 10x + 8y
A(0,0) 0
B(0,60) 480
C(20,50) 600
D(40,30) 640
E(50,0) 500
finishing
Solution:
cutting Make 40 pairs of downhill skis and
30 pairs of cross country skis for a
B C profit of 640
shaping
D
A E
Example:
Zmax=3x1+x2
2x1+x2>=2
3x1+4x2<=12
X1,x2>=0
1. Infeasibility
2. Unbounded
3. Redundancy
4. Alternate optima (Alternate optimum solution)
INFEASIBILITY
It is a case where there is no solution, which satisfies all the
constraints at the same time. This may occur if the problem is
not correctly formulated. Graphically, infeasibility is a case
where there is no common region, which satisfies all
constraints simultaneously.
Example 1:
Zmax=3x+2y
3x+5y>=15-----L1
2x+3y<=6------L2
x , y>=0
Example 1:
Zmax=3x+2y
3x+5y>=15-----L1
2x+3y<=6------L2
x y
x , y>=0
3x+5y=15 0 3
5 0
2x+3y=6 0 2
3 0
3x+5y>=15-----L1
Feasible region is
out side portion of
L1 the line
For line 2 Feasible
region is inside
L1 portion of the line
L2
2x+3y<=6------L2
There is no common
region satisfied by
all the constraints
so solution is
infeasible solution
L1
L2
Example 2
Solve graphically
Max Z = 3x1 + 2x2
Subject to
x1+ x2 ≤ 1
x1+ x2 ≥ 3
x1 ≥ 0 , x2 ≥ 0
The first constraint x1+ x2 =1,
Put x1 =0, then x2 = 1
Put x2 =0, then x1 = 1
The coordinates are (0, 1) and (1, 0)
The second constraint x1+ x2 = 3
Put x1 =0, then x2 = 3
Put x2 =0, then x1 = 3
coordinates are (0, 3) and (3, 0)
L2
L1
There is no common
region
so solution is
infeasible solution
L2
L1
UNBOUNDEDNESS
➢ A LPP can fail to have an optimum solution if the objective
can be made infinitely large without violating any of the
constraints.
x y
x-y=1 0 -1
4 3
x+ y=3 0 3
2 1
There is no finite
8 maximum value of z
so solution is
6 unbounded solution
4
L1
2
-6 - 4 -2 2 4 6 8
-2
-4
L2
-6
Example 2:
Solve by graphical method
Max Z = 3x1 + 5x2
Subject to
2x1+ x2 ≥ 7
x1+ x2 ≥ 6
x1+ 3x2 ≥ 9
x1 ≥ 0 , x2 ≥ 0
2x1+ x2 = 7
Put x1 =0, then x2 = 7
Put x2 =0, then x1 = 3.5
The coordinates are (0, 7) and (3.5, 0)
x1+ x2 = 6
Put x1 =0, then x2 = 6
Put x2 =0, then x1 = 6
The coordinates are (0, 6) and (6, 0)
x1+ 3x2 = 9
Put x1 =0, then x2 = 3
Put x2 =0, then x1 = 9
The coordinates are (0, 3) and (9, 0)
There is no finite
maximum value of z
so solution is
unbounded solution
REDUNDANCY :
L2 L1
L4
These constraints
does not affect
feasible region .so
we remove them
L3 from solution
L2 L1
L4
System after
removing redundant
constraints
L3
L2
For B
4x1+3x2=12----------------L2
-x1+x2 =1--------------------L3
L2
corner pts Zmax=6x1+ 2x2
A (0,4) 8
B (9/7,16/7 ) 86/7=12.28
C(0, 1) 2
L3 Solution is
A At point B
X1=9/7 , x2=16/7
Zmax=12.28
B
L2
ALTERNATIVE OPTIMA
➢ More than one solution with the same optimal value of the
objective function..
Example 1
Solve by using graphical method
Max Z = 4x1 + 3x2
Subject to
4x1+ 3x2 ≤ 24
x1 ≤ 4.5
x2 ≤ 6
x1 ≥ 0 , x2 ≥ 0
4x1+ 3x2 = 24
Put x1 =0, then x2 = 8
Put x2 =0, then x1 = 6
The coordinates are (0, 8) and (6, 0)→(6,8)
x1 ≤ 4.5
x1 = 4.5 (4.5,0)
x2 ≤ 6
x2 = 6
B 4x1+3x2= 24 x2=6
4x1= 24-18= 6 x1= 6/4
B( 6/4,6)
C x1=4.5 4x1+3x2=24
3x2= 24- 18= 6 x2=2
C(4.5,2)
Surplus variable:
A variable which is used to convert greater than or equal to( )
constraints into equality constraints.
It is subtracted from the left hand side of the constraints.
Artificial variable:
❑ A variable which is added to convert equal to (=) & greater
Key column :
It is the column with most negative zj - cj & its indicates which
variable will enter in next solution
key row :
It is the row with smallest positive value of the replacement
ratio of constraints row . Replacement ratio is obtain by dividing
elements in solution column by corresponding elements in the key
column . The key ratio element indicate the leaving variable.
Key (Pivot) element :
It is element at the intersection of key row & key column.
Simplex Algorithm:
Procedure for solving problem using simplex method
to be positive.
CB B XB X1 X2 S1 S2 Ratio
S1
Coefficient of Make entry Make the entry from Constraints i.e. Select
slack variable from RHS coefficient of corresponding variable in smallest
in objective S2 of equation particular constraints positive value
function as key Row
zj CB . XB CB . X1 CB . X2 CB . s1 CB . s2
x1 ≥ 0, x2 ≥ 0, s1 ≥ 0, s2 ≥ 0
Cj
CB Basic XB Min
Variables (RHS) ratio
XB
/Xk
Zj
Zj-Cj
x1+x2+s1=4
x1-x2+s2=2
Zmax=3x1+2x2+0s1+0s2
Cj 3 2 0 0
CB Basic XB X1 X2 S1 S2 Min
Variables (RHS) ratio
XB
/Xk
0 S1 4 1 1 1 0
0 S2 2 1 -1 0 1
Zj 0 0 0 0 0
Zj-Cj
Construct the starting simplex table using the notations
Cj 3 2 0 0
CB Basic XB X1 X2 S1 S2 Min
Variables (RHS) ratio
XB
/Xk
0 S1 4 1 1 1 0
0 S2 2 1 -1 0 1
Zj 0 0 0 0 0
Zj-Cj -3 -2 0 0
Most negative
Key column
value
Construct the starting simplex table using the notations
Cj 3 2 0 0
CB Basic XB X1 X2 S1 S2 Min
Variables (RHS) ratio
XB
/Xk
0 S1 4 1 1 1 0 4
Min value
0 S2 2 1 -1 0 1 2
Zj 0 0 0 0 0 Key Row
Zj-Cj -3 -2 0 0
Most negative
Key column
value
Construct the starting simplex table using the notations
Cj 3 2 0 0
CB Basic XB X1 X2 S1 S2 Min
Variables (RHS) ratio
Key XB
Element /Xk
0 S1 4 1 1 1 0 4
Min value
0 S2 2 1 -1 0 1 2
Zj 0 0 0 0 0 Key Row
Zj-Cj -3 -2 0 0
Most negative
Key column
value
Construct the starting simplex table using the notations
Entering variable
Cj 3 2 0 0
CB Basic XB X1 X2 S1 S2 Min
Variables (RHS) ratio
Intersecting
XB
element
/Xk
0 S1 4 1 1 1 0 4
0 S2 2 1 -1 0 1 2
Outgoing Zj 0 0 0 0 0
variable
Zj-Cj -3 -2 0 0
Construct the starting simplex table using the notations
Cj 3 2 0 0
CB Basic XB X1 X2 S1 S2 Min
Variables (RHS) ratio
XB
/Xk
0 S1
0 X1 new values 2 1 -1 0 1
Zj
Zj-Cj
For s1 :
Old values – intersecting element *new value
4-(1*2)=4-2=2
1- (1 *1)=1-1=0
1- (1*(-1))=1+1=2
1- (1*0)=1-0=1
0- (1*1)=0-1=-1
Construct the starting simplex table using the notations
Cj 3 2 0 0
CB Basic XB X1 X2 S1 S2 Min
Variabl (RHS) ratio
es XB
/Xk
0 S1
Old value-(intersecting element * new values)
3 X1 2 1 -1 0 1
Zj
Zj-Cj
Construct the starting simplex table using the notations
Cj 3 2 0 0
CB Basic XB X1 X2 S1 S2 Min
Variables (RHS) EV ratio
XB /Xk
KE =2/2=1
0 S1 2 0 1 -1
2 min +ve
OV KR
=2/-1=-2
3 X1 2 1 -1 IE 0 1
=(0*2+3*2)= =(0*0+3*1)= =(0*2+3*- =(0*1+3*0)= =(0*-
Zj 0+6=6 0+3=3 1)=0-3=-3 0 1+3*1)=3
Cj 3 2 0 0
CB Basic XB X1 X2 S1 S2 Min
Variab (RHS) ratio
les XB
/Xk
2 X2 New
Value
1 0 1 1/2 -1/2
3 x1 3 1 0 1/2 1/2
Zj 11 3 2 5/2 1/2
0 0 5/2 1/2
Zj-Cj
Zmax=11 x1=3 x2=1
For x1:
Old value – IE * new value
2+1*1=2+1=3
1+1*0=1+0=1
-1+1*1=-1+1=0
0+1*1/2=0+1/2=1/2
1+1*(-1/2)=1-1/2=(2-1)/2=1/2
Construct the starting simplex table using the notations
Cj 3 2 0 0
CB Basic XB X1 X2 S1 S2 Min
Variab (RHS) ratio
les XB
/Xk
0 S1 2 0 2 1 -1
3 X1 2 1 -1 0 1
Zj 6 3 -3 0 3
Zj-Cj 0 -5 0 3
Most negative
Key column
Construct the starting simplex table using the notations
Cj 3 2 0 0
CB Basic XB X1 X2 S1 S2 Min ratio
Variables (RHS) XB /Xk
0 S1 2 0 2 1 -1 2/2=1 Min
value
3 X1 2 1 -1 0 1 2/-1=-2 Key
Zj 6 3 -3 0 3 Row
Zj-Cj 0 -5 0 0
0 S1 2 0 2 1 -1 2/2=1
3 X1 2 1 -1 0 1 2/-1=-2
Zj 6 3 -3 0 3
Zj-Cj 0 -5 0 0
Intersecting Element
Construct the starting simplex table using the notations
Cj 3 2 0 0
CB Basic XB X1 X2 S1 S2 Min ratio
Variables (RHS) XB /Xk
2 X2 1 0 1 1/2 -1/2
3 X1
Zj
Zj-Cj
Construct the starting simplex table using the notations
Cj 3 2 0 0
CB Basic XB X1 X2 S1 S2 Min ratio
Variables (RHS) XB /Xk
2 X2 1 0 1 1/2 -1/2
3 X1 3 1 0 1/2 1/2
Zj
Zj-Cj
Construct the starting simplex table using the notations
Cj 3 2 0 0
CB Basic XB X1 X2 S1 S2 Min ratio
Variables (RHS) XB /Xk
2 X2 1 0 1 1/2 -1/2
3 X1 3 1 0 1/2 1/2
Zj 11 3 2 5/2 1/2
Zj-Cj 0 0 5/2 ½
Construct the starting simplex table using the notations
Cj 3 2 0 0
CB Basic XB X1 X2 S1 S2 Min ratio
Variables (RHS) XB /Xk
2 X2 1 0 1 1/2 -1/2
3 X1 3 1 0 1/2 1/2
Zj 11 3 2 5/2 1/2
Zj-Cj 0 0 5/2 1/2
Zj
Zj-Cj
2x1 + x2 +s1 =6
2x1 + 3x2 +s2= 9
Zmax= 3x1 +4x2 +0s1+0s2
0 0 0 0 0
Zj
-3 -4 0 0
Zj-Cj
KC
Obj function 3 4 0 0
coefficient Cj
12 8/3 4 0 4/3
Zj
8/3-3=(8-
4-4=0 0 4/3
Zj-Cj 9)/3=-1/3
KC
Obj function 3 4 0 0
coefficient Cj For x2 :
Old value-IE*new value
3-(2/3*9/4)=3-3/2=3/2
CB Basic XB X1 X2 S1 S2 Min 2/3-(2/3*1)=0
Variable (RH ratio 1-(2/3*0)=1
0-(2/3*3/4)=-1/2
s S) XB
1/3+(2/3* 1/4)
/Xk =1/3+1/6=(2+1)/6
3 X1 9/4 1 0 3/4 -1/4
=3/6=1/2
NR
4 x2 3/2 0 1 -1/2 1/2
Solution:
51/4 3 4 1/4 5/4 Zmax=51/4
Zj X1= 9/4 x2=3/2
0 0 1/4 5/4
Zj-Cj
Example 3:
Cj 3 2 5 0 0 0
CB Basic XB X1 X2 X3 S1 S2 s3 Min
Variables (RHS) EV ratio
XB /Xk
s1 430 1 2 1 1 0 0 430
0
IE
S2 460 3 0 0 1 0 230
0 2
OV KR
KE
s3 420 1 4 0 0 0 1 ∞
0
IE
Zj 0 0 0 0 0 0 0
Zj-Cj -3 -2 -5 0 0 0
KC
Zmax = 3x1 +2x2 + 5x3 + 0s1+0s2+0s3
x1 + 2x2 +x3 +s1= 430
3x1 + 2x3 +s2= 460
x1 + 4x2 +s3 = 420
(2*-1/4)+(5*1/2)=(-1/2+5/2)=(-1+5)/2=4/2=2
Zmax = 3x1 +2x2 + 5x3 + 0s1+0s2+0s3
x1 + 2x2 +x3 +s1= 430
3x1 + 2x3 +s2= 460
x1 + 4x2 +s3 = 420
Cj 3 2 5 0 0 0
CB Basic XB X1 X2 x3 S1 S2 s3 Min For s3 :
Varia (RHS ratio
420-4*100=20
bles ) XB
/Xk 1+4*1/4=2
2 X2 100 -1/4 1 0 1/2 -1/4 0 4-4*1=0
NR 0-4*0=0
5 x3 230 3/2 0 1 0 1/2 0 0-4*1/2=-2
0+4*1/4=1
0 s3 20 2 0 0 -2 1 1 1-4*0=1
Zj 1350 7 2 5 1 2 0
zj-cj>=0
Zj- 4 0 0 1 2 0 Solution:
Zmax=1350
Cj X1=0
X2=100
X3= 230
Example 4:
Zmax = 2x1 + x
Subject to :
4x1 + 3x2 <= 12
4x1 + x2 <= 8
4x1 - x2 <= 8
x1 , x2 >=0
Cj 2 1 0 0 0
CB Basic XB X1 X2 S1 S2 S3 Min ratio
Variables (RHS) XB /Xk
S1
0 12 4 3 1 0 0 3
S2
0 8 4 1 0 1 0 2
S3
0 8 4 -1 0 0 1 2
Zj 0 0 0 0 0 0
Zj-Cj -2 -1 0 0 0
Cj 2 1 0 0 0
CB Basic XB X1 X2 S1 S2 S3 Min ratio
Variables (RHS) XB /Xk
S1
0 4 0 4 1 0 -1 1
S2
0 0 0 2 0 1 -1 0/2=0
x1
2 2 1 -1/4 0 0 1/4 -8
Zj 4 2 -1/2 0 0 1/2
Zj-Cj 0 -3/2 0 0 1/2
Cj 2 1 0 0 0
CB Basic XB X1 X2 S1 S2 S3 Min ratio
Variables (RHS) XB /Xk
S1
0 4 0 0 1 -2 1 4/1=4
x2
1 0 0 1 0 1/2 -1/2 -
x1
2 2 1 0 0 1/8 1/8 16
Zj 4 2 1 0 3/4 -1/4
Zj-Cj 0 0 0 3/4 -1/4
Cj 2 1 0 0 0
CB Basic XB X1 X2 S1 S2 S3 Min ratio
Variables (RHS) XB /Xk
S3
0 4 0 0 1 -2 1
x2
1 2 0 1 1/2 -1/2 0
x1
2 3/2 1 0 -1/8 3/8 0
Zj 5 2 1 1/4 1/4 0
Zj-Cj 0 0 1/4 1/4 0
Cj -1 3 -2 0 0 0
CB Basic XB X1 X2 x3 S1 S2 s3 Min ratio
Variables (RHS) EV XB /Xk
0 S1 7 3 -1 3 1 0 0 -7
IE
0 S2 12 -2 4 0 0 1 0
3
OV KE
KR
s3 10 -4 3 8 0 0 1
0 3.3
IE
Zj 0 0 0 0 0 0
Zj-Cj 1 -3 2 0 0 0
KC
3x1 - x2 +3x3 +s1= 7
-2x1 + 4x2 +s2= 12
-4x1 + 3x2 +8x3 +s3= 10 Zmax=-x1+3x2-2x3+0s1+0s2+0s3
▪ Artificial variable:
1. Big M method
Example 1
Max Z = -2x1 - x2
Subject to
3x1 + x2 = 3→add A1
4x1 + 3x2 ≥ 6 → sub s1 and add A2
x1 + 2x2 ≤ 4 → s2
and x1 ≥ 0, x2 ≥ 0
Solution
SLPP:
3x1+x2+A1=3
4x1+3x2-s1+A2=6
X1+2X2+S2=4
ZMAX= -2x1-x2+0s1+0s2-MA1-MA2
X1,x2,s1,s2,A1,A2>=0
3x1+x2+A1=3
4x1+3x2-s1+A2=6
X1+2X2+S2=4
ZMAX= -2x1-x2+0s1+0s2-MA1-MA2
NOTE: Always write M term first in zj-cj row
Cj -2 -1 0 0 -M -M
CB B XB X1 X2 S1 S2 A1 A2 ratio
(RHS) EV XB /Xk
-M A1 OV 3 3 1 0 0 1 0 3/3/=1
KE
-M A2 6 4 IE 3 -1 0 0 1 6/4=1.5 Key
row
0 S2 4 1 IE 2 0 1 0 0 4/1=4
-2 X1 1 1 1/3 0 0 1/3 0 3
NR IE
-M A2 2 0 5/3 -1 0 -4/3 1 6/5=1.2
OV KE Key Row
0 S2 3 0 5/3 IE 0 1 -1/3 0 9/5=1.8
Zj -2M-2 -2 (-5M-2)/3 M 0 (4M+2)/3 -M
Key column
For x1: For s2:
1-1/3*6/5=3/5 •3 -5/3*6/5=1
•0 -5/3*0=0
1-1/3*0=1
•5/3 -5/3*1=0
1/3-1/3*1=0 •0 +5/3*3/5=1
0+1/3*3/5=1/5 •1 -5/3*0=1
•-1/3 +5/3*4/5=1
0-1/3*0=0 •0 -5/3*3/5=-1
1/3+1/3*4/5=3/5
0-1/3*3/5=-1/5
Cj
-2 -1 0 0 -M -M
CB Basic XB X1 X2 S1 S2 A1 A2 Min ratio
Variables (RHS) EV XB /Xk
0 s2 1 0 0 1 1 1 -1
Zj -12/5 -2 -1 1/5 0 -2/5 -1/5
Solution:
Zmin=2x1+8x2
Zmax=-Zmin= -2x1-8x2
5x1+10x2+A1=150
X1+s1=20
X2-s2+A2=14
X1,x2,s1,s2,A1,A2>=0
Zmax= -2x1-8x2+0s1+0s2-MA1-MA2
5x1+10x2+A1=150
X1+s1=20
X2-s2+A2=14
Zmax= -2x1-8x2+0s1+0s2-MA1-MA2
Cj
-2 -8 0 0 -M -M
CB Basic XB X1 X2 S1 S2 A1 A2 Min
Variables (RHS) EV ratio
XB /Xk
-M A1 150 5 10 IE 0 0 1 0 150/10=15
0 S1 20 1 0 IE 1 0 0 0 20/0=∞
-M A2 OV 14 0 0 -1 0 1 14/1=14
1 KE Key row
Zj -164M -5M -11M 0 M -M -M
Zj-Cj -5M+2 -11M+8 0 M 0 0
Key column
FOR A1:
150 -10* 14=10
5 -10*0=5
10 -10*1=0
0 -10*0=0
0 +10*1=10
1 -10*0=1
0 -10*1=-10
5x1+10x2+A1=150
X1+s1=20
X2-s2+A2=14
Zmax= -2x1-8x2+0s1+0s2-MA1-MA2
Cj
-2 -8 0 0 -M -M
CB Basic XB X1 X2 S1 S2 A1 A2 Min
EV
Variables (RHS) ratio
XB /Xk
-M A1 10 5 0 0 1 -10 Key row
ov
10 KE 1
0 S1 20 1 0 1 0 0 0
∞
-8 X2 14 0 1 0 -1 0 1
NR
-14
-10M-112 -5M -8 0 -10M+8 -M 10M-8
Zj
-5M+2 0 0 -10M+8 0 11M-8
Zj-Cj
Key column
FOR S2:
14+1=15
0+1/2=1/2
1+0=1
0+0=0
-1+1=0
0+1/10=1/10
1-1=0
5x1+10x2+A1=150
X1+s1=20
X2-s2+A2=14
Zmax= -2x1-8x2+0s1+0s2-MA1-MA2
Cj
-2 -8 0 0 -M -M
CB Basic XB X1 X2 S1 S2 A1 A2 Min
EV
Variables (RHS) EV ratio
XB /Xk
0 S2 1 ½ 0 0 1 1/10 -1 Key row
2
ov KE
0 S1 20 1 IE 0 1 0 0 0
20
-8 X2 15 ½ IE 1 0 0 1/10 0 30
-120 -4 -8 0 0 -4/5 0
Zj
-2 0 0 0 M-4/5 M
Zj-Cj
Key column
Cj
-2 -8 0 0 -M -M
CB Basic XB X1 X2 S1 S2 A1 A2 Min
Variables (RHS) ratio
XB /Xk
-2 x1 2 1 0 0 2 1/5 -2
0 s1 18 0 0 1 -2 -1/5 2
-8 x2 14 0 1 0 -1 0 1
Zj -116 -2 -8 0 4 -2/5 -4
Zj-Cj 0 0 0 4 M-2/5 M-4
Zmax= -4x1-x2+0s1+0s2-MA1-MA2
3x1+x2+A1=3
4X1+3x2-S1+A2=6
X1+2X2+S2=4
Zmax= -4x1-x2+0s1+0s2-MA1-MA2
Cj -4 -1 0 0 -M -M
CB Basic XB X1 X2 S1 S2 A1 A2 Min
Variables (RHS) EV ratio
XB /Xk
-M A1 OV 3 1 0 0 1 0 1
Key row
3 KE
-M A2 6 4 IE 3 -1 0 0 1 1.5
0 S2 4 1 IE 2 0 1 0 0 4
Key column
A2: S2:
6-4*1=2 4-1=3
4-4*1=0 1 -1=0
3-4*1/3=5/3 2-1/3=5/3
-1-4*0=-1 0-0=0
0-4*0=0 1-0=1
0-1/3=-1/3
0-4*1/3=-4/3
0-0=0
1-4*0=1
3x1+x2+A1=3
4X1+3x2-S1+A2=6
X1+2X2+S2=4
Zmax= -4x1-x2+0s1+0s2-MA1-MA2
Cj -4 -1 0 0 -M -M
CB Basic XB X1 X2 S1 S2 A1 A2 Min
Variables (RHS) EV EV ratio
XB
/Xk
-4 X1 NR 1 1 1/3 IE 0 0 1/3 0 3
-M A2 OV 2 0 -1 0 -4/3 1 6/5
5/3 KE =1.2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=0
Zmax=--4x1-x2+0S1+0S2-MA1-MA2
3x1+4x2-s1+A1=20
X1+5x2-S2+A2=15
Cj -4 -1 0 0 -M -M
CB Basic XB X1 X2 S1 S2 A1 A2 Min
Variables (RHS) EV ratio
XB
/Xk
-M A1 20 3 4 IE -1 0 1 0 5
-M A2 15 1 KE 0 -1 0 1 3 KR
OV 5
Zj -4M -9M M M -M -M
3x1+4x2-s1+A1=20
X1+5x2-S2+A2=15
Cj -4 -1 0 0 -M -M
CB Basic XB X1 X2 S1 S2 A1 A2 Min
Variables (RHS) EV EV ratio
XB
/Xk
2. Phase 2:
a. use optimum basic feasible solution of phase I as an starting
solution for original LPP.
b. assign actual cost to variable in objective function& zero to
artificial variable.
c. Delete artificial variable column from the table which is
eliminated from the basis in phase I
d. Apply simplex method till optimum solution not obtained
Solve using two phase method
Example 1:
Zmin= x1+x2
2x1+x2>=4
X1+7x2>=7
x1,x2>=0
Zmin= x1+x2
2x1+x2>=4
X1+7x2>=7
x1,x2>=0
Solution:
Zmax= - x1-x2
2x1+x2-s1+A1=4
X1+7x2-s2+A2=7
For phase I
Zmax = -0x1 - 0x2 + 0s1 + 0s2 -A1-A2
For phase I I
Zmax = -x1 - x2 + 0s1 + 0s2 -0A1-0A2
2x1+x2-s1+A1=4
X1+7x2-s2+A2=7
For phase I Zmax = -0x1 - 0x2 + 0s1 + 0s2 -A1-A2
Cj
0 0 0 0 -1 -1
CB Basic XB X1 X2 S1 S2 A1 A2 Min
Variables (RHS) EV ratio
XB /Xk
-1 A1 4 2 1 IE -1 0 1 0 4
-1 A2 7 1 0 -1 0 1 1 KR
OV 7KE
Zj -11 -3 -8 1 1 -1 -1
Zj-Cj -8 1 1 0 0
KC
2x1+x2-s1+A1=4
X1+7x2-s2+A2=7
For phase I Zmax = -0x1 - 0x2 + 0s1 + 0s2 -A1-A2
Cj
0 0 0 0 -1 -1 FOR A1
CB Basic XB X1 X2 S1 S2 A1 A2 Min Old value – IE * new value
Variables (RHS) EV ratio 4 -1*1= 3
XB /Xk 2 -1*1/7= 13/7
1 -1* 1= 0
-1 A1 3 13/7 0 -1 1/7 1 -1/7 21/13 -1 -1*0=-1
OV KE KR 0 +1*1/7= 1/7
0 X2 NR 1 1/7 1 0 -1/7 0 1/7 7 1 -1*0=1
IE 0 -1*1/7= -1/7
Zj -3 -13/7 0 1 -1/7 -1 1/7
Cj
0 0 0 0 -1 -1
CB Basic XB X1 X2 S1 S2 A1 A2 Min ratio For x2 :
Variables (RHS) XB /Xk 1-1/7* 21/13=10/13
1/7 -1/7*1=0
1-1/7*0=1
0+1/7*7/13= 1/13
x1 -1/7-1/7*1/13=-2/13
0 21/13 1 0 -7/13 1/13 7/13 -1/13
0-1/7*7/13=-1/13
1/7+1/7*1/13=2/13
0 X2 10/13 0 1 1/13 -2/13 -1/13 2/13
Zj 0 0 0 0 0 0
Zj-Cj 0 0 0 0 1 1
If zj-cj>=0 then stop and move to phase II with last iteration and phase II objective function
. If last iteration basic variable don’t have artificial variable then delete artificial variable column
from phase II
2x1+x2-s1+A1=4
X1+7x2-s2+A2=7
For phase II Zmax = -x1 - x2 + 0s1 + 0s2 -0A1-0A2
Phase II
Cj
-1 -1 0 0
CB Basic XB X1 X2 S1 S2 Min ratio
Variables (RHS) XB /Xk
Zmax= 3x1-x2
2x1+x2>=2
X1+3x2<=2
X1,x2>=0
Solution:
Zmax= 3x1-x2
2x1+x2>=2
X1+3x2<=2
X1,x2>=0
2x1+x2-s1+A1=2
x1+3x2+s2=2
x1,x2,s1,s2,A1>=0
Phase I : Zmax= 0x1-0x2+0s1+0s2-A1
Phase II : Zmax= 3x1-x2+0s1+0s2-0A1
2x1+x2-s1+A1=2
x1+3x2+s2=2
Cj 0 0 0 0 -1
CB Basic XB X1 X2 S1 S2 A1 Min
Variables (RHS) OV ratio
XB /Xk
-1 A1 2 2 KE 1 -1 0 1 1 KR
EV
0 S2 2 1 IE 3 0 1 0 2
Zj -2 -2 -1 1 0 -1
Zj-Cj -2 -1 1 0 0
KC
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0 0
For x2:
CB Basic XB X1 X2 S1 S2 S3 Min
Variable (RHS) EV EV ratio
9/10+3/10*2=3/2
s XB /Xk 0+3/10*5=3/2
1+3/10*0=1
0 S2 2 5 0 -2 1 0 - 1/10-3/10*2= -1/2
NR -3/10+3/10*1=0
3/2 3/2 1 -1/2 0 0 - 0+3/10*0=0
8 X2
Cj 5 8 0 0 0
CB Basic XB X1 X2 S1 S2 S3 Min
Variable (RHS) EV EV ratio
s XB /Xk
0 S2 16 3 0 0 1 4
5 1 1 0 0 1
8 X2
Zj-cj>=0
7 -1 0 1 0 2 7 KR
0 S1 NR Zmax= 40 x1=0 x2= 5
Zj 40 8 8 0 0 8
Zj-Cj 3 0 0 0 8
Methods Of Finding Solution:
Graphical Method
Simplex Method- Special cases
Degeneracy
Unbounded solution
Infeasible solution
Alternative optima
Degeneracy:
0 s1 8 1 4 1 0 2
0 s2 4 1 2 0 1 2
Zj 0 0 0 0 0
Zj-Cj -3 -9 0 0
S1 S2 x1 x2
0 s1 8 1 4 1 0 2
0 s2 4 1 2 0 1 2
Zj 0 0 0 0 0
Zj-Cj -3 -9 0 0
Cj 3 9 0 0
CB Basic XB X1 X2 S1 S2 Min ratio
Variables (RHS) XB /Xk
0 s1 0 -1 0 1 -2
9 x2 2 1/2 1 0 1/2
Zj 18 9/2 9 0 9/2
Max Z = 5, x1 = 3/2, x2 = 2
Unbounded Solution
0 s1 1 1 -1 1 0 1
0 s2 6 3 -2 0 1 2
Zj 0 0 0 0 0
Zj-Cj -3 -2 0 0
Cj 3 2 0 0
CB Basic XB X1 X2 S1 S2 Min ratio
Variables (RHS) XB /Xk
3 x1 1 1 -1 1 0 -
0 s2 3 0 1 -3 1 3
Zj 3 3 -3 3 0
Zj-Cj 0 -5 3 0
Cj 3 2 0 0
CB Basic XB X1 X2 S1 S2 Min ratio
Variables (RHS) XB /Xk
3 x1 4 1 0 -2 1
-
2 x2 3 0 1 -3 1
-
Zj 18 3 2 -12 5
Zj-Cj 0 0 -12 5
Solution: all ratio elements are negative So we can’t able to find key row
hence outgoing variable . Such situation is called Unbounded Solution
Example 2:
Zmax=107x1+x2+2x3
14/3x1+1/3x2-2x3+x4=7
16x1+1/2x2-6x3<=5
3x1-x2-x3<=0
x1,x2,x3>=0 Nov-05,Dec-08,May-09
Infeasible solution:
When all zj-cj ≥ 0 but artificial variable present in
solution such solution is called Infeasible solution.
Zmax=3x1+2x2
2x1+x2<=2
3x1+4x2>=12
x1,x2>=0
Solution:
2x1+x2+s1=2
3x1+4x2-s2+A1=12
Zmax=3x1+2x2+0s1+0s2-MA1
Cj 3 2 0 0 -M
CB Basic XB X1 X2 S1 S2 A1 Min
Variable (RHS) ratio
s XB /Xk
0 s1 2 2 1 1 0 0 2
-M A1 12 3 4 0 -1 1 3
Zj -12M -3M -4M 0 M -M
2 x2 2 2 1 1 0 0
-M A1 4 -5 0 -4 -1 1
0 s1 30 2 3 1 0 0 0 15
0 s2 24 3 2 0 1 0 0 8
-M A1 3 1 1 0 0 -1 1 3
Zj -3M -M -M 0 0 M -M
0 s1 24 0 1 1 0 2 -2 12
0 s2 15 0 -1 0 1 3 -3 5
6 X1 3 1 1 0 0 -1 1 -3
Zj 18 6 6 0 0 -6 6
Zj-Cj 0 2 0 0 -6 M+6
Cj 6 4 0 0 0 -M
CB Basic XB X1 X2 S1 S2 S3 A1 Min
Variables (RHS) ratio
XB /Xk
0 s1 14 0 5/3 1 -2/3 0 0
0 s3 5 0 -1/3 0 1/3 1 -1
6 X1 8 1 2/3 0 1/3 0 0
Zj 48 6 4 0 2 0 0
Zj-Cj 0 0 0 2 0 M