0% found this document useful (0 votes)
3 views7 pages

OT

Linear Programming (LP) is a mathematical method used to maximize profit or minimize costs under constraints, commonly applied in business and manufacturing. The document explains key components of LP, including decision variables, objective functions, constraints, and methods like the graphical and Simplex methods for solving LP problems. It also discusses real-world applications and examples, illustrating how to optimize production and resource allocation effectively.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views7 pages

OT

Linear Programming (LP) is a mathematical method used to maximize profit or minimize costs under constraints, commonly applied in business and manufacturing. The document explains key components of LP, including decision variables, objective functions, constraints, and methods like the graphical and Simplex methods for solving LP problems. It also discusses real-world applications and examples, illustrating how to optimize production and resource allocation effectively.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

🔥 Linear Programming (LP) Explained with Real-World Examples, Numerical Problems

& Diagrams! 🔥

📌 What is Linear Programming (LP)?

Linear Programming is a mathematical technique used to maximize profit 💰 or minimize cost 💸


under given constraints. It’s widely used in business, manufacturing, and transportation to
make the best possible decisions! 🚀

💡 Real-World Example:
Imagine you own a bakery 🥐. You make two products:

 Cakes 🎂 (profit ₹40 per unit)


 Cookies 🍪 (profit ₹30 per unit)

You have:

 Flour constraint: Max 10 kg available


 Sugar constraint: Max 6 kg available

Your goal? Maximize profit while staying within resource limits! ✅

📌 Key Components of LP:

1️⃣ Decision Variables 🤔

 Example: Let x be the number of cakes 🎂 and y be the number of cookies 🍪 produced.

2️⃣ Objective Function 🎯

 Formula to maximize or minimize (e.g., profit, cost).


 Example: Maximize Z=40x+30y\text{Maximize } Z = 40x + 30yMaximize Z=40x+30y
 Here, Z is the total profit in ₹.

3️⃣ Constraints 🔒

 Resource limitations (e.g., flour, sugar availability).


 Example:
o 2x + y ≤ 10 (Flour constraint)
o x + y ≤ 6 (Sugar constraint)
o x, y ≥ 0 (You can’t make negative cakes or cookies!)

4️⃣ Feasible Region 📊

 The area where all constraints overlap, giving possible solutions.

📌 Graphical Method to Solve LP (with Diagram 📈)

🔹 Step 1: Plot the constraint lines.


🔹 Step 2: Identify the feasible region (common shaded area).
🔹 Step 3: Find the corner points (intersections).
🔹 Step 4: Calculate Z for each point to find the optimal solution.

📝 Example Numerical Problem & Solution (With Diagram)


Let’s solve the bakery problem using graphical method! 📊

🚀 Problem:
Maximize Z = 40x + 30y, subject to constraints:
1️⃣ 2x + y ≤ 10
2️⃣ x + y ≤ 6
3️⃣ x, y ≥ 0

✅ Solution (Graphical Method)

1️⃣ Plot constraints (Turn inequalities into equations):

 2x + y = 10
 x + y = 6

2️⃣ Find intersection points:

 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)

