Linear+Programming+1 (2)
Transcript of Linear+Programming+1 (2)
-
8/14/2019 Linear+Programming+1 (2)
1/49
Linear ProgrammingLinear Programming
(An Optimization Technique)(An Optimization Technique)General Optimization Problem Involves :General Optimization Problem Involves :
1. Decision Variables1. Decision Variables
2. Objective Criterion (Max/Min)
3. Constraints: (i) Equality (ii) Inequality
Linear Programming(LP) :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, whileworking with US Air Force.
-
8/14/2019 Linear+Programming+1 (2)
2/49
(1)xcMin.)Zor(Max.Optimizen
1j
jj=
=
The word Linear in LP indicates -relationship among variables both in objectivefunction and constraints.
while Programming means - SystematicMathematical technique.
General Linear Programming Problem (LPP)
with n variables and m constraints can bestated as follows:
)2(...2,1;),,(1
mibxa i
n
j
jij ===
)3(...2,1;0 njxj =
-
8/14/2019 Linear+Programming+1 (2)
3/49
Types of VariablesTypes of Variables
Decision Variables : xj are decision variables
Slack Variables
mibwxa in
j
ijij ...2,1;1
==+=
bxan
jijij
1
=
wi are slack variables.
-
8/14/2019 Linear+Programming+1 (2)
4/49
Artificial Variables :Required for solution methodology
Surplus Variables
bxa
n
jijij
1
=
mibsxa in
jijij ...2,1;
1
===
si are surplus variables
-
8/14/2019 Linear+Programming+1 (2)
5/49
Components of LPP :
The three important components of LPP
are as follows:
(a) Decision Variables
(b) Objective Function - Max. or Min.
(c) Constraints-limitations.
-
8/14/2019 Linear+Programming+1 (2)
6/49
1. Certainty:cj, aij, bi are known & constants.
2. Divisibility: Values of decision variable
can be integer or fractional.
3. Additivity: Total contribution = Sum of
contribution of all variables
4. Linearity: Relationship among variables
both in objective function & constraints.
Assumptions of LPAssumptions of LP
-
8/14/2019 Linear+Programming+1 (2)
7/49
Formulation of LPP :
Steps to be followed.
1.To decide (define) decision variables.
2. To formulate objective function.
3. To formulate constraints.
-
8/14/2019 Linear+Programming+1 (2)
8/49
-
8/14/2019 Linear+Programming+1 (2)
9/49
CASE - 1 Formulation of LPP :
Let decision variable x1 = no of pieces of P1x2 = no of pieces of P2
Max. Z = 3x1 + 5x2 Objective Equation
ConstraintTimeIxx )(182213 +
ConstraintMaterialIIx )(41
ConditionsnegativityNonxx 02,1
ConstraintMaterialIIIx )(62
-
8/14/2019 Linear+Programming+1 (2)
10/49
CASE - 2
If Time Constraint is modified to:Time available is not less than 18 hours.
Max. Z = 3x1 + 5x2 Objective Equation
ConstraintTimeIxx )(182213 +
ConstraintMaterialIIx )(41
ConditionsnegativityNonxx 02,1
ConstraintMaterialIIIx )(62
-
8/14/2019 Linear+Programming+1 (2)
11/49
CASE - 3
If Time Constraint is modified to:Time available is exactly 18 hours.
Max. Z = 3x1 + 5x2 Objective Equation
ConstraintTimeIxx )(182213 =+
ConstraintMaterialIIx )(41
ConditionsnegativityNonxx 02,1
ConstraintMaterialIIIx )(62
-
8/14/2019 Linear+Programming+1 (2)
12/49
1. Feasible Solution: Solution with values of
decision variables(xj) which satisfy allConstrints & Non-negativity condition.
2. Basic Solution: For a set of m equations
in n variables (n>m), basic solution is a
solution obtained by setting (n-m)
variables equal to zero and solving forremaining m equations in m variables.
Types of SolutionTypes of Solution
No. of possible Basic solutions = nCm
= n!/(m!.(n-m)!)
-
8/14/2019 Linear+Programming+1 (2)
13/49
(i) Basic Variables : Having values > 0.
(ii) Non-basic Variables :Having values = 0.
3. Basic Feasible Solution : It is a BasicSolution which satisfies (3).
4. Non-degenerate/degenerate B.F.S
5. Optimal Basic Feasible Solution : It is a
Basic Feasible Solution which optimizes
objective function.6. Unbounded Solution :
7. Infeasible Solution :
8. Unique/Alternative Optimal Solutions :
-
8/14/2019 Linear+Programming+1 (2)
14/49
Methods to solve LPP :1.Graphical Method - for only two variables.
2. Simplex Method - Universal method.
3. Assignment Method - Special method.4. Transportation Method - Special method.
Note :Methods (2),(3) and (4) are iterative
methods.
-
8/14/2019 Linear+Programming+1 (2)
15/49
(1) Graphical Method
( for only two variables)
-
8/14/2019 Linear+Programming+1 (2)
16/49
3
6
9
2 4 6 x1
F.R.
Opt. Pt. (2,6)
Z=0.
Z=15.
Zopt = 36.
III
I
II
02,1
)(62)(41
)(182213/
2513
+
+=
xx
IIIxIIx
Ixxts
xxZMaxGraphical MethodGraphical Method
Case 1.Case 1.
-
8/14/2019 Linear+Programming+1 (2)
17/49
3
6
9
2 4 6 x1
F.R.
Opt. Pt.(4,6)
Z=15.
Zopt = 42
III
I
II02,1
)(62
)(41
)(182213/
2513
+
+=
xxIIIx
IIx
Ixxts
xxZMaxGraphical MethodGraphical Method
Case 2.Case 2.
-
8/14/2019 Linear+Programming+1 (2)
18/49
3
6
9
2 4 6 x1
F.L.
Opt. Pt.(2,6)
Z=15.
Zopt = 36
III
I
II
02,1
)(62)(41
)(182213/
2513
=+
+=
xx
IIIxIIx
Ixxts
xxZMaxGraphical MethodGraphical Method
Case 3.Case 3.
-
8/14/2019 Linear+Programming+1 (2)
19/49
3
6
9
2 4 6 x1
F.R.
III
I
II
Graphical MethodGraphical Method
Special Case.Special Case.
Alternative OptimalAlternative OptimalSolutionsSolutions
-
8/14/2019 Linear+Programming+1 (2)
20/49
3
6
9
2 4 6 x1
F.R.(Unbounded)
Opt. Pt.
(Min.)
III
II
I
GraphicalGraphicalMethodMethod
Special Case.Special Case.
Z line
Opt. Sol. (Max)Opt. Sol. (Max)
(Unbounded)(Unbounded)
-
8/14/2019 Linear+Programming+1 (2)
21/49
3
6
9
2 4 6 x1
F.R.Not
possible
InfeasibleInfeasibleSolutionSolution
GraphicalGraphicalMethodMethod
Special Case.Special Case.
-
8/14/2019 Linear+Programming+1 (2)
22/49
4
5
4 5 x1
x2
20-2-3
2
-1
-1
-2
-3
-4
III
III
F.R.
Z=6
Opt. Pt. (0.5,
4.5)
Zopt = 12.5
02,1
)(521
)(3213
)(4212/
2312
+
+
+=
xx
IIIxx
IIxx
Ixxts
xxZMax
GraphicalGraphicalMethodMethod
Special Case.Special Case.
-
8/14/2019 Linear+Programming+1 (2)
23/49
Graphical Method todiscuss typical constraints
to identify regions of
constraints.
Typical CaseTypical Case ?62213 +l ttH
-
8/14/2019 Linear+Programming+1 (2)
24/49
4 5 x1
x2
0-2-3 -1
-1
-3
-2
1
2
3
21 3
Typical CaseTypical Case ?62213 + xxplottoHow
62213 =+ xx
),Point(xxWhen 022102 ==
)Point(xxWhen 3,03201 ==
Typical CaseTypical Case ?62213 l ttH
-
8/14/2019 Linear+Programming+1 (2)
25/49
2
3
4 5 x1
x2
10-2-3
1
-1
-1
-2
-3
2 3
Typical CaseTypical Case ?62213 xxplottoHow
62213 = xx
),Point(xxWhen 022102 ==
)Point(xxWhen 3,03201 ==
Typical CaseTypical Case ?021 +l ttH
-
8/14/2019 Linear+Programming+1 (2)
26/49
4 5 x1
x2
0-2-3 -1
-1
-3
-2
1
2
3
21 3
Typical CaseTypical Case ?021 + xxplottoHow
021 =+ xx
21 xx = )Point(xxWhen 1,11211 ==arrowFor
0102=
xx
-
8/14/2019 Linear+Programming+1 (2)
27/49
RecapitulateRecapitulate
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.
-
8/14/2019 Linear+Programming+1 (2)
28/49
(2) Simplex Method
(Universal method)
-
8/14/2019 Linear+Programming+1 (2)
29/49
Simplex Method to solve
Max. Problem with All constraints.
-
8/14/2019 Linear+Programming+1 (2)
30/49
02,1
)(62
)(41
)(182213/
2513
+
+=
xx
IIIx
IIx
Ixxts
xxZMax
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
Simplex MethodSimplex Method
Case 1.Case 1.
T i iti l T blT i iti l T bl
-
8/14/2019 Linear+Programming+1 (2)
31/49
ci xi bi x1 x2 w1 w2 w3
Ij Z = 0 3 5 0 0 0
Ij = (cj -Ej) = Cj- ( aij.ci)
cj 3 5 0 0 0
To prepare initial Tableau:To prepare initial Tableau:
Tableau - ITableau - I
0 w1 18 3 2 1 0 0
0 w2 4 1 0 0 1 0
0 w3 6 0 1 0 0 1
Interpretation of Tableau
T bl ITableau I
-
8/14/2019 Linear+Programming+1 (2)
32/49
ci xi bi x1 x2 w1 w2 w3
Ij Z = 0 3 5 0 0 0
cj 3 5 0 0 0Tableau - ITableau - I
0 w1 18 3 2 1 0 0
0 w2 4 1 0 0 1 0
0 w3 6 0 1 0 0 1
Ratio18/2 = 9
4/0 =
6/1 = 6
Key Column Max +ve Ij Key Row Min positive ratio.
-
8/14/2019 Linear+Programming+1 (2)
33/49
How to get next tableau ? Leaving variable : w3
Entering variable : x2
If the key element is 1, then key row remain same inthe new simplex tableau
If the key element is other than 1, then divide eachelement in the key row (including b value) by the keyelement to find new values of that row
Make the other elements in the key column equal to0 by performning elementary row operations withnew key row obtained as above.
T bl IT bl I
-
8/14/2019 Linear+Programming+1 (2)
34/49
ci xi bi x1 x2 w1 w2 w30 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
Ratio18/2 = 9
4/0 =
6/1 = 6
cj 3 5 0 0 0Tableau - ITableau - I
18 18 - (6*2)/1 = 6
R1 2R3 gives
2 2-2(1) = 0 , 3 3- 2(0) = 3 and 1 1 2(0) = 1
T bl IIT bl II
-
8/14/2019 Linear+Programming+1 (2)
35/49
0 w1 6 3 0 1 0 -2
0 w2 4 1 0 0 1 0
Ij Z = 30 3 0 0 0 -5
Ratio6/3 = 2
4/1 = 4
6/0 =
cj 3 5 0 0 0
Key Column Max +ve Ij
Key Row Min positive ratio.
Tableau - IITableau - II
5 x2 6 0 1 0 0 1
ci xi bi x1 x2 w1 w2 w3
T bl IIITableau III
-
8/14/2019 Linear+Programming+1 (2)
36/49
3 x1 2 1 0 1/3 0 -2/3
Ij Z = 36 0 0 - 1 0 - 3
cj 3 5 0 0 0Tableau - IIITableau - III
5 x2 6 0 1 0 0 1
This is the final Tableau.
The Optimal Solution is x1 = 2, x2 = 6
giving Z = 36
ci xi bi x1 x2 w1 w2 w3
0 w2 2 0 0 -1/3 1 2/3
-
8/14/2019 Linear+Programming+1 (2)
37/49
Interpretation of
Simplex Method through
Graphical method.
Interpretation of Simplex MethodInterpretation of Simplex Method
-
8/14/2019 Linear+Programming+1 (2)
38/49
3
6
9
2 4 6 x1
F.R.
Opt. Pt. (2,6)
Z=15.
Zopt = 36.
III
I
II
02,1
)(62
)(41
)(182213/
2513
+
+=
xx
IIIx
IIx
Ixxts
xxZMax
Interpretation of Simplex MethodInterpretation of Simplex Method
Through Graphical MethodThrough Graphical Method
T1
T3
T2
GATE 2002
-
8/14/2019 Linear+Programming+1 (2)
39/49
GATE - 2002(1) A furniture manufacture produces Chairs & Tables.
The wood working department is capable of producing
200 chairs or 100 tables or any proportionatecombinations 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.
Set up the problem as a Linear Program.
Determine optimal product mix and optimal valueof objective function.
If a profit of each table drops to Rs. 200 per unit,
what is the product mix and profit ?
(a)
(b)
(c)
GATE 2002
-
8/14/2019 Linear+Programming+1 (2)
40/49
GATE - 2002
MaxZ = 100x1+ 300x2
S/t 11002
200
1
+
xx
x1 150
x2 80
x1, x2 0
Formulation(a)
(b) Optimal Solution
-
8/14/2019 Linear+Programming+1 (2)
41/49
(40, 80) Z = 28000
Z = 15000
100
200
150
50
80
x2
x1
(b) Optimal Solution
(c) Multiple Optimal Solutions
-
8/14/2019 Linear+Programming+1 (2)
42/49
(40, 80) Z = 20000
Z = 15000
100
200
150
50
80
x2
x1
75 Opt. Line
(c) Multiple Optimal Solutions
GATE 2003
-
8/14/2019 Linear+Programming+1 (2)
43/49
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 :
The maximum profit which can meet the constraint is
(A) (D)(C)(B)29 38 44 75
x1 + 3x2 40
3x1 + x2 24
x1 + x2 10
x1> 0, x2> 0
-
8/14/2019 Linear+Programming+1 (2)
44/49
40
x2
x1
10
10
20
Z = 50
Opt. Pt. (0,10) Z = 50
Ans. = (C) 44
25
GATE 2000
-
8/14/2019 Linear+Programming+1 (2)
45/49
GATE - 2000
Max Z = 4x1+ 6x2 + x3
S/t
x1, x2, x3 0
2x1+ x2 + 3x3 5
Solve :
If x2 2 is added then what will be the
solution ?
GATE 2000
-
8/14/2019 Linear+Programming+1 (2)
46/49
GATE - 2000
Solution :
x1 = 0, x2 = 5, x3 = 0 giving z = 30
Through Simplex Method, in
two iterations the solution ofbasic problem is :
If x2 2 is added then the solution through
Simplex Method, in three iterations will be :
x1
= 3/2, x2
= 2, x3
= 0 giving z = 18
GATE - 2008
-
8/14/2019 Linear+Programming+1 (2)
47/49
GATE - 2008Max Z = 4x1
+ 6x2
x1, x2 0
3x1+ 2x2 6
2x1+ 3x2 6
Q.1 After introducing slack variables w1 and w2, the initial
feasible solution is represented by the tableau below.
ci xi bi x1 x2 w1 w2
Ij 0 -4 -6 0 0
cj 4 6 0 0
0 w1 6 3 2 1 0
0 w2 6 2 3 0 1
GATE - 2008
-
8/14/2019 Linear+Programming+1 (2)
48/49
GATE 2008
After some Simplex interactions, the following tableau is obtained.
ci xi bi x1 x2 w1 w2
Ij 12 0 0 0 2
cj 4 6 0 0
0 w1 2 5/3 0 1 -1/3
6 x2 2 2/3 1 0 1/3
GATE - 2008
-
8/14/2019 Linear+Programming+1 (2)
49/49
GATE 2008
Q.2 The dual for given LP is :
(A) Min Z = 6u + 6v
S/t 3u + 2v 42u + 3v 6
u , v 0
(B) Max Z = 6u + 6v
S/t 3u + 2v 42u + 3v 6
u , v 0
(C) Max Z = 4u + 6v
S/t 3u + 2v 62u + 3v 6
u , v 0
(D) Min Z = 4u + 6v
S/t 3u + 2v 62u + 3v 6
u , v 0