10. Linear Programming
10. Linear Programming
Linear Programming
Key Takeaways
Definition :
Objective function :
A linear function of the involve variable which we want to maximize
or minimize subject to given linear constraints is known as Objective
function. It is represented by 𝑧. It is of the form 𝑧 = 𝑎𝑥 + 𝑏𝑦
Linear Constraints :
The limitations or restrictions on the resources can often be
expressed in the form of linear inequations known as linear
constraints.
Key Takeaways
Feasible Solution :
Optimal Solution :
𝑌
Kinds of Region :
• Bounded Region
1. Objective Function
2. Constraints
3. Plot the solution Region 𝑋
4. Corner Points is the answer 𝑜
• Unbounded Region
𝑌
1. Objective Function
2. Constraints
3. Plot the solution Region
4. Corner Points is the answer
5. Verification 𝑜 𝑋
Solve the linear programming problem graphically :
Minimize 𝑍 = 50𝑥 + 70𝑦
Subject to constraints : 𝑥 ≥ 0, 𝑦 ≥ 0, 2𝑥 + 𝑦 ≥ 8, 𝑥 + 2𝑦 ≥ 10
Solution:
𝑌
Minimize 𝑍 = 50𝑥 + 70𝑦 𝑍 = Objective function
8 𝐶(0,8)
Subject to constraints : 𝑥 ≥ 0 , 𝑦 ≥ 0 6 2𝑥 + 𝑦 = 8
2𝑥 + 𝑦 ≥ 8
𝑥 + 2𝑦 ≥ 10 4 𝐵 2,4
Origin does not satisfy 2𝑥 + 𝑦 ≥ 8 and 𝑥 + 2𝑦 ≥ 10 2 𝑥 + 2𝑦 = 10
𝐴(10,0)
To find intercept point between 2𝑥 + 𝑦 ≥ 8 and
0 2 4 6 8 10
𝑥 + 2𝑦 ≥ 10 𝑋
2𝑥 + 𝑦 = 8 ⋯ (𝑖)
𝑥 + 2𝑦 = 10 ⋯ (𝑖𝑖)
After solving equation first and second, we get the point is (2,4)
Solve the linear programming problem graphically :
Minimize 𝑍 = 50𝑥 + 70𝑦
Subject to constraints : 𝑥 ≥ 0, 𝑦 ≥ 0, 2𝑥 + 𝑦 ≥ 8, 𝑥 + 2𝑦 ≥ 10
Solution:
𝑌
Minimize 𝑍 = 50𝑥 + 70𝑦 𝑍 = Objective function
8 𝐶(0,8)
Plotting regions on cartesian plane. 2𝑥 + 𝑦 = 8
6
Unbounded feasible region 𝐵 2,4
4
2 𝑥 + 2𝑦 = 10
Corner Point Corresponding value of 𝑍
𝐴(10,0)
𝐴 10,0 𝑍 = 50×10 + 70×0 = 500 0 2 4 6 8 10 𝑋
Solution:
Minimize 𝑍 = 50𝑥 + 70𝑦 𝑍 = Objective function 𝑌
8 𝐶(0,8)
Since, the region is unbounded, it’s not necessary
6 2𝑥 + 𝑦 = 8
that minimum value of 𝑍 is 380.
4 𝐵 2,4
Consider, the region 50𝑥 + 70𝑦 < 380
2 𝑥 + 2𝑦 = 10
After putting Origin in the above line, 𝐴(10,0)
0 2 4 6 8 10 𝑋
50 ⋅ 0 + 70 ⋅ 0 < 380 ⇒ 0 < 380 Origin satisfy 5𝑥 + 7𝑦 = 38
Double Intercept
Inequalities Equalities form
Shaded region
! $
𝑥 + 𝑦 ≤ 50 𝑥 + 𝑦 = 50 + "# = 1 0 + 0 ≤ 50 Origin side
"#
𝑥≥0
𝑦≥0
! $
3𝑥 + 𝑦 ≤ 90 3𝑥 + 𝑦 = 90 + =1 3×0 + 0 ≤ 90 Origin side
%# &#
Solve the linear programming problem graphically:
Maximize 𝑍 = 4𝑥 + 𝑦 Subject to constraints : 𝑥 ≥ 0, 𝑦 ≥ 0,
𝑥 + 𝑦 ≤ 50, 3𝑥 + 𝑦 ≤ 90
Solution:
𝑌
100
Maximize 𝑍 = 4𝑥 + 𝑦 𝑍 = Objective function
80 3𝑥 + 𝑦 = 90
Subject to constraints : 𝑥 ≥ 0 , 𝑦 ≥ 0
𝑥 + 𝑦 ≤ 50 60 𝐶
3𝑥 + 𝑦 ≤ 90
40
𝐵
To find intercept point between 𝑥 + 𝑦 = 50
20
𝑥 + 𝑦 ≤ 50 and 3𝑥 + 𝑦 ≤ 90 𝐴
𝑋
0 20 40 60 80 100
𝑥 + 𝑦 = 50 ⋯ (𝑖)
3𝑥 + 𝑦 = 90 ⋯ (𝑖𝑖)
After solving equation first and second, we get the point is (20,30)
Solve the linear programming problem graphically:
Maximize 𝑍 = 4𝑥 + 𝑦 Subject to constraints : 𝑥 ≥ 0, 𝑦 ≥ 0,
𝑥 + 𝑦 ≤ 50, 3𝑥 + 𝑦 ≤ 90
Solution: 𝑌
100
For bounded feasible region, optimal values occurs
at its corner points. 80 3𝑥 + 𝑦 = 90
40 𝐵(20,30)
Vertex of feasible region Corresponding value of 𝑍 𝑥 + 𝑦 = 50
20
𝑂 0,0 𝑍 = 4×0 + 0 = 0 𝐴
𝑋
𝐴 30, 0 𝑍 = 4×30 + 0 = 120 0 20 40 60 80 100
Double Intercept
Inequalities Equalities form
Shaded region
! $
𝑥 + 2𝑦 ≥ 10 𝑥 + 2𝑦 = 10 '#
+"=1 0 + 2×0 ≥ 10 Opposite to origin side
𝑥≥0
𝑦≥0
! $
3𝑥 + 4𝑦 ≤ 24 3𝑥 + 4𝑦 = 24 + =1 3×0 + 4×0 ≤ 24 Origin side
( )
Solve the linear programming problem graphically :
Minimize 𝑍 = 200𝑥 + 500𝑦 subject to constraints : 𝑥 ≥ 0, 𝑦 ≥ 0,
𝑥 + 2𝑦 ≥ 10, 3𝑥 + 4𝑦 ≤ 24
Solution: 𝑌
Minimize 𝑍 = 200𝑥 + 500𝑦 𝑍 = Objective function 8
6 𝐶(0,6)
Subject to constraints : 𝑥 ≥ 0 ,𝑦 ≥ 0
𝐴(0,5)
𝑥 + 2𝑦 ≥ 10 4 3𝑥 + 4𝑦 = 24
3𝑥 + 4𝑦 ≤ 24 𝐵(4,3)
Origin satisfies 3𝑥 + 4𝑦 ≤ 24, but does not satisfy 2
𝑥 + 2𝑦 = 10
𝑥 + 2𝑦 ≥ 10
𝑋
To find intercept point between 𝑥 + 2𝑦 ≤ 10 and 0 2 4 6 8 10
3𝑥 + 4𝑦 ≤ 24
3𝑥 + 4𝑦 = 24 ⋯ (𝑖)
𝑥 + 2𝑦 = 10 ⋯ (𝑖𝑖)
Step 1 Identify the unknowns in the given LPP. Denote them by 𝑥 & 𝑦.
Step 7 Find the values of 𝑥 & 𝑦 for which the objective function
𝑧 = 𝑎𝑥 + 𝑏𝑦 has maximum or minimum value.
A furniture dealer deals in 2 items chairs or tables. He has Rs 5000 to
invest and a space to store 60 items. A table cost him Rs 250 and chair
Rs 50. He can sell a table at a profit of Rs 50 and a chair at a profit of Rs
15. How should he invest his money in order that he may maximize
the profit. Formulate LPP and solve graphically.
Solution:
Table 250 50
Chair 50 15
Chair 50 15
Subject to constraints:
𝐴 20,0 1000
𝐵 (10,50) 1250
𝐶 (0,60) 900
Solution:
Solution:
Solution:
Subject to constraints : 𝑥 ≥ 0, 𝑦 ≥ 0
𝑥 + 𝑦 ≤ 250 … (𝑖𝑖)
A merchant plans to sell two types of PCs. A desktop model and a portable
model that will cost Rs 25000 and Rs 40000 respectively. He estimated that
the total monthly demand of computers will not exceed 250 units. Determine
the number of units of each type of computers which the merchant should
stock to get maximum profit if he does not want to invest more than Rs 70
lakhs and its profit on desktop model is Rs 4500 and on portable model is Rs
5000. Make an LPP and solve graphically.
Solution: 𝑌
300
Maxmize 𝑍 = 4500𝑥 + 5000𝑦 5𝑥 + 8𝑦 = 1400 𝑥 + 𝑦 = 250
250
200
Subject to constraints : 𝐶(0,175)
150
! $
5𝑥 + 8𝑦 ≤ 1400 + ≤1 100
*(# '+"
! $ 𝐵
𝑥 + 𝑦 ≤ 250 + ≤1 50
*"# *"# 𝑂(0,0) 𝐴 250, 0
𝑋
0 50 100 150 200 250 300
𝑥 ≥ 0, 𝑦 ≥ 0
Solution: 𝑌
100
𝑥 + 𝑦 = 250 ⋯ (𝑖𝑖)
𝐵
50
From 𝑖 − 5× 𝑖𝑖 we get: 𝑂(0,0) 𝐴 250, 0
𝑋
0 50 100 150 200 250 300
3𝑦 = 1400 − 1250
⇒ 3𝑦 = 150 ⇒ 𝑦 = 50
Putting 𝑦 = 50 in 𝑖𝑖 we get 𝑥 = 200 Hence, 𝐵 is 200, 50
A merchant plans to sell two types of PCs. A desktop model and a portable
model that will cost Rs 25000 and Rs 40000 respectively. He estimated that
the total monthly demand of computers will not exceed 250 units. Determine
the number of units of each type of computers which the merchant should
stock to get maximum profit if he does not want to invest more than Rs 70
lakhs and its profit on desktop model is Rs 4500 and on portable model is Rs
5000. Make an LPP and solve graphically.
Solution: 𝑌
100
𝐴 250, 0 1125000
𝐵
50
𝐵(200, 50) 1150000 𝑂(0,0) 𝐴 250, 0
𝑋
0 50 100 150 200 250 300
𝐶(0,175) 875000