๐ Introduction
In business, supply chains, finance, manufacturing, agriculture, transport, and even daily planning, we constantly face situations where resources are limited. Linear Programming (LP) is one of the most powerful mathematical tools to allocate scarce resources optimally.
From choosing the best product mix, minimizing transportation costs, or optimizing crop planning, LP turns complex decisions into solvable mathematical models.
๐ What is Linear Programming?
Linear Programming (LP) is a mathematical optimization technique used to determine the best possible outcome under a set of linear constraints.
In simple terms:
Linear Programming helps you maximize profit or minimize cost while satisfying certain resource limitations.
๐ฏ Components of a Linear Programming Model
Any LP model consists of four key components:
1๏ธโฃ Decision Variables
These represent the choices to be made.
Example:

2๏ธโฃ Objective Function
This is what you want to maximize (profit) or minimize (cost).
Example:

3๏ธโฃ Constraints
These represent the resource limitations.
Examples:
- Machine hours
- Budget limits
- Labor
- Raw materials
These constraints must be linear, e.g.,

4๏ธโฃ Non-negativity Constraints
Since negative production is impossible:

๐งฑ Mathematical Structure of an LP Model

๐งฎ Solved Example 1: Product Mix Optimization (Graphical Method)
A company produces two products, A and B.
| Resource | Product A | Product B | Availability |
|---|---|---|---|
| Machine Hours | 2 | 3 | 120 |
| Labor Hours | 3 | 2 | 100 |
Profit:
- Product A: โน40
- Product B: โน50

Step 1: Convert constraints to lines


Step 2: Identify corner points
The feasible region corner points are:
- (0, 0)
- (0, 40)
- Intersection of both constraints
- (33.33, 0)
Step 3: Solve intersection point

Step 4: Evaluate objective function
| Point | Profit Z |
|---|---|
| (0, 0) | 0 |
| (0, 40) | 2000 |
| (33.33, 0) | 1333.2 |
| (12, 32) | 40ร12 + 50ร32 = 800 + 1600 = 2400 |
โญ Optimal Solution
Produce:
- 12 units of A
- 32 units of B
Maximum Profit = โน2400
๐งฎ Solved Example 2: Diet Optimization Problem
A person wants to meet nutritional needs at minimum cost.
Food A and B provide nutrients as:
| Nutrient | Food A | Food B | Requirement |
|---|---|---|---|
| Protein | 4 | 2 | โฅ 12 |
| Carbs | 2 | 4 | โฅ 12 |
| Cost | โน6 | โน8 | Minimize |
โ Decision variables
x = units of Food A
y = units of Food B

Solve intersections


Evaluate cost:
- (3,0): 6ร3 = 18
- (0,3): 8ร3 = 24
- (2,2): 6ร2 + 8ร2 = 28
Minimum is actually 18 at (3,0).
โญ Optimal Solution
Eat:
- 3 units of Food A
- 0 units of Food B
Minimum cost = โน18
๐ Applications of Linear Programming
| Industry | LP Application |
|---|---|
| Manufacturing | Product mix, job scheduling |
| Logistics | Transportation & routing |
| Agriculture | Crop planning, fertilizer allocation |
| Energy | Grid optimization |
| Finance | Portfolio optimization |
| Marketing | Budget allocation |
| Healthcare | Staff scheduling, resource planning |
๐ง Solving LP in Python (PuLP)

๐งพ Final Takeaways
โ LP is one of the most widely used optimization tools.
โ Helps allocate limited resources optimally.
โ Works best when relationships are linear.
โ Solvable using both graphical method (2 variables) and Simplex Method (many variables).
๐ Further Reading
- Fred Hillier & Gerald Lieberman โ Introduction to Operations Research
- Bazaraa, Jarvis & Sherali โ Linear Programming and Network Flows
- Winston โ Operations Research: Applications and Algorithms









Leave a comment