0% found this document useful (0 votes)
8 views298 pages

Chap 1 Linear Programming Problem

Uploaded by

s1062230092
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
8 views298 pages

Chap 1 Linear Programming Problem

Uploaded by

s1062230092
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 298

Mathematical foundation for Computer Science -

Operation Research

Subject Orientation

By . Rupali Jadhav,TIMSCDR, Mumbai


MCA21: Mathematical foundation for Computer Science 2

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.

 OR is an application of scientific method, techniques & tools to

problem involving the operation of system so as to provide these in


control of operations with optimum solution to the problem

-Churchman , Acoff , Arnoff


Application areas of OR

 Finance – Budgeting & investments


• For cash flow analysis , long range capital requirement
 Purchasing , procurement & exploration
• Rules for buying , supplies & stable or varying prices
• Determination of quantities & timing of purchase
 Marketing:
• Product selection , timing, competitive action
• Number of sales man
• Advertising media with respect to cost and time
 Production management:

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

▪ Selection of suitable person on minimum salary


▪ Recruitment polices & assignment of jobs
Phases of operation research
 Operation research program passes through 6
different phases:
1. Formulating the problem
2. Constructing a mathematical model
3. Deriving solution from model
4. Testing model and its solution
5. Controlling the solution
6. Implementing the solution
1.Formulating the problem

 Components that holds the problem assume to be


Decision maker , objective

 To formulate the problem it is necessary to identify


these component
 Decision maker: is someone who has control over choice of
action to be performed

 Objective : it can be associated with each level and we


have to identify it on each level
 To formulate the model in appropriate form we have to
gather information by asking question:
 Who has to take decision?
 What are the objectives?
 What are the range of controlled variable?
 What are the uncontrolled variable that affect the possible
solution
 What are the restriction or constraints on the variable?
Decision variables:

 Decision variables: Decision variables are the unknowns


whose values are to be determined from the solution of the
problem.

 E.g. decision variables in the furniture manufacturing


problem are say the tables and chairs whose values or
actual units of production are to be found from the solution
of the problem.
Constraints:
 Constraints: A constraint represents the limitations imposed on the
values of decision variables in the solution.
 These limitations exist due to limited availability of resources as well
as the requirements of these resources in the production of each unit
of the decision variable.
 For example manufacturer of a table requires certain amount of
time in a certain department and the department works only for a
given period, (say 8 hours in a day for 5 days in a week).
 Thus, the constraints define the limits within which a solution to the
problem must be found.
Non-negativity restrictions:
 Non-negativity restrictions:
 The solution to the problem implies finding values of the decision
variables. These must be non-negative. As one cannot think of
manufacture of -4 tables or -6 chairs i.e. negative production.
 Hence, decision variable should assume either zero or positive
values. If we denote two decision variables as X1 and X2 then the
non negativity restriction is expressed as X1 > = 0; X2 >= 0.
Objective function:
 Objective function: A firms objectives are expressed as a function of
decision variables.

 The equation that represents the goal of either maximizing profit or


minimizing cost..



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.

Formulate the problem as a linear programming problem.


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.

Formulate the problem as a linear programming problem.


 Solution
Let we will required 2 variables x1, x2

x1 be the number of products of type A


x2 be the number of products of type B

Type of products (minutes)

machine Type A Type B Available time


G 1 1 6hr 40min=
6*60+40=400min
H 2 1 10hr=10*60=600min

Profit per unit 2 3


 Solution
Let
x1 be the number of products of type A
x2 be the number of products of type B

Type of products (minutes)

machine Type A (x1) Type B(x2) Max Available


time(<=)
G 1 1 400
H 2 1 600
Profit per unit 2 3

Maximize Z = 2 x1+3 x2 (objective function)


machine G is not available for more than 6 hours 40 minutes (400 minutes).
x1+ x2 ≤ 400 (first constraint)
Also, the machine H is available for 10 hours (600 minutes) only, therefore,
2x1 + x2 ≤ 600 (second constraint)
Since it is not possible to produce negative quantities
x1 ≥ 0 and x2 ≥ 0 (non-negative restrictions)
Hence
Maximize Z = 2 x1 + 3 x2-----objective function
Subject to
x1 + x2 ≤ 400 Constraints
2x1 + x2 ≤ 600
x1 ≥ 0 , x2 ≥ 0 ------non-negativity constraints
 Example 2
A company produces two products A and B which possess raw
materials 400 quintals and 450 labour hours.

It is known that 1 unit of product A requires 5 quintals of raw


materials and 10 man hours and yields a profit of Rs 45.

Product B requires 20 quintals of raw materials, 15 man hours

and yields a profit of Rs 80. Formulate the LPP.


 Example 2
A company produces two products A and B which possess raw
materials 400 quintals and 450 labour hours.
It is known that 1 unit of product A requires 5 quintals of raw
materials and 10 man hours and yields a profit of Rs 45.
Product B requires 20 quintals of raw materials, 15 man hours
and yields a profit of Rs 80. Formulate the LPP.
Solution:
x1 be the number of units of product A
x2 be the number of units of product B
Product A(x1) Product B(x2) Availability

Raw materials 5 20 400

Man hours 10 15 450

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

The firm must manufacture


Must 100 A’s but not more than 150 A’s. → x1>=100, x1<=150➔ 100<=x1<=150
200 B’s → x2 >=200
and 50 C’s type→ x3>=50,
 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

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

Max Z = 3x1 + 2x2 + 4x3


Subject to
Machine x→ 4x1 + 3x2 + 5x3 ≤ 2000
Machine y→ 2x1 + 2x2 + 4x3 ≤ 2500
A’s extra constraint→ 100 ≤ x1 ≤ 150
B’s extra constraint→ x2 ≥ 200
C’s extra constraint → x3 ≥ 50
x1,x2,x3>=0
 Example 4
A company owns 2 oil mills A and B which have different
production capacities for low, high and medium grade oil. The company
enters into a contract to supply oil to a firm every week with 12, 8, 24
barrels of each grade respectively. It costs the company Rs 1000 and
Rs 800 per day to run the mills A and B. On a day A produces 6, 2, 4
barrels of each grade and B produces 2, 2, 12 barrels of each grade.
Formulate an LPP to determine number of days per week each mill will
be operated in order to meet the contract economically.
Grade A(x1) B(x2) MIN REQUIREMENT

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

A company has 3 operational departments weaving, processing and


packing with the capacity to produce 3 different types of clothes that are
suiting, shirting and woollen yielding with the profit of Rs. 2, Rs. 4 and Rs.
3 per meters respectively. 1m suiting requires 3mins in weaving 2 mins in
processing and 1 min in packing. Similarly 1m of shirting requires 4 mins in
weaving 1 min in processing and 3 mins in packing while 1m of woollen
requires 3 mins in each department. In a week total run time of each
department is 60, 40 and 80 hours for weaving, processing and packing
department respectively. Formulate a LPP to find the product to maximize
the profit.
 Example 5
A company has 3 operational departments weaving, processing and packing
with the capacity to produce 3 different types of clothes that are suiting,
shirting and woolen yielding with the profit of Rs. 2, Rs. 4 and Rs. 3 per meters
respectively. 1m suiting requires 3mins in weaving 2 mins in processing and 1
min in packing. Similarly 1m of shirting requires 4 mins in weaving 1 min in
processing and 3 mins in packing while 1m of woolen requires 3 mins in each
department. In a week total run time of each department is 60, 40 and 80
hours for weaving, processing and packing department respectively. Formulate
a LPP to find the product to maximize the profit.
Solution
x1 be the number of units of suiting
x2 be the number of units of shirting
x3 be the number of units of woolen
x1 be the number of units of suiting
x2 be the number of units of shirting
x3 be the number of units of woollen
Zmax= 2x1+4x2+3x3
Weaving → 3x1+4x2+3x3<=60
Processing→ 2x1+x2+3x3<=40
Packing→x1+3x2+3x3<=80
x1,x2,x3>=0
Maximize Z = 2x1 + 4x2 + 3x3
Subject to
3x1 + 4x2 + 3x3 ≤ 60
2x1 + 1x2 + 3x3 ≤ 40
x1 + 3x2 + 3x3 ≤ 80
x1≥0, x2 ≥0, x3≥0
 Example 6
