OT
OT
& Diagrams! 🔥
💡 Real-World Example:
Imagine you own a bakery 🥐. You make two products:
You have:
Example: Let x be the number of cakes 🎂 and y be the number of cookies 🍪 produced.
3️⃣ Constraints 🔒
🚀 Problem:
Maximize Z = 40x + 30y, subject to constraints:
1️⃣ 2x + y ≤ 10
2️⃣ x + y ≤ 6
3️⃣ x, y ≥ 0
2x + y = 10
x + y = 6
Solve 2x + y = 10 & x + y = 6
Substituting y = 6 - x into 2x + (6 - x) = 10
2x + 6 - x = 10 → x = 4, y = 2
Intersection Point: (4,2)
(0,0) → Z = 0
(0,6) → Z = 30(6) = 180
(4,2) → Z = 40(4) + 30(2) = 160 + 60 = 220 ✅ (Max!)
(5,0) → Z = 40(5) = 200
🔹 Best solution: Produce 4 cakes & 2 cookies for max profit of ₹220! 🎉
The Simplex Method is an iterative approach used to solve Linear Programming Problems (LPP)
when the Graphical Method is not feasible (i.e., when there are more than two variables).
It finds the optimal solution by moving from one vertex of the feasible region to another,
improving the objective function at each step.
Used for:
o ✅ Maximization problems (e.g., Profit Maximization 💰)
o ✅ Minimization problems (e.g., Cost Reduction 💵)
🌍 Real-World Example
🛒 Supermarket Inventory Optimization:
A store sells two products - Chocolates (x₁) and Cookies (x₂). The goal is to maximize profit,
but there are constraints on storage space and budget.
Product Profit per Unit Space Required (sq ft) Budget per Unit ($)
Chocolates (x₁) $5 2 sq ft $3
Cookies (x₂) $3 1 sq ft $2
💡 How many chocolates and cookies should the store sell to maximize profit?
Objective Function:
Constraints:
o Storage Constraint: ⚫ 2x₁ + x₂ ≤ 10
o Budget Constraint: ⚫ 3x₁ + 2x₂ ≤ 8
o Non-Negativity Constraint: ⚫ x₁, x₂ ≥ 0
s₁ 2 1 1 0 10
s₂ 3 2 0 1 8
Z -5 -3 0 0 0
Identify Pivot Column: The most negative value in the last row (-5 in x₁ column).
Identify Pivot Row: Divide RHS by pivot column values.
Row 1 (Storage) 10 / 2 5
Basis x₁ x₂ s₁ s₂ RHS
s₁ 0 1/3 1 -2/3 4
Since no negative values remain in the last row, we have reached the optimal solution! ✅
Optimal Values:
o x₁ = 2.67 (Chocolates)
o x₂ = 4 (Cookies)
Maximized Profit:
o Z = 5(2.67) + 3(4) = 13.33 + 12 = $25.33
✅ The store should sell ~2.67 chocolates and 4 cookies to achieve a maximum profit of $25.33! 🎉
🎯 Summary
✅ Simplex Method is used for solving large-scale optimization problems efficiently. ✅ Slack
variables help in converting inequalities to equations. ✅ Pivoting & row operations ensure
movement toward optimality. ✅ Final solution provides maximum profit (or minimum cost)
along with the best values of variables.
💡 Real-World Applications
✅ Primal Simplex Method is used when the initial basic feasible solution is feasible but not
optimal. ✅ Dual Simplex Method is used when the initial basic feasible solution is not feasible,
but the objective function is optimized.
📌 Real-World Example 🌍
Factory Production Problem 🏭
Product Profit per Unit Wood Required (units) Labor Required (hours)
Tables (x₁) $30 3 units 2 hours
📌 Constraints:
1️⃣ Convert inequalities into equalities using slack variables s1,s2s₁, s₂: 3x1+2x2+s1=183x₁ +
2x₂ + s₁ = 18 2x1+x2+s2=102x₁ + x₂ + s₂ = 10
Basis x₁ x₂ s₁ s₂ RHS
s₁ 3 2 1 0 18
s₂ 2 1 0 1 10
3️⃣ Perform Row Operations to get Pivot = 1 & eliminate other values.
📌 When to Use?
If there is a negative RHS (Right-Hand Side) value in the simplex table, we use Dual Simplex.
Useful when new constraints are added to an already optimized LPP.
Example Scenario:
A company previously optimized production, but due to a shortage of raw materials, the
available stock decreases. This makes the existing solution infeasible (negative RHS values
appear).
👉 We apply Dual Simplex to restore feasibility!
Basis x₁ x₂ s₁ s₂ RHS
s₁ 3 2 1 0 -2 ❌
s₂ 2 1 0 1 10
📌 Summary 🎯
🚀 Primal Simplex: Used when we have feasible solutions but need to optimize.
🚀 Dual Simplex: Used when we have infeasible solutions but need to restore feasibility.