Professional Documents
Culture Documents
Linear Programming 1
Linear Programming 1
Linear Programming(LP) :
• It is one of the important “Optimization
Techniques.”
• Most Versatile, powerful & useful technique.
• Developed in 1947 by George B. Dantzig during
World War II to solve military problems, while
working with ‘US Air Force’.
• The word Linear in LP indicates -
relationship among variables both in objective
function and constraints.
• while Programming means - Systematic
Mathematical technique.
• General Linear Programming Problem (LPP)
with n variables and m constraints can be
stated as follows:
n
Optimize (Max.or Min.)Z = ∑ c j x j (1)
j =1
n
x j ≥ 0; j = 1,2...n (3)
Types of Variables
• Decision Variables : x are decision variables
j
• Slack Variables
n
∑a x ≤ b
j= 1
ij j i →
∑a ij x j + wi = bi ; i = 1,2...m
j= 1
n
∑a x
j= 1
ij j − si = bi ; i = 1,2...m
3. To formulate constraints.
CASE - 1 Data for LP Formulation.
Factory: Two products P1 & P2
Profit/piece of P1 = Rs.3/-
Profit/piece of P2 = Rs.5/-
Time Constraint:
Time required/piece of P1 = 3 hrs.
Time required/piece of P2 = 2 hrs.
Max. time available = 18 hrs.
Material Constraint:
Max. Material available for P1 = 4 pieces.
Max. Material available for P2 = 6 pieces.
CASE - 1 Formulation of LPP :
Let decision variable x1 = no of pieces of P1
x2 = no of pieces of P2
Max. Z = 3x1 + 5x2 Objective Equation
Zopt = 36.
3
F.R.
Z=15.
I
Z=0.
2 4 6 x1
Max Z = 3 x1 + 5 x 2
Graphical Method
s / t 3 x1 + 2 x 2 ≥ 18 − ( I )
9 Case 2. x1 ≤ 4 − ( II )
x2 ≤ 6 − ( III )
II x1, x 2 ≥ 0
Opt. Pt.
6
(4,6) III
F.R.
Zopt = 42
Z=15.
I
2 4 6 x1
Graphical Method Max Z = 3 x1 + 5 x 2
9 s / t 3 x1 + 2 x 2 = 18 − ( I )
Case 3.
x1 ≤ 4 − ( II )
II x2 ≤ 6 − ( III )
x1, x 2 ≥ 0
Opt. Pt.
6 (2,6) III
F.L.
Zopt = 36
3
Z=15.
I
2 4 6 x1
Graphical Method
9 Special Case.
II Alternative Optimal
Solutions
6
III
3
F.R.
I
2 4 6 x1
Graphical
9
Method
Special Case. Opt. Sol. (Max)
II
(Unbounded)
6 Opt. Pt.
(Min.) F.R.
(Unbounded)
III
3
I
Z line
2 4 6 x1
Graphical
9
Method
Special Case.
Infeasible
Solution
3 F.R. Not
possible
2 4 6 x1
x2
5
Opt. Pt. (0.5,
4 4.5)
Zopt = 12.5
2
F.R.
Z=6 III
-3 -2 -1 0 2 4 5 x1
-1
II -2 I Max Z = −2 x1 + 3 x 2
-3 s / t 2 x1 − x 2 ≤ 4 − (I )
− 3x1 + x 2 ≤ 3 − ( II )
Graphical -4
Method x1 + x 2 ≤ 5 − ( III )
x1, x 2 ≥ 0
Special Case.
• Graphical Method – to
discuss typical constraints
to identify regions of
constraints.
Typical Case How to plot → 3x1 + 2 x 2 ≥ −6 ?
x2 3x1 + 2 x 2 = −6
When x 32 = 0 → x1 = −2 ∴ Point( − 2 ,0 )
When x1 = 0 → x 2 = −3 ∴ Point( 0,−3 )
2
-3 -2 -1 0 1 2 3 4 5 x1
-1
-2
-3
Typical Case How to plot → 3x1 − 2 x 2 ≤ 6 ?
x2 3 x1 − 2 x 2 = 6
When 3 x 2 = 0 → x1 = 2 ∴ Point( 2,0 )
When x1 = 0 → x 2 = −3 ∴ Point( 0,−3 )
2
-3 -2 -1 0 1 2 3 4 5 x1
-1
-2
-3
Typical Case How to plot → x1 + x 2 ≥ 0 ?
x2 x1 + x 2 = 0
3 x1 = − x 2
When x1 = 1→ x 2 = −1 ∴ Point(1,−1 )
2
For arrow
1 x 2 = 0 → x1 ≥ 0
-3 -2 -1 0 1 2 3 4 5 x1
-1
-2
-3
Recapitulate
• What is LPP ?
• Types of variables.
• Components of LPP.
• Assumptions of LP.
• Formulation of LPP.
• Types of solutions.
• Graphical Method.
• Unique & Alternative Optimal Solution,
Unbounded FR, Infeasible solution.
(2) Simplex Method
(Universal method)
• Simplex Method to solve
• Max. Problem with
• All ≤ constraints.
Max Z = 3x1 + 5 x 2 Simplex Method
s / t 3 x1 + 2 x 2 ≤ 18 − ( I ) Case 1.
x1 ≤ 4 − ( II )
x2 ≤ 6 − ( III )
x1, x 2 ≥ 0
Standard Form:
Max Z = 3x1+5x2+0w1+0w2+0w3
3x1+2x2+w1+0w2+0w3 = 18
x1+0x2+0w1+w2+0w3 = 4
0x1+x2+0w1+0w2+w3 = 6
To prepare initial Tableau:
Tableau - I
cj 3 5 0 0 0
ci xi bi x1 x2 w1 w2 w3
0 w1 18 3 2 1 0 0
0 w2 4 1 0 0 1 0
0 w3 6 0 1 0 0 1
Ij Z=0 3 5 0 0 0
•Ij = (cj -Ej) = Cj- (Σ aij .ci)
Interpretation of Tableau
Tableau - I
cj 3 5 0 0 0
ci xi bi x1 x2 w1 w2 w3 Ratio
0 w1 18 3 2 1 0 0 18/2 = 9
0 w2 4 1 0 0 1 0 4/0 = α
0 w3 6 0 1 0 0 1 6/1 = 6
Ij Z=0 3 5 0 0 0
• Key Column → Max +ve Ij
• Key Row → Min positive ratio.
How to get next tableau ?
• Leaving variable : w3
• Entering variable : x2
• If the key element is 1, then key row remain same in
the new simplex tableau
•If the key element is other than 1, then divide each
element in the key row (including b value) by the key
element to find new values of that row
•Make the other elements in the key column equal to
‘0’ by performning elementary row operations with
new key row obtained as above.
Tableau - I
cj 3 5 0 0 0
ci xi bi x1 x2 w1 w2 w3 Ratio
0 w1 18 3 2 1 0 0 18/2 = 9
0 w2 4 1 0 0 1 0 4/0 = α
0 w3 6 0 1 0 0 1 6/1 = 6
Ij Z=0 -3 -5 0 0 0
R1 – 2R3 gives
2 2-2(1) = 0 , 3 3- 2(0) = 3 and 1 1 – 2(0) = 1
• 18 →18 - (6*2)/1 = 6
Tableau - II
cj 3 5 0 0 0
ci xi bi x1 x2 w1 w2 w3 Ratio
0 w1 6 3 0 1 0 -2 6/3 = 2
0 w2 4 1 0 0 1 0 4/1 = 4
5 x2 6 0 1 0 0 1 6/0 = α
Ij Z = 30 3 0 0 0 -5
giving Z = 36
• Interpretation of
Simplex Method through
Graphical method.
Interpretation of Simplex Method
9 Through Graphical Method
II
T2 Opt. Pt. (2,6)
6
III
T3 Zopt = 36.
Max Z = 3 x1 + 5 x 2
s / t 3 x1 + 2 x 2 ≤ 18 − ( I )
3
F.R. x1 ≤ 4
x2 ≤ 6
− ( II )
− ( III )
Z=15. x1, x 2 ≥ 0
I
T1
2 4 6 x1
GATE - 2002
(1) A furniture manufacture produces Chairs & Tables.
The wood working department is capable of producing
200 chairs or 100 tables or any proportionate
combinations of these per week. The weekly demand
for chairs and tables is limited to 150 and 80 units
respectively.The profit from a chair is Rs. 100 and that
from a table is Rs. 300.
(a) Set up the problem as a Linear Program.
x x
S/t 1 + 2 ≤1
200 100
x1 ≤ 150
x2 ≤ 80
x1, x2 ≥ 0
(b) Optimal Solution
x2
80
50 Z = 15000
200
150 x1
(c) Multiple Optimal Solutions
x2
80
75 Opt. Line
50 Z = 15000
200
150 x1
GATE - 2003
(1) A manufacture produces two types of products, 1 and
2, at production levels of x1 and x2 respectively. The
profit is given 2x1 + 5x2. The production constraints
are :
x1 + 3x2 ≤ 40
3x1 + x2 ≤ 24
x1 + x2 ≤ 10
x1 > 0, x2 > 0
20 Ans. = (C) 44
10
Z = 50
10 40
25 x1
GATE - 2000
x1 = 0, x2 = 5, x3 = 0 giving z = 30
x1 = 3/2, x2 = 2, x3 = 0 giving z = 18
GATE - 2008
Max Z = 4x1 + 6x2
3x1 + 2x2 ≤ 6
2x1 + 3x2 ≤ 6
x1, x2 ≥ 0
0 w1 6 3 2 1 0
0 w2 6 2 3 0 1
Ij 0 -4 -6 0 0
GATE - 2008
After some Simplex interactions, the following tableau is obtained.
cj 4 6 0 0
ci xi bi x1 x2 w1 w2
0 w1 2 5/3 0 1 -1/3
6 x2 2 2/3 1 0 1/3
Ij 12 0 0 0 2
GATE - 2008
Q.2 The dual for given LP is :