ABC Company produces both interior and exterior paints from
2 raw materials m1 and m2. The following table produces basic data
of problem.

A market survey indicates that maximum daily demand for


interior paint is 2 tons. Formulate LPP to determine the best product mix
of interior and exterior paints that maximizes the daily total profit
 Solution
Let
x1 be the number of units of exterior paint
x2 be the number of units of interior paint
Maximize Z = 5x1 + 4x2
Subject to
6x1 + 4x2 ≤ 24
x1 + 2x2 ≤ 6
x2≤ 2
x1≥0, x2 ≥0
 Example 7
A company produces 2 types of hats. Each hat of the I type
requires twice as much as labour time as the II type. The company can
produce a total of 500 hats a day.
The market limits daily sales of I and II types to 150 and 250 hats.
Assuming that the profit per hat are Rs.8 for type I and Rs. 5 for type II.
Formulate a LPP models in order to determine the number of hats
to be produced of each type so as to maximize the profit.
 Solution
Let x1 be the number of hats produced by I type
Let x2 be the number of hats produced by II type
Maximize Z = 8x1 + 5x2
Subject to
2x1 + x2 ≤ 500 (labour time)
x1 ≤ 150
x2 ≤ 250
x1≥0, x2 ≥0
Methods Of Finding Solution:
Graphical Method
Simplex Method

by Rupali Jadhav, TIMSCDR,Mumbai


Solving an LP problem involves:

1. Selection of appropriate method of solution and

2. Then obtain a solution to the problem with the help of selected

method

3. Test whether this solution is optimal.


 The problem can be solved by using:

1. Graphical method:
This method can be used if there are only two decision
variables in the LPP.

2. Simplex method:

This method is useful in solving LP problems with two or


more than two decision variables.
Graphical method of solution:

 This method can be used in case where LPP has only two

decision variables.

 But there is no restriction on the number of constraints.

 The method uses the graphical presentation with two axes.

 The method cannot be used if the number of decision

variables is more than three. In such a case we have to use a

non graphical method to obtain a solution.


Graphical method of solution Continue……

 The constraints can be

 greater than equal to (>=)→above part

 less than equal to or (<=)→below part

 strict equality type. (=)→on the line

 There is also a non-negativity restriction It implies that the


solution of the problem lies in the first quadrant of the graph.
All these relations are linear.
Steps For Finding solution of LPP using
Graphical method

1. Consider inequality constraints as a equation. Find the coordinate


of point to be plot which represent straight-line for a given
constraints
2. Plot a each constraints as a straight line
3. Mark the region.
1. If the constraints is <= then the region below the line is shaded.
2. If the constraints is >= then the region above the line is shaded.
The common region thus obtained is called feasible region
4. Find coordinate of points on feasible region & find the maximum or
minimum value of Z
5. Find optimal solution for problem as
1. For maximization Problem: points which gives maximum value of Z
2. For minimization Problem: points which gives minimum value of Z
Definitions

1. Feasible solution is a solution for which all constraints are satisfied.

2. Feasible region is a collection of all feasible solutions.

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,

whereas it is the smallest value if the objective function is to be minimized.


Definitions

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

Max Z = 80x1 + 55x2


Subject to
4x1+ 2x2 ≤ 40
2x1 + 4x2 ≤ 32
x1 ≥ 0 , x2 ≥ 0 solve using graphical method.
Solution
The first constraint 4x1+ 2 x2 ≤ 40, written in a form of equation
4x1+ 2 x2 = 40
Put x1 =0, then x2 = 20
Put x2 =0, then x1 = 10
The coordinates are (0, 20) and (10, 0)

The second constraint 2x1 + 4x2 ≤ 32, written in a form of equation


2x1 + 4x2 =32
Put x1 =0, then x2 = 8
Put x2 =0, then x1 = 16
The coordinates are (0, 8) and (16, 0)
For B→ 2x1+4x2=32
8x1+4x2=80
- - -
------------------------------------
-6x1= - 48 x1= 8

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

A (0, 8) 80(0) + 55(8) = 440


B (8, 4) 80(8) + 55(4) = 860
C (10, 0) 80(10) + 55(0) = 800
o(0,0) 80(0)+55(0)=0
corner points Max Z = 80x1 + 55x2

A (0, 8) 80(0) + 55(8) = 440


B (8, 4) 80(8) + 55(4) = 860
C (10, 0) 80(10) + 55(0) = 800
O(0,0) 80(0)+55(0)=0

The maximum value is


obtained at the point B
Max Z = 860
x1 = 8, x2 = 4
Example : 4
Zmax=2x+4y
2x+14y <=28
5x+3y<=30
x,y>=0
2x+14y =28→L1
X=0 14y=28 y=2
Y=0 2x=28 x=14 (14,2)
5x+3y=30→L2
X=0 3 y=30 y=10
Y=0 5x=30 x= 6 (6,10)
A B

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

Minimize Z = 10x1 + 4x2


Subject to
3x1 + 2x2 ≥ 60 L1
7x1 + 2x2 ≥ 84 L2
3x1 +6x2 ≥ 72 L3
x1 ≥ 0 , x2 ≥ 0

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

Minimize Z = 10x1 + 4x2


Subject to
3x1 + 2x2 ≥ 60
7x1 + 2x2 ≥ 84
3x1 +6x2 ≥ 72
x1 ≥ 0 , x2 ≥ 0

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)

 The third constraint 3x1 +6x2 ≥ 72,


3x1 +6x2 = 72
Put x1 =0, then x2 = 12
Put x2 =0, then x1 = 24
The coordinates are (0, 12) and (24, 0)
All constraints
are >= type so
shaded region is
outside part of
every constraints

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

A (0, 42) 10(0) + 4(42) = 168


B (6, 21) 10(6) + 4(21) = 144
C (18, 3) 10(18) + 4(3) = 192
D (24, 0) 10(24) + 4(0) = 240
corner points Min Z = = 10x1 + 4x2

A (0, 42) 10(0) + 4(42) = 168


B (6, 21) 10(6) + 4(21) = 144
C (18, 3) 10(18) + 4(3) = 192
D (24, 0) 10(24) + 4(0) = 240

The minimum value


is obtained at the
point B
Min Z = 144
x1 = 6, x2 =21
Examples 6

 Example - designing a diet

A dietitian wants to design a breakfast menu for certain hospital


patients . The menu is to include two items A and B .
Suppose that each ounce of A provides 2 units of vitamin C and 2
units of iron and each ounce of B provides 1 unit of vitamin C and 2 units of
iron.
Suppose the cost of A is 4 Rs/ounce and the cost of B is 3Rs/ounce.

If the breakfast menu must provide at least 8 units of vitamin C and


10 units of iron,
how many ounces of each item should be provided in order to meet
he iron and vitamin C requirements for the least cost ? What will this
breakfast cost? Formulate LPP model and find solution using graphical
method
Solution:
Vitamin C Iron Cost
A 2 2 4
B 1 2 3
At Least 8 10

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

