Basic MathematicsUnit 69 min read
Linear Programming and Optimization: Models, Methods, and Applications
Unit 6 of Basic Mathematics: This note covers linear programming fundamentals, graphical and simplex solution techniques, duality, and real‑world applications such as production planning, transportation, and portfolio optimisation.
Key points
- Linear programming models maximise or minimise a linear objective subject to linear constraints.
- Feasible region is a convex polytope; optimal solutions lie at its vertices.
- The simplex algorithm transforms the problem into a tableau and performs pivot operations to reach optimality.
- Duality provides economic interpretation of shadow prices and bounds.
- Graphical method is limited to two variables; simplex and interior‑point methods handle large‑scale problems.
1. Introduction
Linear programming (LP) is a mathematical framework for making optimal decisions when resources are limited. An LP problem consists of:
- Decision variables – quantities to determine.
- Objective function – to maximise or minimise.
- Constraints (or , ).
- Non‑negativity .
The set of all satisfying the constraints is called the feasible region. Because all constraints are linear, the feasible region is a convex polytope. The optimal solution, if it exists, occurs at a corner point (vertex) of this polytope.
2. Standard and Canonical Forms
| Form | Description | Example |
|---|---|---|
| Standard form | All constraints are and all variables . | s.t. . |
| Canonical form | All constraints are equalities with slack/surplus variables. | s.t. . |
Transforming to canonical form introduces slack variables for constraints, surplus variables for constraints, and artificial variables for constraints when needed.
3. Graphical Method (Two Variables)
The graphical method is intuitive for problems with only two decision variables. Steps:
- Plot each constraint as a line on the - plane.
- Identify the feasible region (intersection of half‑planes).
- Evaluate the objective function at each vertex of the feasible region.
- Choose the vertex giving the best objective value.
3.1 Worked Example
Problem
A factory produces two products, and .
- Profit: .
- Constraint 1 (raw material): .
- Constraint 2 (labor): .
- Non‑negativity: .
Solution
Plot constraints
Vertices
- (intersection with )
- (intersection with )
- (intersection of the two constraints)
- Objective values
| Vertex | |||
|---|---|---|---|
| 0 | 0 | 0 | |
| 4 | 0 | 16 | |
| 0 | 2 | 6 | |
| 2 | 2 | 14 |
- Optimal solution: with maximum profit .
4. Simplex Method
The simplex method is an algorithmic procedure that moves from one basic feasible solution (BFS) to an adjacent one, improving the objective at each step until optimality is reached.
4.1 Simplex Tableau
A tableau is a tabular representation of the LP in canonical form. Each row corresponds to a constraint, and the last row represents the negative of the objective function.
Example Tableau (for the problem above after adding slack variables )
4.2 Pivot Operations
- Entering variable: column with most negative coefficient in the objective row (here with ).
- Leaving variable: row with the smallest non‑negative ratio .
- Pivot: perform row operations to make the pivot element 1 and other entries in the column 0.
Repeat until no negative coefficients remain in the objective row.
4.3 Mermaid Diagram of Simplex Flow
flowchart TD A["Start: Form canonical tableau"] --> B["Check for optimality"] B -->|"Yes"| C["Optimal solution found"] B -->|"No"| D["Select entering variable (most negative)"] D --> E["Select leaving variable (minimum ratio)"] E --> F["Pivot to update tableau"] F --> B
5. Duality
Every LP (primal) has an associated dual problem. If the primal is a maximisation, the dual is a minimisation, and vice versa. Dual variables correspond to the constraints of the primal and represent shadow prices – the marginal value of relaxing a constraint by one unit.
5.1 Dual of the Example
Primal (P):
Dual (D):
Solving the dual yields , giving the same optimal value . The shadow prices indicate that increasing the right‑hand side of constraint 1 by one unit would increase the maximum profit by 1 unit.
6. Comparison of Solution Methods
| Method | Problem Size | Strengths | Weaknesses |
|---|---|---|---|
| Graphical | ≤ 2 variables | Intuitive, visual | Not scalable |
| Simplex | Small to medium | Exact, efficient for sparse problems | Can cycle; requires pivot rules |
| Interior‑Point | Large, dense | Polynomial time, good for huge problems | Requires advanced software |
7. Advantages and Disadvantages
| Aspect | Advantages | Disadvantages |
|---|---|---|
| Modeling | Captures linear relationships; easy to formulate | Cannot model nonlinearities or discrete decisions without extensions |
| Solution | Simplex is robust for many practical problems | May be slow for very large or degenerate problems |
| Interpretation | Dual prices give economic insight | Requires understanding of duality concepts |
8. Applications
| Domain | LP Use | Example |
|---|---|---|
| Manufacturing | Production planning | Allocate raw materials to maximize profit |
| Transportation | Routing & scheduling | Minimise shipping cost between warehouses and stores |
| Finance | Portfolio optimisation | Maximise return subject to risk constraints |
| Telecom | Bandwidth allocation | Maximise throughput under capacity limits |
| Healthcare | Staff scheduling | Minimise cost while meeting coverage requirements |
9. In the Real World
| Product | Idea Used | How It Works |
|---|---|---|
| eSewa | Linear programming for fee optimisation | eSewa adjusts transaction fees based on network load and transaction volume, modelled as an LP to maximise revenue while keeping fees competitive. |
| Daraz | Order‑queue scheduling | Daraz uses LP to assign delivery slots to orders, minimising total delivery time while respecting courier capacity constraints. |
| Ncell | Network bandwidth allocation | Ncell solves an LP to allocate bandwidth to different services (voice, data, IoT) to maximise overall throughput under infrastructure limits. |
| NEPSE | Portfolio optimisation | NEPSE analysts use LP to construct portfolios that maximise expected return for a given risk level, subject to regulatory constraints. |
Worked real‑world example – Daraz delivery scheduling:
- Decision variables : 1 if order is assigned to courier , 0 otherwise.
- Objective: minimise where is delivery cost.
- Constraints: each order assigned to exactly one courier; each courier’s capacity not exceeded.
- Solved by simplex to find the cheapest assignment.
10. Real Pictures
Transportation problem network diagram (Image: Михајло Анђелковић, CC BY-SA 3.0, via Wikimedia Commons)
11. Exam Tip
- Formulate correctly – always write the problem in canonical form before applying simplex.
- Check feasibility – ensure all RHS values are non‑negative; if not, use two‑phase simplex.
- Track basic variables – keep a clear list of basic variables to avoid mistakes in pivoting.
- Dual interpretation – be ready to explain shadow prices and their economic meaning.
- Practice small problems graphically – they often appear in exams to test conceptual understanding.
Good luck!
In the real world
eSewa uses linear programming for dynamic fee optimization to adjust transaction fees in real-time based on network load and user demand. The objective function maximizes revenue while keeping fees competitive, with constraints on transaction volume and user experience thresholds. The dual solution reveals the marginal impact of increasing transaction limits on revenue.
Daraz applies simplex method for order routing optimization to assign delivery slots to couriers. Each order is a variable, and constraints include courier capacity, delivery time windows, and customer priorities. The optimal solution minimizes total delivery time while respecting all constraints.
Ncell employs duality theory in network bandwidth allocation to balance data, voice, and IoT traffic. The primal problem maximizes throughput, while the dual provides shadow prices indicating how much additional revenue each unit of bandwidth would generate, guiding infrastructure investments.
Based on the TU BITM syllabus for Basic Mathematics (MTH204), unit 6.
Discussion
Loading…