Maths Mathematics

MathematicsUnit 1710 min read

Linear Programming: Simplex Method – Graphs, Tables & Optimization

Unit 17 of Mathematics teaches how to solve real-world problems using the Simplex Method, a step-by-step algebraic technique for maximizing or minimizing linear functions under constraints. You’ll learn to convert word problems into standard form, graph feasible regions, and use the simplex tableau to find optimal solu

What is Linear Programming?

Linear programming (LP) is a mathematical method to find the best possible outcome (maximum profit, minimum cost, etc.) in a problem where:

  • The objective function (what you want to maximize/minimize) is linear.
  • The constraints (limitations) are also linear inequalities.
12345678123456xy(0,5)(6,0)(4,3)
Feasible region for a simple LP problem (2 variables)

Key Terms:

  • Objective Function: The function to maximize (e.g., profit) or minimize (e.g., cost).
  • Constraints: Restrictions (e.g., time, resources, demand).
  • Feasible Region: The area where all constraints are satisfied (shaded region in graphs).
  • Optimal Solution: The best value of the objective function within the feasible region.

Step 1: Formulating the Problem

Before solving, we must write the problem mathematically.

Example Problem:

A factory produces two products, A and B. Each unit of A requires 2 hours of labor and 1 kg of material, while B requires 1 hour of labor and 3 kg of material. The factory has 100 hours of labor and 150 kg of material available. If A gives a profit of Rs. 40 and B gives Rs. 30, how many units of A and B should be produced to maximize profit?

Solution:

  1. Define Variables: Let = number of units of A Let = number of units of B

  2. Objective Function: Maximize (Profit)

  3. Constraints:

    • Labor:
    • Material:
    • Non-negativity:

Step 2: Graphical Method (For 2 Variables)

If the problem has only 2 variables, we can solve it by graphing.

12345678123456xyA(0,5)B(6,0)C(4,3)O(0,0)
Graphical solution: Feasible region (shaded) and corner points

Steps:

  1. Plot the constraints as lines (treat inequalities as equalities first).
  2. Shade the feasible region (area satisfying all constraints).
  3. Find corner points (vertices of the feasible region).
  4. Evaluate the objective function at each corner point.
  5. The best value is at one of these points.

Worked Example:

Solve the above problem graphically.

Step 1: Plot Constraints

  • Labor Constraint:
    • When ,
    • When ,
  • Material Constraint:
    • When ,
    • When ,

Step 2: Find Corner Points

The feasible region is a polygon with vertices at:

  1. (Intersection of -axis and material constraint)
  2. (Intersection of labor and material constraints)

Step 3: Evaluate Objective Function

Corner Point

Maximum Profit = Rs. 2200 at .


Step 3: Simplex Method (For 3+ Variables)

When there are more than 2 variables, we use the Simplex Method, an algebraic approach.

Standard Form Requirements:

  1. Objective function must be maximization (if minimization, multiply by -1).
  2. All constraints must be ≤ inequalities.
  3. All variables must be ≥ 0.
  4. Add slack variables to convert inequalities to equalities.

Example Problem (3 Variables):

Maximize Subject to:

Step 1: Convert to Standard Form

Add slack variables :

Step 2: Initial Simplex Tableau

Write the tableau:

Basis RHS
1 1 1 1 0 10
2 1 0 0 1 8
-3 -2 -4 0 0 0

Step 3: Identify Pivot Column and Row

  • Pivot Column: Most negative in -row → (coefficient -4).
  • Pivot Row: Smallest positive ratio :
    • (for )
    • (for ) → Choose row.

Step 4: Perform Row Operations

Make the pivot element (2 in -row) equal to 1:

  • Divide -row by 2: -row:

Now, eliminate other entries in the pivot column:

  • Subtract -row from -row: -row:
  • Add -row to -row: -row:

Final Tableau:

Basis RHS
0 0.5 1 1 -0.5 6
1 0.5 0 0 0.5 4
5 0 -4 0 2 16