A small business makes 3-speed and 10-speed bicycles at two

different factories. Factory A produces 16 3-speed and 20 10-speed

bikes in one day while factory B produces 12 3-speed and 20 10-speed

bikes daily. It costs 1000/day to operate factory A and 800/day to

operate factory B. An order for 96 3-speed bikes and 140 10-speed

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

 x = number of days factory A is operated


 y = number of days factory B is operated

3-speed constraint: 16x + 12y >= 96—L1


10-speed constraint: 20x + 20y >= 140—L2
x >= 0, y >= 0

Minimize: C = 1000x + 800y


16x + 12y = 96
Put x =0, then y= 8
Put y =0, then x = 6
3-speed The coordinates are (0, 8) and (6, 0)
20x + 20y = 140
Put x =0, then y= 7
Put y =0, then x = 7
3-speed The coordinates are (0, 7) and (7, 0)

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

3-speed A (0,8) 6400


Our requirements is for
B (7,0) 7000 the minimum cost
C(3,4) 6200
As Objective function is
for minimization
C

10-speed
B
corner pts C = 1000x + 800y
A

3-speed A (0,8) 6400


B (7,0) 7000
C(3,4) 6200
So Solution is at C(3,4)
C Zmin= 6200
x=3 , y= 4

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

profit if a pair of downhill skis yields a profit of 10 and a pair of cross-country

skis yields a profit of 8 .


Solution:

Cutting shaping Finishing profit


downhill 2 1 3 10

Cross 2 2 1 8
country
availability 140 120 150

x = pairs of downhill skis

y = pairs of cross country skis

Zmax= 10x+8y

2x+2y<=140 x+2y<=120 3x+y<=150 x,y>=0


Solution:

Cutting shaping Finishing profit


downhill 2 1 3 10

Cross 2 2 1 8
country
availability 140 120 150

x = pairs of downhill skis


y = pairs of cross country skis
Zmax = 10x + 8y
cutting: 2x + 2y <= 140—L1
shaping: x + 2y <= 120—L2
finishing: 3x + y <= 150—L3
x >= 0 , y >=0
2x + 2y <= 140—L1

Put x=0 y=70


Put y=0 x=70
shaping: x + 2y <= 120—L2
Put=0 y= 60
Put y=0 x=120
finishing: 3x + y <= 150—L3
Put x=0 y=150
Put y=0 x=50
finishing

cutting

shaping
finishing

cutting

B C

shaping
D

A E
For B 2x + 2y = 140—L1
x + 2y <= 120—L2

- - -

-------------------------------------------

x= 20 put in L1 40 + 2y =140 2y= 100 y=50

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

Solution: at c( 4,0) Zmax=12


Example:
 Zmax=2x1+10x2
2x1+5x2<=16
6x1<=30
X1,x2>=0

Solution: at A( 0,3.2) Zmax=32


SPECIAL CASES IN LPP

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.

➢ Unbounded solution results in a maximization problem all


constraints are of greater than or equal to type. In such a
situation there is no upper limit on feasible region.

➢ An unbounded solution occurs in a minimization problem if


all constraints are of less than or equal to type. In such a
situation there is no lower limit on feasible region.
Zmax=3x+2y
x – y >=1-----------L1
x + y >=3----------L2

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 :

➢ A constraint, which does not affect the feasible region, is called a


redundant constraint.

➢ Such a constraint is not necessary for the solution of the problem. It


can therefore be omitted while formulating the problem.

➢ This will save the computation time. In many LP problems,


redundant constraints are not recognized as being redundant until
the problem is solved. However , redundant constraints do not
cause any difficulty.
Determine solution space graphically for the following inequality
X1 + x2 <=4 ------------------L1
4x1+3x2<=12----------------L2
-x1+x2>=1--------------------L3
X1+x2<=6--------------------L4
x1.,x2>=0
Which constraints are redundant ? Reduce system to smallest number of
constraints that will define same solution space find solution of
problem
Zmax=6x1+ 2x2 subject to above condition.
Determine solution space graphically for the following inequality
X1 + x2 <=4 ------------------L1 (4,4)
4x1+3x2<=12----------------L2 (3,4)
-x1+x2>=1--------------------L3 (-1,-1)
X1+x2<=6--------------------L4 (6,6)
x1.,x2>=0
Which constraints are redundant ? Reduce system to smallest number of
constraints that will define same solution space find solution of
problem
Zmax=6x1+ 2x2 subject to above condition.
x1 x2
X1+x2=4 0 4
1 3
4x1+3x2=12 0 4
3 0
-x1+x2=1 0 1
3 4
X1+x2=6 0 6
2 4
L3

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

corner pts Zmax=6x1+ 2x2


L3
A
A (0,4) 8
B (9/7,16/7 ) 86/7=12.28
B
C(0, 1) 2
C

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)

Max Z = 24, which is achieved


at both B and C corner points. It
can be achieved not only at B
and C but every point between
B and C. Hence problem has
multiple optimal solutions.
corner pt. Max Z = 4x1 + 3x2

A(0,6) 4(0) + 3(6) = 18


B(1.5,6) 4(1.5) + 3(6) = 24
C(4.5,2) 4(4.5) + 3(2) = 24
D(4.5,0) 4(4.5) + 3(0) = 18

Max Z = 24, which is achieved


at both B and C corner points. It
can be achieved not only at B
and C but every point between
B and C. Hence problem has
multiple optimal solutions.
General Linear Programming Problem (GLPP)

Maximize / Minimize Z = c1x1 + c2x2 + c3x3 +……………..+ cnxn


Subject to constraints
a11x1 + a12x2 + …..........+a1nxn (≤ or ≥) b1
a21x1 + a22x2 + ………..+a2nxn (≤ or ≥) b2
.
.
.
am1x1 + am2x2 + ……….+amnxn (≤ or ≥) bm
and
x1 ≥ 0, x2 ≥ 0,…, xn ≥ 0
Where constraints may be in the form of any inequality (≤ or ≥) or
even in the form of an equation (=) and finally satisfy the non-
negativity restrictions.
Steps to convert GLPP to SLPP (Standard LPP)

Step 1 – Write the objective function in the maximization form.


If the given objective function is of minimization form then
multiply throughout by -1 and write Max z ‫=׳‬Min (-z)
Step 2 – Convert all inequalities as equations.
 If an equality of ‘≤’ appears then by adding a variable called
Slack variable. We can convert it to an equation. For example
x1 +2x2 ≤ 12, we can write as
x1 +2x2 + s1 = 12.
 If the constraint is of ‘≥’ type, we subtract a variable called
Surplus variable and convert it to an equation. For example
2x1 +x2 ≥ 15
2x1 +x2 – s2 = 15
Step 3 – The right side element of each constraint should be
made non-negative
2x1 +x2 – s2 = -15
-2x1 - x2 + s2 = 15 (That is multiplying throughout by -1)
Step 4 – All variables must have non-negative values.
A variable which is unrestricted in sign (that is
positive , negative , zero ) is equivalent to the
difference between two non negative variables .
For example: x1 +x2 ≤ 3
x1 > 0, x2 is unrestricted in sign
Then x2 is written as x2 = x’2 –x”2 where x’2 ,x”2 >=0
Therefore the inequality takes the form of equation as
x1 + (x’2 –x”2 )+s1 = 3
Methods Of Finding Solution:
Graphical Method
Simplex Method

by Rupali Jadhav, TIMSCDR,Mumbai


Simplex method
 Simplex method is an iterative method for solving Linear problem
for obtaining optimal solution.

 It works by preparing series of table called simplex table , the


last of which indicates the optimal solution of given problem.

 In graphical method we had seen the procedure to compute