3️⃣ Check Corner Points:

 (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! 🎉

🚀 Simplex Method (For Large-Scale Problems) 🏆

📌 What is the Simplex Method?

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

 Total storage available: 10 sq ft


 Total budget available: 8 dollars

💡 How many chocolates and cookies should the store sell to maximize profit?

🏆 Steps to Solve Using the Simplex Method

1️⃣ Convert Constraints into Equations

We set up the Objective Function and Constraints:

 Objective Function:

⚫ Maximize Z = 5x₁ + 3x₂

 Constraints:
o Storage Constraint: ⚫ 2x₁ + x₂ ≤ 10
o Budget Constraint: ⚫ 3x₁ + 2x₂ ≤ 8
o Non-Negativity Constraint: ⚫ x₁, x₂ ≥ 0

2️⃣ Convert Inequalities into Equations (Slack Variables)

We introduce slack variables s₁ and s₂:

 Storage Equation: ⚫ 2x₁ + x₂ + s₁ = 10


 Budget Equation: ⚫ 3x₁ + 2x₂ + s₂ = 8

Now, the Objective Function becomes:

⚫ Maximize Z = 5x₁ + 3x₂ + 0s₁ + 0s₂

3️⃣ Set Up the Initial Simplex Table 📊


Basis x₁ x₂ s₁ s₂ RHS

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 Calculation Value

Row 1 (Storage) 10 / 2 5

Row 2 (Budget) 8 / 3 2.67 ✅


👉 Pivot Row = Row 2 (Budget Constraint)

👉 Pivot Element = 3 (at intersection of x₁ and Budget row)

4️⃣ Perform Row Operations

 Make Pivot Element = 1 by dividing Row 2 by 3.


 Make all other elements in that column = 0 using row operations.

📆 Updated Simplex Table After Iteration 1

Basis x₁ x₂ s₁ s₂ RHS

s₁ 0 1/3 1 -2/3 4

x₁ 1 2/3 0 1/3 8/3

Z 0 -5/3 0 5/3 40/3

5️⃣ Checking Optimality

Since no negative values remain in the last row, we have reached the optimal solution! ✅

🌟 Interpretation of the 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

✔ Production planning in industries 🏭 ✔ Logistics & supply chain management 🚚 ✔


Investment portfolio optimization 📈 ✔ Workforce scheduling 🏢

💥 Want More? Let me know if you need:

 📖 More numerical problems solved step by step


 🗒 Additional diagrams for better understanding
 🤓 Dual Simplex Method explanation

🚀 Let's master Linear Programming & Optimization!

🚀 Primal & Dual Simplex Method 🏆

📌 What is the Primal & Dual Simplex Method?


When solving Linear Programming Problems (LPPs), sometimes we face constraints that make
the Simplex Method difficult to apply. This is where Primal and Dual Simplex Methods come in.

✅ 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.

🚀 Both methods help in solving LPP efficiently!

📌 Real-World Example 🌍
Factory Production Problem 🏭

A furniture factory manufactures Tables (x₁) and Chairs (x₂).

 🔹 Each product requires wood and labor, which are limited.


 🔹 The goal is to maximize profit while considering these constraints.

Product Profit per Unit Wood Required (units) Labor Required (hours)
Tables (x₁) $30 3 units 2 hours

Chairs (x₂) $20 2 units 1 hour

Total wood available: 18 units


Total labor available: 10 hours

📌 Objective Function (Maximize Profit):

Z=30x1+20x2Z = 30x₁ + 20x₂

📌 Constraints:

3x1+2x2≤18(Wood Constraint)3x₁ + 2x₂ \leq 18 \quad \text{(Wood Constraint)}


2x1+x2≤10(Labor Constraint)2x₁ + x₂ \leq 10 \quad \text{(Labor Constraint)} x1,x2≥0(Non-
Negativity)x₁, x₂ \geq 0 \quad \text{(Non-Negativity)}

📌 Primal Simplex Method 🏆


👉 Used when we have a feasible solution but need to optimize it.

🔹 Steps to Solve Using the Primal Simplex Method

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

2️⃣ Set Up Initial Simplex Table 📊

Basis x₁ x₂ s₁ s₂ RHS

s₁ 3 2 1 0 18

s₂ 2 1 0 1 10

Z (Profit) -30 -20 0 0 0


 🔹 Pivot column = Column with most negative coefficient in the Z row (x₁ = -30)
 🔹 Pivot row = Smallest RHS / Pivot column value (Row 2 wins: 10/2 = 5)

3️⃣ Perform Row Operations to get Pivot = 1 & eliminate other values.

4️⃣ Repeat iterations until all Z row values are non-negative.

✅ Final Solution: x1=4,x2=2,Zmax=180x₁ = 4, \quad x₂ = 2, \quad Z_{max} = 180 🔹 Optimal


solution found! 🚀

📌 Dual Simplex Method 🏆


👉 Used when an LPP has an infeasible initial solution but an optimal Z function.
👉 Works by converting an infeasible problem into a feasible one by adjusting basic variables.

📌 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.

🔹 Steps to Solve Using the Dual Simplex Method

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!

1️⃣ Identify a Negative RHS Value

Basis x₁ x₂ s₁ s₂ RHS

s₁ 3 2 1 0 -2 ❌

s₂ 2 1 0 1 10

Z (Profit) -30 -20 0 0 0

2️⃣ Select Pivot Column & Row

 🔹 Choose most negative RHS (s₁ row)


 🔹 Find Pivot Column using the most negative ratio

3️⃣ Perform Row Operations

 Convert Pivot Element to 1


 Make all other values in that column 0

4️⃣ Repeat Until All RHS Values are Non-Negative ✅

✅ Final Solution: x1=5,x2=1,Zmax=170x₁ = 5, \quad x₂ = 1, \quad Z_{max} = 170

📌 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.

✅ Applications in Real Life: ✔ Resource Allocation in factories 🏭


✔ Optimizing Workforce Schedules 🏢
✔ Minimizing Costs in Logistics 🚛
✔ Portfolio Management in Finance 📈

You might also like