Step 5: Check for Optimality

  • If all coefficients in -row are ≥ 0, the solution is optimal.
  • Here, has a negative coefficient (-4), so we repeat the process.

Step 6: Next Iteration

  • Pivot column: (coefficient -4).
  • Pivot row: (for ).
  • Perform row operations to get the final tableau.

Final Solution:

After iterations, we get:

  • , ,
  • Maximum

Comparison: Graphical vs. Simplex Method

Feature Graphical Method Simplex Method
Variables Only 2 variables 3 or more variables
Steps Plot and shade Algebraic tableau
Speed Slower for complex problems Faster for large problems
Accuracy Depends on graphing Always precise
Use Case Simple problems Industrial/real-world problems
00.751.52.253Graphical Method2Simplex Method3Number of Variables Handled
Comparison: Graphical (2 variables) vs. Simplex (3+ variables)

Advantages and Disadvantages

Advantages of Linear Programming:

  • Efficient: Finds optimal solutions quickly.
  • Versatile: Used in business, engineering, economics.
  • Scalable: Works for large problems (thousands of variables).

Disadvantages:

  • Assumptions: Requires linearity (real problems may be nonlinear).
  • Complexity: Simplex method can be tedious for large problems (computer software is used in practice).
  • Integer Solutions: May not give whole numbers (requires Integer Programming).

Applications of Linear Programming

  1. Business: Maximizing profit, minimizing cost.
  2. Transportation: Optimal routing for delivery trucks.
  3. Agriculture: Allocating resources for maximum crop yield.
  4. Manufacturing: Scheduling production to meet demand.
  5. Diet Planning: Minimizing cost while meeting nutritional needs.

Exam Tip

What to Expect in NEB Exams:

  1. Problem Formulation:

    • You may be given a word problem and asked to write the objective function and constraints.
    • Example Question: "A company produces two products. Product X requires 3 hours of labor and Product Y requires 2 hours. The company has 120 hours available. If X gives a profit of Rs. 50 and Y gives Rs. 40, formulate the problem to maximize profit."
  2. Graphical Solution:

    • You may be asked to graph the feasible region and find the optimal solution.
    • Example Question: "Solve graphically: Maximize subject to , , , ."
  3. Simplex Method:

    • You may be given a tableau and asked to perform row operations to find the optimal solution.
    • Example Question: "Solve using the simplex method: Maximize subject to , , . Show the final tableau."
  4. Interpretation:

    • You may be asked to explain the meaning of the solution (e.g., "How many units should be produced?").
    • Example Question: "In the above problem, what is the maximum profit, and how many units of each product should be produced?"

Common Mistakes to Avoid:

  • Forgetting slack variables in the simplex method.
  • Incorrect pivot selection (always choose the most negative in the -row).
  • Not checking optimality (if negative coefficients remain, the solution is not optimal).
  • Misplotting constraints in the graphical method (always shade the correct region).

Practice Questions (NEB Style)

  1. Formulation: A farmer has 100 hectares of land. He can grow wheat or rice. Wheat requires 2 workers per hectare and rice requires 3 workers per hectare. The farmer has 240 workers. If the profit per hectare is Rs. 500 for wheat and Rs. 600 for rice, formulate the problem to maximize profit.

  2. Graphical Solution: Solve graphically: Maximize Subject to:

  3. Simplex Method: Solve using the simplex method: Maximize Subject to:

  4. Interpretation: A company produces two products, A and B. The profit for A is Rs. 3 per unit and for B is Rs. 5 per unit. The constraints are: (labor) (material)

    • Formulate the problem.
    • Solve graphically.
    • What is the maximum profit, and how many units of A and B should be produced?

Summary

  • Linear programming helps find the best solution under given constraints.
  • For 2 variables, use the graphical method.
  • For 3+ variables, use the simplex method.
  • Always check optimality and interpret the solution correctly.
  • Practice formulating problems from word descriptions.

Good luck with your NEB exam! 🚀

Based on the NEB +2 Science syllabus for Mathematics (Maths), unit 17.

Discussion

Loading…