different corner points of feasible region

 Solution found at each iteration of simplex table represent such


corner points.
TERMINOLOGY OF LINEAR PROGRAMMING:

 Variables used to convert inequality into equality:


 Slack variable:
 A variable which is used to convert less than or equal to( )
constraints into equality constraints.
 It is added to the left hand side of the constraints.

 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

than or equal to ( ) constraints into equality constraints.


TERMINOLOGY OF LPP continue….

 cj row : It is the row in simplex table which contain the


coefficient of variable in objective function.

 zj row : It is the row in simplex table whose element represent


increase or decrease of the value of objective function if one
unit of jth variable is brought into the solution

 zj - cj row : It is the row in simplex table which represent net


per unit contribution of jth variable in objective function, if
variable is brought into new basic solution
TERMINOLOGY OF LPP continue….

 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

1. If objective function of given problem is for minimization then


convert it to maximization multiplying by -1

2. Check whether all bi( i =1,2,3….) are positive if any one of bi is


negative then multiply both side of equation by -1 so that all bi

to be positive.

3. Express the problem in standard form by introducing slack or


surplus variable to convert inequality constraints into equality.

4. Obtain initial basic feasible solution .


5. compute value of zj – cj & Examine the sign of zj – cj
a. If all zj – cj >=0 then initial basic feasible solution
is an optimum solution
b. If at least one of zj – cj < 0 ( i . e. negative ) goto
step 6

c. If corresponding to any negative zj – cj , all


elements of the ratio column are negative or zero,
then the solution under test will be unbounded.
6. (To find entering variable i.e. Key column) :
If there are more than one negative zj – cj choose most
negative of them . This will gives entering variable. If there are
more than one variable having same most negative then any
one variable can be selected arbitrarily as the entering
variable.
7. Finding Leaving variable ( i.e. key row) :
determine value of ration.
ratio= ( XB / Corresponding key column element)
select minimum positive value from ration as an key row.
The element at the intersection of key column & key row is
called key element
8. Construction of next improvement of table:
Next improvement of table can be computed by dropping
leaving variable & introducing entering variable.
Make key element as 1 by dividing entire key row with
key element.
Find the new values for remaining row using
Old value- ( intersecting element * new value )
9. Goto step 5 and repeat the procedure until either optimum
solution is obtained or there is an indication of unbounded
solution.
Simplex table creation: ZMAX= 3x1+4x2

Make entry as Coefficient of variable in


cj objective function

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

Zj-cj Select most negative value as key column


Solved using Simplex Method

Maximize Z = 3x1 + 2x2


Subject to
x1 + x2 ≤ 4
x1 – x2 ≤ 2
and x1 ≥ 0, x2 ≥ 0
Solution
x1+x2+s1=4
x1-x2+s2=2
Zmax=3x1+2x2+0s1+0s2
x1,x2,s1,s2>=0
Solved using Simplex Method

Maximize Z = 3x1 + 2x2


Subject to
x1 + x2 ≤ 4
x1 – x2 ≤ 2
and x1 ≥ 0, x2 ≥ 0
Solution
 Write the given GLPP in the form of SLPP
x1 + x2+ s1= 4
x1 – x2 + s2= 2

Maximize Z = 3x1 + 2x2 + 0s1 + 0s2

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

 Construct the starting simplex table using the notations


