Professional Documents
Culture Documents
Linear Programming (Unit 3.)
Linear Programming (Unit 3.)
Statistics
Linear Programming
• Linearity assumption
• Objective function
• Constraint
• Feasible region
• Linear relationship between two variables has been represented by
a. Straight line
b. curve
• The feasible region in a set points which satisfy
a. Objective function
b. Some of the given constraint
c. All of the given constraint
d. None of the above
• The objective function of the linear programming is
a. Constraints
b. Function to be optimized
c. Relation between the variables
d. None of the above
• A set of values decision variables which satisfies linear constraints and
non-negativity conditions of LPP is called
a. Feasible region
b. Optimum solution
c. Unbounded solution
d. None of the above
• Maximise profit∏ = 30X1+40X2 (objective function)
• Subject to
• 2x1+2x2 ≤14
• 1X1+2X2 ≤10
• X1, x2≥0
• Maximise profit∏ = 30X1+40X2 (objective function)
• Subject to
• 2x1+2x2 ≤14
• 1X1+2X2 ≤10
• X1 , x 2 ≤ 0
• Profits of the above function will be maximized at point
a. (3, 3.5)
b. (0,5)
c. (7,0)
d. None of the above
• Maximize Z= 3x1+5x2
• Subject to
• X1+2x2 ≤2000
• X1+x2 ≤1500
• x1 ≤600
• X1, x2 ≥0
Points 3x1+5x2
• A company produces two types of models M1 and M2. Each M1
model requires 4 hours of grinding and 2 hours of polishing, where as
each M2 model requires 2 hours of grinding and 5 hours of polishing.
The company has 2 grinders and 3 hours of polishers. Each grinder
works for 40 hours a week and each polisher works for 60 hours a
week. Profit on an M1 model is Rs. 3.00 and on M2 model is Rs. 4.00.
Whatever is produced in a week is sold in the market. How should the
company allocate its production capacity to two types of models so
that it may make the maximum profit in a week. Formulate the
problem as a linear programming problem.
Decision variables Models Hours of grinding Polishing Profit
X1 M1 4 2 Rs. 3
x2 M2 2 5 Rs. 4
40 60
• Max Z= 3x1+4x2
• 4x1+2x2≤80
• 2x1+ 5x2 ≤ 180
Points 3x1+4x2
Unique solution
• Suppose a firm produces two products X1 and X2. Each unit of
product X1 contributes Rs. 30 to profit and each unit of product X2
contributes Rs. 40 to profit. The production of these products requires
inputs A and B and their available quantities are 14 and 10 units
respectively. It is given that production of one unit of product X1
requires 2 units of input A, 1 unit of input B. The production of one
unit of product X2 requires 2 units of input A, 2 units of input B.
Decision variable Products A B Profit
X1 X1 2 1 30
x2 x2 2 2 40
14 10
• Max Z= 30X1 +40X2
• 2x1+2x2 ≤14
• 1x1+2x2 ≤10
Points 30X1 +40X2
• Suppose in a market two foods are available, food I and food II. These
two foods contain three nutrients A, B and C. One unit of food I
contains 10 units of nutrients A, 5 units of nutrients B and 2 units of
nutrients C and cost 60 paisa. Similarly one unit of food II contains 4
units of nutrient A, 4 units of nutrient B and 6 units of nutrient C and
cost Rs. 1 for maintaining his health. Suppose minimum daily
requirement of a person of three nutrients A, B and C are 20 units, 20
units and 12 units respectively. Problem is what combination of food I
and food II, a person must purchase from the market so that a
minimum daily requirements are satisfied, and the cost is minimum
possible.
Decision Foods A B C Cost
variable
X1 I 10 5 2 0.6
X2 II 4 5 6 1.0
Minimum 20 20 12
requirement
Multiple optimal solution
• Maximize= 2X+6Y
• Subject to
• X+3Y≤ 60
• 3X+4Y ≤120
• X ≥0
• X,Y ≥0
Infeasible Solution
• Minimize 2X+6Y
• Subject to
• X+2Y ≤30
• 3X+4Y≥120
• X, Y ≥0
Unbounded solution
• Feasible region is open ended.
• Maximize 2X+6Y
• Subject to
• X+3Y ≥60
• 3X+4Y ≥120
• X, Y ≥0
Simplex Method
• Max Z= 2x1- x2+2x3
• Subject to constraint
• 2x1+x2≤10
• X1+2x2-2x3 ≤20
• X1+2x3 ≤5
• Slack Variables
• Max Z= 2x1- x2+2x3+s1+s2+s3
• Subject to constraint
• 2x1+x2+s1=10
• X1+2x2-2x3+s2= 20
• X1+2x3+s3= 5
• S1, s2 and s3 are slack variables
Initial Table
CBi Cj 2 -1 2 0 0 0
0 S1 2 1 0 1 0 0 10 10/2= 5
0 S2 1 2 -2 0 1 0 20 20/1=20
0 S3 1 0 2 0 0 1 5 5/1= 5
Zj 0 0 0 0 0 0
Cj- Zj 2 -1 2 0 0 0
• Zj for first column
• Zj= (2*0)+ (1*0)+(1*0)= 0 (1st column)
• (1*0)+(2*0)+(0*0)=0 (2nd column)
• (0*0)+(2*0)+(2*0)= 0 (3rd column)
• (1*0)+(0*0)+(0*0)=0 (4th column)
• (0*0)+(1*0)+(0*0)= 0 (5th column)
•
• Key column represent___________
2 X1 1 ½ 0 ½ 0 0 10/2= 5 5/0=
Zj 2 1 0 1 0 0
Cj-Zj 0 -2 2 -1 0 0
• In order to calculate X1 we will divide the first row with key element.
• The new values of S2=
• New value= old value – corresponding key raw* corresponding key
column key element
• What is key element?
2 X1 1 ½ 0 ½ 0 0 5
0 S2 0 1 0 -1 1 -1 15
Zj 2 ½ 2 ½ 0 1
a. Cj-Zj≤0
b. Cj-Zj≥0
Shadow Prices
• Max Z= 300X1 +200X2
• Subject to
• 2x1+x2≤ 8
• x1 +2x2 ≤8
• 2x1+x2= 8
• X1= 0 then x2 =8
• If x2=0 then x1= 4
• x1 +2x2=8
• If x1 =0 then x2= 4
• If x2 =0 then x1=8
• If the constraint for the machine 1 has changed then the optimal point
will change
• 2x1+x2≤ 9
• If X1=0 then X2= 9
• If X2=0 then X1= 4.5
• Shadow price of machine M1 is
• = ZB (New optimal profit value)- ZA(old profit value)
• M1 capacity change
• 4400/3-4000/3
• 9-8
• Now we will change the constraint for machine 2
• x1 +2x2 ≤9
• If X1= 0 then X2= 4.5
• If X2=0 then x1= 9
• Shadow prices for the machine 2
• Zc (New optimal profit value)- ZA(old profit value)
• M2 capacity change
• How we can calculate shadow prices?
a. New profit optimal value- old profit value/capacity change
b. New profit optimal value/capacity change
c. old profit value/capacity change
d. None of the above
Primal to Dual
• Max Z= x1+2x2+x3
• Subject to
• 2x1+x2-x3≤2
• -2x1+x2-5x3≥ -6
• 4x1+x2+x3 ≤6
• X1, x2, x3 ≥0
• Max Z= x1+2x2+x3
• Subject to
• 2x1+x2-x3≤2
• 2x1-x2+5x3 ≤6
• 4x1+x2+x3 ≤6
•
• Dual form
• Let w1, w2, w3 be dual variables.
• Min Z= 2w1+6w2+6w3
• Subject to
• 2w1+2w2+4w3≥1
• W1-w2+w3 ≥2
• -w1+5w2+w3 ≥1
• W1, w2, w3 ≥0
• Max Z= 3x1+4x2
• Subject to
• 2x1+6x2 ≤16
• 5x1+2x2 ≥20
• X1, x2 ≥0
• Standard form
• Max Z= 3x1+4x2
• Subject to
• 2x1+6x2 ≤16
• -5x1-2x2 ≤ -20
•
• Its transpose
• Dual form
• Let w1, w2, w3 be dual variables
• Min Z= 16w1-20w2
• Subject to
• 2w1-5w2 ≥3
• 6w1-2w2 ≥4
• W1, w2, w3 ≥0
• Min Z= 2x1+9x2+x3
• Subject to
• X1+4x2+2x3 ≥5
• 3x1+x2+2x3 ≥4
• X1, X2 ≥0
•
• Its transpose
• Dual form
• Let w1, w2, w3 are dual variables
• Max Z= 5w1+4w2
• Subject to
• W1+3w2 ≤2
• 4w1+w2 ≤9
• 2w1+2w2 ≤1