Obj function coefficient 3 2 0 0
Cj
CB Basic XB X1 X2 S1 S2 Min
Variables (RHS) entering ratio
var
XB /Xk
0 4 1 1 1 0 =4/1=4
constraint s1
0 S2 2 -1 0 1 =2/1=2 key
Outgoing var row(min
constraint +ve)
Key
element
=(0X4+0 =(0x1+0 =(0X1+0 =(0x1 =(0x0+0x1
Zj
x2)=0 x1)=0 X(-1))=0 +0X0+ )=0
=0
0-3=-3 0-2=-2 0-0=0 0-0=0
Zj-Cj
key
column
 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
 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

Zj-Cj =3-3=0 -3-2=-5 0-0=0 3-0=3


KC
 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
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

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 ratio
Outgoing Variables (RHS) Key Element XB /Xk
variable

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

Solution is : Zmax=11, X1= 3 , X2 = 1


Example 2:

Zmax = 3x1 +4x2


Subject to :
2x1 + x2 <=6
2x1 + 3x2 <= 9
x1 , x2 >=0
2x1 + x2 +s1 =6 2x1 + 3x2 +s2= 9 Zmax= 3x1 +4x2 +0s1+0s2

Obj function coefficient 3 4 0 0


Cj
CB Basic XB X1 X2 S1 S2 Min
Variables (RHS) EV ratio
XB /Xk

Zj

Zj-Cj
2x1 + x2 +s1 =6
2x1 + 3x2 +s2= 9
Zmax= 3x1 +4x2 +0s1+0s2

Obj function coefficient 3 4 0 0


Cj
CB Basic XB X1 X2 S1 S2 Min
Variables (RHS) EV ratio
XB /Xk
0 S1 6 2 1 IE 1 0 6/1=6
0 S2 OV 9 2 0 1 9/3=3
3
KE KR

0 0 0 0 0
Zj

-3 -4 0 0
Zj-Cj
KC
Obj function 3 4 0 0
coefficient Cj

CB Basic XB X1 X2 S1 S2 Min For S1:


Variables (RHS EV ratio
Old value-IE*new value
) XB
6-1*3=3
/Xk 2-1*2/3=(6-2)/3=4/3
0 S1 3 0 1 -1/3 3/(4/3)=9 1-1*1=0
4/3
/4 KR 1-1*0=1
OV KE
0-1*1/3=-1/3
4 X2 3 2/3 1 0 1/3 3/(2/3)=9
New values IE /2

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:

Zmax = 3x1 +2x2 + 5x3


Subject to :
x1 + 2x2 +x3 <= 430
3x1 + 2x3 <= 460
x1 + 4x2 <= 420
x1 , x2 , x3 >=0
Solution:
Zmax = 3x1 +2x2 + 5x3 + 0s1+0s2+0s3
Subject to :
x1 + 2x2 +x3 +s1= 430
3x1 + 2x3 +s2= 460
x1 + 4x2 +s3 = 420
x1 , x2 , x3 ,s1,s2,s3>=0
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
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

Cj 3 2 5 0 0 0 S3=> old value-IE * new value


420-0*230=420
CB Basic XB X1 X2 x3 S1 S2 s3 Min 1-0*3/2=1
Variabl (RHS) EV ratio 4-0*0=4
es XB /Xk 0-0*1=0
0-0*0=0
0 S1 200 -1/2 0 1 -1/2 0 100
OV
2 0-0*1/2=0
1-0*0=1
KE
KR
For s1=>
 430-1*230=200
5 X3 230 3/2 0 1 0 1/2 0
∞ 1-1*3/2=-1/2
2-1*0=2
NR IE
1-1*1=0
s3 420 1 4 0 0 0 1
0 105 1-1*0=1
0-1*1/2=-1/2
IE
0-1*0=0
Zj 1150 15/2 0 5 0 5/2 0

Zj-Cj 9/2 -2 0 0 5/2 0


KC
 -1 1 -1
--------* ---- = ------
2 2 4

(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

Solution is : Zmax=5, X1= 3/2 , X2 = 2


Example 5:

Zmin = x1 -3x2 + 2x3


Subject to :
3x1 - x2 +3x3 <= 7
-2x1 + 4x2 <= 12
-4x1 + 3x2 +8x3 <= 10
x1 , x2 , x3 >=0
Solution:
Zmin = x1 -3x2 + 2x3
Zmax=-Zmin= -x1 +3x2 - 2x3
Subject to :
3x1 - x2 +3x3 +s1= 7
-2x1 + 4x2 +s2= 12
-4x1 + 3x2 +8x3 +s3= 10
x1 , x2 , x3 ,s1,s2,s3 >=0
Zmax=-x1+3x2-2x3+0s1+0s2+0s3
3x1 - x2 +3x3 +s1= 7
-2x1 + 4x2 +s2= 12
-4x1 + 3x2 +8x3 +s3= 10 Zmax=-x1+3x2-2x3+0s1+0s2+0s3

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

Cj -1 3 -2 0 0 0 S1=> old value-IE * new value


7+3=10
CB Basic XB X1 X2 x3 S1 S2 s3 Min 3-1/2=6/2-1/2=5/2
Variabl (RHS) EV ratio -1+1=0
es XB /Xk 3+0=3
1+0=1
0 S1 10 5/2 0 3 1 1/4 0 4 0+1/4=1/4
OV KE
0+0=0
KR
3 X2 3 -1/2 1 0 0 1/4 0
- For s3=>
10-3*3=1
NR IE
-4+3*1/2=-5/2
s3 1 -5/2 0 8 0 -3/4 1
0 - 3-3*1=0
8-3*0=8
IE
0-3*0=0
Zj 9 -3/2 3 0 0 3/4 0 0-3*1/4=-3/4
1-3*0=1
Zj-Cj -1/2 0 2 0 3/4 0
KC
3x1 - x2 +3x3 +s1= 7
-2x1 + 4x2 +s2= 12
-4x1 + 3x2 +8x3 +s3= 10 Zmax=-x1+3x2-2x3+0s1+0s2+0s3

Cj -1 3 -2 0 0 0 x2=> old value-IE * new value


3+1/2*4=5
CB Basic XB X1 X2 x3 S1 S2 s3 Min -1/2+1/2*1=0
Variabl (RHS) ratio 1+1/2*0=1
es XB /Xk 0+1/2*6/5=3/5
0+1/2*2/5=1/5
-1 X1 4 1 0 6/5 2/5 1/10 0 ¼+1/2*1/10=(5+1)/20
NR =6/20=3/10
3 X2 5 0 1 3/5 1/5 3/10 0 0+1/2*0=0
NR
For s3=>
s3 11 0 0 11 1 -1/2 1
0 1+5/2*4=11
-5/2+5/2*1=0
0+5/2*0=0
Zj 11 -1 3 3/5 1/5 4/5 0 8+5/2*6/5=11
0+5/2*2/5=1
Zj-Cj 0 0 13/5 1/5 4/5 0 -3/4+5/2*1/10
=-3/4+1/4=-1/2
1+5/2*0=1
Zmax=11 Zmin=-11
x1= 4 x2=5 x3=0
Solution:
Zmin = x1 -3x2 + 2x3
Zmax=-Zmin= -x1 +3x2 - 2x3
Subject to :
3x1 - x2 +3x3 +s1= 7
-2x1 + 4x2 +s2= 12
-4x1 + 3x2 +8x3 +s3= 10
x1 , x2 , x3 ,s1,s2,s3 >=0
Zmax=-x1+3x2-2x3+0s1+0s2+0s3
Example 6:

Zmax = 3x1 +5x2 + 4x3


Subject to :
2x1 + 3x2 <= 8
2x1 + 5x3 <= 10
3x1 + 2x2 +4x3 <= 15
x1 , x2 , x3 >=0
Extra examples
Zmax=5x+7y
X+y<=4
3x-8y<=24
10x+7y<=35
x , y > =0
Extra examples
Zmax=3x5x2
3x1+2x2<=18
x1<=4
X2<=6
X1,x2>=0
Methods Of Finding Solution:
Graphical Method
Simplex Method- Big M Method

by Rupali Jadhav, TIMSCDR,Mumbai


Artificial variable :
Two phase method , Big M method

▪ Artificial variable:

▪ A variable which is added to convert equal to (=) & greater than or


equal to ( ) constraints into equality constraints.

▪ A LPP involving artificial variable can be solved using two methods:

1. Big M method

2. Two phase method


Big M method (Charne’s Penalty Method)

1. Express the problem in standard form.


2. Add artificial variable to the left of each constraints of type ≥ or = .
assign very large price to these variable in objective function. It can
be denoted by M .

3. In Objective function add artificial variable with coefficient –M for


maximization problems +M for minimizing problem, where M > 0.

4. Solve LPP by simplex method.


Solve using Big M method
Example 1
Z Min = 2x1 + x2
Subject to
3x1 + x2 = 3
4x1 + 3x2 ≥ 6
x1 + 2x2 ≤ 4
and x1 ≥ 0, x2 ≥ 0
Note: slack and surplus get added with coefficient 0 and
artificial added with -M

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

Zj -3M-6M= -3M-4M -M-3M = -4M M 0 -M -M


-9M =-7M

Zj-Cj -7M+2 -4M+1 M 0 -M+M -M+M =


=0 0
Key column
For A2 For 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-4*1/3=-4/3 0-1/3=-1/3

1-4*0=1 0-0=0
Cj
-2 -1 0 0 -M -M
CB Basic XB X1 X2 S1 S2 A1 A2 Min ratio
Variables (RHS) EV XB /Xk

-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

Zj-Cj 0 -5M/3+1/3 M 0 7M/3+2/3 0

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

-2 X1 3/5 1 0 1/5 0 3/5 -1/5

-1 X2 6/5 0 1 -3/5 0 -4/5 3/5


NR

0 s2 1 0 0 1 1 1 -1
Zj -12/5 -2 -1 1/5 0 -2/5 -1/5

Zj-Cj 0 0 1/5 0 M-2/5 M-1/5

All Zj-Cj>=0 zmax= -12/5


X1=3/5 x2= 6/5
Example 2 :
Zmin=2x1+8x2
5x1+10x2=150
X1<=20
X2>=14
X1,x2>=0
May – 07, Dec- 08, Dec-09
Note: <= → add slack
= → add Artificial
>= subtract surplus and add Artificial
Objective function should be for Zmax

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

Solution: Zmin= - Zmax = 116, x1=2 , x2= 14


Solve using Big M method
Example 3 :
Zmin=4x1+x2
3x1+x2=3
4X1+3x2>=6
X1+2X2<=4
X1,x2>=0

Solution: Zmin= - Zmax = 17/5, x1=2/5, x2=9/5


Solution:
Zmin=4x1+x2
zmax= -zmin= -4x1-x2
3x1+x2+A1=3
4X1+3x2-S1+A2=6
X1+2X2+S2=4
X1,x2,S1,S2,A1,A2>=0

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

Zj -9M -7M -4M M 0 -M -M


Zj-Cj -7M+4 -4M+1 M 0 0 0

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 Key row
0 S2 3 0 5/3 IE 0 1 -1/3 0 9/5
=1.8
Zj -2M-4 -4 -5M/3-4/3 M 0 4M/3-4/3 -M

Zj-Cj 0 -5M/3-1/3 M 0 7M/3-4/3 0

Key column
 X1: OLD VALUE-IE*NEW VALUE  S2: OLD VALUE-IE*NEW VALUE

1-1/3*6/5=3/5 •3-5/3*6/5=1

1-1/3*0=1 •0-5/3*0=0

1/3 -1/3*1=0 •5/3 -5/3*1=0
 •0+5/3*3/5=1
0+1/3*3/5=1/5
•1-5/3*0=1

0-1/3*0=0 •-1/3+5/3*4/5=1

1/3+1/3*4/5=3/5 •0-5/3*3/5=-1

0-1/3*3/5=-1/5
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 EV ratio
XB
/Xk
-4 X1 3/5 1 0 1/5 IE 0 3/5 -1/5 3
-1 X2 NR 6/5 0 1 -3/5 IE 0 -4/5 3/5 -
0 S2 OV 1 0 0 1 1 -1 1
1KE
Zj -18/5 -4 -1 -1/5 0 -8/5 1/5 Key row
Zj-Cj 0 0 -1/5 0 M-8/5 M+1/
5

Key column
 X1: OLD VALUE-IE*NEW VALUE  X2: OLD VALUE-IE*NEW VALUE

3/5-1/5*1=2/5

6/5 +3/5*1=9/5
1-1/5*0=1

0 +3/5*0=0
0-1/5*0=0

1 +3/5*0=1
1/5 -1/5*1=0

-3/5 +3/5*1=0
0-1/5*1=-1/5

0 +3/5*1=3/5
3/5-1/5*1=2/5

-4/5 +3/5*1=-1/5
-1/5+1/5*1=0
3/5 -3/5*1=0
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 EV ratio
XB
/Xk
-4 X1 2/5 1 0 0 -1/5 2/5 0
-1 X2 9/5 0 1 0 3/5 -1/5 0
0 S1 1 0 0 1 1 1 -1
NR
Zj -17/5 -4 -1 0 1/5 -7/5 0

Zj-Cj 0 0 0 1/5 M-7/5 M

SOLUTION: X1=2/5 X2= 9/5 ZMAX= - 17/5 ZMIN=17/5


Solve using Big M method
Example 4 :
Zmax=4x1+5x2-3x3
x1+x2+x3=10
X1-x2>=1
2X1+3X2+x3<=40
X1,x2,x3 >=0
May – 10

Solution: Zmax = 89/2, x1=11/2, x2=9/2 x3=0


Zmax=4x1+5x2-3x3+0S1+0S2-MA1-MA2
x1+x2+x3+A1=10
X1-x2-S1+A2=1
2X1+3X2+x3+S2=40
X1,x2,x3 ,S1,S2,A1,A2>=0
Zmax=4x1+5x2-3x3+0S1+0S2-MA1-MA2
x1+x2+x3+A1=10
X1-x2-S1+A2=1
2X1+3X2+x3+S2=40

Cj 4 5 -3 0 0 -M -M
CB Basic XB X1 X2 X3 S1 S2 A1 A2 Min
Variables (RHS) EV ratio
XB
/Xk
-M A1 10 1 IE 1 1 0 0 1 0 10
-M A2 1 -1 0 -1 0 0 1 1
1 KR
OV KE
KE
0 S2 40 2 IE 3 1 0 1 0 0 20

Zj -11M -2M 0 -M M 0 -M -M

Zj-Cj -2M-4 -5 -M+3 M 0 0 0

KC
 FOR A1  FOR S2

10-1*1=9 40-2*1=38

1 -1*1=0 2 -2*1=0

1+1*1=2 3+2*1=5

1-1*0=1 1-2*0=1

0+1*1=1 0+2*1=2

0-1*0=0 1-2*0=1

1-1*0=1 0-2*0=0

0-1*1=-1 0-2*1=-2
Zmax=4x1+5x2-3x3+0S1+0S2-MA1-MA2
x1+x2+x3+A1=10
X1-x2-S1+A2=1
2X1+3X2+x3+S2=40

Cj 4 5 -3 0 0 -M -M
CB Basic XB X1 X2 X3 S1 S2 A1 A2 Min
Variables (RHS) EV EV ratio
XB
/Xk

-M A1 OV 9 0 2 KE 1 1 0 1 -1 4.5
4 1 1 -1 IE 0 -1 0 0 1 - KR
X1 NR

0 S2 38 0 5 IE 1 2 1 0 -2 7.6

Zj -9M+4 4 -2M-4 -M -M-4 0 -M M+4

Zj-Cj 0 -2M-9 -M+3 -M-4 0 0 2M+4

KC
 FOR X1  FOR S2

1+9/2=11/2 38 -5*9/2=31/2

1+0=1 0 -5*0=0

-1+1=0 5 -5*1=0

0+1/2=1/2 1 -5*1/2=-3/2

-1+1/2=-1/2 2 -5*1/2=-1/2

0+0=0 1 -5*0=1

0+1/2=1/2 0 -5*1/2=-5/2

1-1/2=1/2 -2 +5*1/2=1/2
Zmax=4x1+5x2-3x3+0S1+0S2-MA1-MA2
x1+x2+x3+A1=10
X1-x2-S1+A2=1
2X1+3X2+x3+S2=40

Cj 4 5 -3 0 0 -M -M
CB Basic XB X1 X2 X3 S1 S2 A1 A2 Min
Variables (RHS) EV EV ratio
XB
/Xk

5 X2 NR 9/2 0 1 1/2 1/2 0 1/2 -1/2

4 11/2 1 0 1/2 -1/2 0 1/2 1/2


X1

0 S2 31/2 0 0 -3/2 -1/5 1 -5/2 1/2

Zj 89/2 4 5 9/2 1/2 0 9/2 -1/2

Zj-Cj 0 0 15/2 1/2 0 M+9/2 M-1/2

Zmax= 89/2 x1= 11/2 x2= 9/2 x3=0


Example 5 :
Zmin=4x1+x2
3x1+4x2>=20
X1+5x2>=15
X1,x2>=0
Solution
Zmin=4x1+x2
Zmax=-zmin=-4x1-x2+0S1+0S2-MA1-MA2

3x1+4x2-s1+A1=20
X1+5x2-S2+A2=15
X1,x2,S1S2,A1,A2>=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

Zj-Cj -4M+4 -9M+1 M M 0 0


KC
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 EV ratio
XB
/Xk

-M A1 OV 8 11/5 KE 0 -1 4/5 1 -4/5 40/11


KR
-1 X2 NR 3 1/5 IE 1 0 -1/5 0 1/5 15

Zj -8M-3 -11M/5-1/5 -1 M -4M/5+1/5 -M 4M/5-


1/5

Zj-Cj -11M/5-19/5 0 M -4M/5+1/5 0 9M/5-


KC 1/5
Example 6 :
Zmax=3x1+2x2
2x1+x2<=1
3X1+4x2>=4
X1,x2>=0
Methods Of Finding Solution:
Graphical Method
Simplex Method- Two Phase Method

by Rupali Jadhav, TIMSCDR,Mumbai


Two phase method

It perform computation in two phases:


1. Phase 1:
find initial basic feasible solution .
check the value of artificial variable . If it become
zero then eliminate artificial variable from
simplex table
2. Phase 2:
It is used to generate an optimal solution
Two phase method ………….

It perform computation in two phases:


➢ Steps for Phase 1:
1. In objective function assign cost -1 to every artificial variable and
zero to all other variable.
2. convert objective function from minimization to maximization as
max(z*) = - min(z)
3. Solve the problem using simplex method until any of following
condition arise :
a. Max z* < 0 & at least one artificial variable appears in the
optimum basis at positive level.
In this case given LPP does not posses any feasible solution.
b. Max z* = 0 & at least one artificial variable appears in the
optimum basis at zero level.
Go to phase II
a. Max z* = 0 & no artificial variable appears in the optimum
basis
Go to phase II
Two phase method ………….

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

Zj-Cj -13/7 0 1 -1/7 0 8/7


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
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

-1 21/13 1 0 -7/13 1/13


x1
-1 10/13 0 1 1/13 -2/13
x2
Zj -31/13 -1 -1 6/13 1/13

Zj-Cj 0 1 6/13 1/13

Since all Δj ≥ 0, optimal basic feasible solution is obtained


Therefore the solution is Max Z = -31/13 , Zmin= 31/13
x1 = 21/13 , x2 = 10/13
Solve using two phase method
 Example 2:

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

Phase I : Zmax= 0x1-0x2+0s1+0s2-A1

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
2x1+x2-s1+A1=2
x1+3x2+s2=2

Phase I : Zmax= 0x1-0x2+0s1+0s2-A1

Cj 0 0 0 0 -1

CB Basic XB X1 X2 S1 S2 A1 Min FOR S2 :


Variables (RHS) ratio 2 -1*1=1
XB /Xk 1 -1*1=0
3 -1*1/2= 5/2
0 +1*1/2= 1/2
1 -1*0=1
0 X1 1 1 1/2 - 0 1/2 0 -1*1/2=-1/2
NR 1/2
0 S2 1 0 5/2 1/2 1 -1/2

Zj 0 0 0 0 0 0
Zj-Cj 0 0 0 0 1

ZJ-CJ>=0 stop phase I move to phase II


2x1+x2-s1+A1=2
x1+3x2+s2=2

Phase II : Zmax= 3x1-x2+0s1+0s2-0A1

Cj 3 -1 0 0

CB Basic XB X1 X2 S1 S2 Min
Variables (RHS) EV ratio
XB /Xk

3 X1 1 1 1/2 -1/2 0 -
IE
0 S2 ov 1 0 5/2 1/2 1 2 KR

Zj 3 3 3/2 -3/2 0
Zj-Cj 0 5/2 -3/2 0
KC
2x1+x2-s1+A1=2
x1+3x2+s2=2

Phase II : Zmax= 3x1-x2+0s1+0s2-0A1

Cj 3 -1 0 0

CB Basic XB X1 X2 S1 S2 Min FOR x1 :


Variables (RHS) ratio 1 +1/2* 2=2
XB /Xk 1+1/2*0=1
½+1/2*5=3
-1/2+1/2*1=0
0+1/2*2=1
3 X1 2 1 3 0 1

0 S1 NR 2 0 5 1 2

Zj 6 3 9 0 3
Zj-Cj 0 10 0 3

Phase II : zj-cj>=0 zmax= 6 x1=2 x2= 0


Example 3:
Zmax= 2x1+3x2-5x3
X1+x2+x3=7
2x1-5x2+x3>=10
X1,x2,x3>=0 May – 09
Solution:
Zmax= 102/7 , x1=45/7, x2= 4/7
Phase 1 last iteration
Cj 0 0 0 0 -1 -1

CB Basic XB X1 X2 x3 S1 A1 A2 Min ratio


Variables (RHS) XB /Xk

0 X2 4/7 0 1 1/7 1/7 2/7 -1/7

0 X1 45/7 1 0 6/7 -1/7 5/7 1/7

Zj 0 0 0 0 0 0 0
Zj-Cj 0 0 0 0 1 1
Phase 2
Cj 2 3 -5 0

CB Basic XB X1 X2 x3 S1 Min ratio


Variables (RHS) XB /Xk

3 X2 4/7 0 1 1/7 1/7

2 X1 45/7 1 0 6/7 -1/7

Zj 102/ 2 3 15/7 1/7


7
Zj-Cj 0 0 50/7 1/7

Zmax= 102/7 , x1=45/7, x2= 4/7 X3 = 0


Example 4:
Zmax= 5x1+8x2

3X1+2x2>=3

X1+4x2>=4

X1+x2<=5

X1,x2>=0
SOLUTION :
Phase I: Zmax= 0x1+0x2+0s1+0s2+0s3-A1-A2
Phase II: Zmax= 5x1+8x2+0s1+0s2+0s3-0A1-0A2
3X1+2x2-s1+A1=3
X1+4x2-s2+A2=4
X1+x2+s3=5
X1,x2,S1,S2,S3,A1,A2>=0
Phase I: Zmax= 0x1+0x2+0s1+0s2+0s3-A1-A2
3X1+2x2-s1+A1=3
X1+4x2-s2+A2=4
X1+x2+s3=5

Cj 0 0 0 0 0 -1 -1

CB Basic XB X1 X2 S1 S2 S3 A1 A2 Min
Variables (RHS) EV ratio
XB /Xk

-1 A1 3 3 2 IE -1 0 0 1 0 1.5

-1 A2 4 1 0 -1 0 0 1 1 KR
4 KE
OV
0 S3 5 1 1 IE 0 0 1 0 0 5

Zj -7 -4 -6 1 1 0 -1 -1
Zj-Cj -4 -6 1 1 0 0 0
kc
Phase I: Zmax= 0x1+0x2+0s1+0s2+0s3-A1-A2
3X1+2x2-s1+A1=3
X1+4x2-s2+A2=4
X1+x2+s3=5

Cj 0 0 0 0 0 -1 -1 A1:
3 -2*1=1
CB Basic XB X1 X2 S1 S2 S3 A1 A2 Min 3 -2*1/4=5/2
Variable (RHS) EV ratio 2 -2*1=0
s XB /Xk -1 -2*0=-1
0 +2*1/4=1/2
0 -2*0=0
-1 A1 1 0 -1 1/2 0 1 -1/2 2/5 1 -2*0=1
5/2
OV KR 0 -2*1/4= -1/2
0 X2 1 ¼ 1 0 -1/4 0 0 1/4 4
NR IE For s3:
5 -1=4
0 S3 4 ¾ 0 0 1/4 1 0 -1/4 16/3
1- ¼= 3/4
IE 1 -1=0
Zj -1 -5/2 0 1 -1/2 0 -1 1/2 0-0=0
Zj-Cj -5/2 0 1 -1/2 0 0 3/2 0+1/4=1/4
1-0=1
KC
0-0=0
0-1/4=-1/4
Phase I: Zmax= 0x1+0x2+0s1+0s2+0s3-A1-A2
3X1+2x2-s1+A1=3
X1+4x2-s2+A2=4
X1+x2+s3=5

Cj 0 0 0 0 0 -1 -1 x2:
1 -1/4 * 2/5=9/10
CB Basic XB X1 X2 S1 S2 S3 A1 A2 Min ¼ -1/4 * 1=0
Variabl (RHS) EV ratio 1 -1/4 * 0=1
es XB /Xk 0 +1/4 * 2/5= 1/10
-1/4 -1/4 * 1/5=-3/10
2/5 1 0 -2/5 1/5 0 2/5 -1/5 0 -1/4 * 0=0
0 X1 0 -1/4 * 2/5=-1/10
NR 1/4 +1/4 * 1/5=3/10
9/10 0 1 1/10 -3/10 0 -1/10 3/10
0 X2
For s3:
37/10 0 0 3/10 1/10 1 -3/10 -1/10 4 -3/4*2/5= 37/10
0 S3
¾ -3/4*1= 0
0 0 0 0 0 0 0 0
0 -3/4*0=0
Zj 0 +3/4*2/5=3/10
Zj-Cj 0 0 0 0 0 1 1 1/4 -3/4*1/5= 1/10
1 -3/4*0=1
0 -3/4*2/5= -3/10
Zj-cj>=0 start phase 2 -1/4 +3/4*1/5= -1/10
Phase II: 5x1+8x2+0s1+0s2+0s3-0A1-0A2
3X1+2x2-s1+A1=3
X1+4x2-s2+A2=4
X1+x2+s3=5

Cj 5 8 0 0 0

CB Basic XB X1 X2 S1 S2 S3 Min ratio


Variables (RHS) EV XB /Xk

5 X1 2/5 1 0 -2/5 1/5 0

NR
9/10 0 1 1/10 -3/10 0
8 X2

37/10 0 0 3/10 1/10 1


0 S3
Zj 46/5 5 8 -6/5 -7/5 0
Zj-Cj 0 0 -6/5 -7/5 0
Phase II 5x1+8x2+0s1+0s2+0s3-0A1-0A2
3X1+2x2-s1+A1=3
X1+4x2-s2+A2=4
X1+x2+s3=5

Cj 5 8 0 0 0

CB Basic XB X1 X2 S1 S2 S3 Min ratio


Variables (RHS) EV EV XB /Xk

5 X1 2/5 1 0 -2/5 1/5 0 2 KR


KE
OV
9/10 0 1 1/10 -3/10 0 -
8 X2

37/10 0 0 3/10 1/10 1 37


0 S3
Zj 46/5 5 8 -6/5 -7/5 0
Zj-Cj 0 0 -6/5 -7/5 KC 0
Phase II 5x1+8x2+0s1+0s2+0s3-0A1-0A2
3X1+2x2-s1+A1=3
X1+4x2-s2+A2=4
X1+x2+s3=5

Cj 5 8 0 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

7/2 -1/2 0 1/2 0 1 7 KR


0 S3
Zj 12 12 8 -4 0 0
Zj-Cj 7 0 -4 0 0
KC
Phase II 5x1+8x2+0s1+0s2+0s3-0A1-0A2
3X1+2x2-s1+A1=3
X1+4x2-s2+A2=4
X1+x2+s3=5

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

by Rupali Jadhav, TIMSCDR,Mumbai


Special cases in simplex method

 Degeneracy

 Unbounded solution

 Infeasible solution

 Alternative optima
Degeneracy:

▪ When we are finding optimum solution to LPP using simplex method ,


minimum ratio is determined to find key row , but sometimes this ratio
may not be unique( i.e. tie in key row), this phenomenon is known as
degeneracy.
▪ Method to resolve degeneracy:
1. Find out the rows for which minimum non negative ratio is same.
2. Now rearrange the column of simplex table as slack variable , artificial variable ( if
present ) , basic variables only for rows for which min ratio is same.

3. Divide entire row with respective intersecting element.


4. Compare the resulting ratios, column by column , from left to right. Select the
row which having minimum value as a key row
Example 1
Max Z = 3x1 + 9x2
Subject to
x1 + 4x2 ≤ 8
x1 + 2x2 ≤ 4
and x1 ≥ 0, x2 ≥ 0
Solution
Standard LPP
Max Z = 3x1 + 9x2 + 0s1 + 0s2
Subject to
x1 + 4x2 + s1 = 8
x1 + 2x2 + s2 = 4
x1 , x2 , s1, s2 ≥ 0
Cj 3 9 0 0
CB Basic XB X1 X2 S1 S2 Min ratio
Variables (RHS) XB /Xk

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

1/4 0/4 1/4 4/4

0/2 1/2 1/2 2/2


Minimum ( ¼,0/2)= 0
So select second row as key row
Cj 3 9 0 0
CB Basic XB X1 X2 S1 S2 Min ratio
Variables (RHS) XB /Xk

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

Zj-Cj 3/2 0 0 9/2

Solution is : X1 =0 , X2= 2 zmax= 18


Example 2
Max Z = 2x1 + x2
Subject to
KEY ROW is the row with the
4x1 + 3x2 ≤ 12 smallest NON-NEGATIVE ratio
4x1 + x2 ≤ 8 (quotient).
Note that 0(+1) and 0(-1) are
4x1 - x2 ≤ 8 both numerically zero, but in
and x1 ≥ 0, x2 ≥ 0 calculating RATIOS, consider
0(+1) as positive (OK), and 0(-
Solution: 1) as negative (not OK).

Max Z = 5, x1 = 3/2, x2 = 2
Unbounded Solution

 In simplex method, this can be noticed if Δj value is negative to a


variable (entering) which is notified as key column and the ratio of
solution value to key column value is either negative or infinity (both
are to be ignored) to all the variables. This indicates that no
variable is ready to leave the basis, though a variable is ready to
enter. We cannot proceed further and the solution is unbounded or
not finite.

 i.e. a solution in which all ratio elements are either negative or


infinity . So we don’t able to find key row hence outgoing variable .
Such situation is called Unbounded Solution
Example:
Zmin=-3x1-2x2
x1-x2<=1
3x1-2x2<=6
x1,x2>=0 Dec-09,may 2000 , Nov 06
Solution:
Zmax=3x1+ 2x2
x1-x2+S1=1
3x1-2x2+S2=6
Zmax=3x1+ 2x2 +0S1+ 0S2
Cj 3 2 0 0
CB Basic XB X1 X2 S1 S2 Min ratio
Variables (RHS) XB /Xk

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

Zj-Cj -3M-3 -4M-2 0 M 0


Cj 3 2 0 0 -M
CB Basic XB X1 X2 S1 S2 A1 Min ratio
Variables
(RHS) XB /Xk

2 x2 2 2 1 1 0 0

-M A1 4 -5 0 -4 -1 1

Zj -4M+4 5M+4 2 4M+2 M -M

Zj-Cj 5M+1 0 4M+2 M 0

Solution: all zj-cj ≥ 0 but artificial variable present in


solution so solution is called Infeasible solution
Alternate optima
 When the objective function is parallel to one of the constraints, the
multiple optimal solutions may exist.

 After reaching optimality, if at least one of the non-basic variables


possess a zero value in Δj, the multiple optimal solution exist.
Example
Max Z = 6x1 + 4x2
Subject to
2x1 + 3x2 ≤ 30
3x1 + 2x2 ≤ 24
x1 + x2 ≥ 3
and x1 ≥ 0, x2 ≥ 0
 Solution
Standard LPP
Max Z = 6x1 + 4x2 + 0s1 + 0s2 + 0s3 - MA1
Subject to
2x1 + 3x2 + s1 = 30
3x1 + 2x2 + s2 = 24
x1 + x2 – s3 + A1= 3
x1 , x2 , s1, s2, s3, A1 ≥ 0
Cj 6 4 0 0 0 -M
CB Basic XB X1 X2 S1 S2 S3 A1 Min
Variables (RHS) ratio
XB /Xk

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

Zj-Cj -M-6 -M-4 0 0 M 0


Cj 6 4 0 0 0 -M
CB Basic XB X1 X2 S1 S2 S3 A1 Min
Variables (RHS) ratio
XB /Xk

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

Solution: all zj-cj ≥ 0


x1=8 , X2= 0 , Zmax = 48
 Solution: all zj-cj ≥ 0
 Since Δ2 corresponding to non-basic variable x2 is obtained
zero, this indicates that alternate solution or multiple optimal
solution also exist. Therefore the solution as obtained above is
not unique.
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 42/5


0 s3 5 0 -1/3 0 1/3 1 -1 -
6 X1 8 1 2/3 0 1/3 0 0 12
Zj 48 6 4 0 2 0 0
Zj-Cj 0 0 0 2 0 M
Cj 6 4 0 0 0 -M
CB Basic XB X1 X2 S1 S2 S3 A1 Min
Variables (RHS) ratio
XB /Xk

4 x2 42/5 0 1 3/5 -2/5 0 0


0 s3 39/5 0 0 1/5 1/5 1 -1
6 X1 12/5 1 0 -2/5 3/5 0 0
Zj 48 6 4 0 2 0 0
Zj-Cj 0 0 0 2 0 M

Solution: all zj-cj ≥ 0


x1= 12/5 , X2= 42/5 , Zmax = 48

You might also like