Grade 12

Grade 12Linear Programming


Graphical Method


Linear Programming (LP) is a mathematical technique used to optimize a linear objective function, subject to linear equality and linear inequality constraints. The objective function is a formula that needs to be maximized or minimized. The graphical method is one of the simplest methods to solve a linear programming problem and is useful for understanding the basic concepts. It is a way to solve LP problems with two variables through visual representation. Let us understand the graphical method in detail with examples.

Understanding the problem

In linear programming, a common problem is to choose the best combination of two activities to maximize or minimize some outcome. These activities can be anything you want to manage, such as production volume, working hours, or even investment volume.

Objective function

The objective function in a linear programming problem is the function we want to optimize to achieve maximum profit or minimum cost. It is generally written as:

Z = ax + by

Here, Z is the objective you are trying to achieve, x and y are the decision variables, and a and b are constants that give the weightage of each variable in achieving the objective.

Restrictions

Constraints in a linear programming problem are limits or restrictions on the decision variables. These can be inequalities that restrict the values that x and y can take. For example:

2x + 3y ≤ 12
x + y ≥ 3
x ≥ 0
y ≥ 0

Inequalities represent conditions that must be met for a solution to be considered feasible.

Graphical method

The graphical method involves plotting each constraint on a graph, resulting in a feasible region. The optimal solution lies on the boundary of this feasible region. Here is a step-by-step method of solving LP problems using the graphical method:

Step 1: Plot the constraints

Each constraint is an inequality that can be plotted as a straight line on a 2-dimensional graph (if you have two decision variables). For example, consider the constraints:

  • 2x + 3y ≤ 12
  • x + y ≥ 3
  • x ≥ 0
  • y ≥ 0

We can graph these constraints by turning inequalities into equalities to find the lines:

2x + 3y = 12
x + y = 3

Now find the intercepts of these lines. For example, let's find the intercepts for the first condition:

  • Y-intercept: Set x = 0: 3y = 12, so y = 4.
  • X-intercept: Set y = 0: 2x = 12, so x = 6.

These intermediate steps will be performed for both constraints before plotting them.

The lines on the graph will look something like this:


  
  
  
  2x + 3y = 12
  
  x + y = 3

Step 2: Determine the feasible area

Once all the lines are drawn, the feasible region is the common area where all the constraints overlap. This region represents all the possible solutions that satisfy all the constraints. It is usually a polygon or an intersection region created by the intersection of the half-planes created by the inequalities.

Shade or highlight this area on your graph, as it will be important for finding the optimal point.

Step 3: Find the vertex point

The feasible region is defined by its vertex points or corners of the polygon. Each vertex can be identified by solving the linear equations that intersect at that point. These vertices are the possible candidates for the solution.

For example, if two lines cross, solve two matching equations:

2x + 3y = 12
x + y = 3

By solving these equations simultaneously, you can find the intersection points. Repeat this process to find all the vertices of the feasible region.

Step 4: Evaluate the objective function at each vertex

The next step involves evaluating the objective function at each vertex of the feasible region. Substitute the (x, y) values of each vertex into the objective function:

Z = ax + by

Calculate the value of Z at each vertex to find which point maximizes or minimizes the objective function as required.

For example, if your vertices are (x1, y1), (x2, y2), (x3, y3), etc., calculate:

  • Z1 = ax1 + by1
  • Z2 = ax2 + by2
  • Z3 = ax3 + by3

The optimal solution is the vertex that provides the maximum or minimum value of Z depending on the problem.

Step 5: Explain the solution

The final step is to interpret the solution in the context of the original problem, translating the mathematical solution back into real-world terms. For example, if you were solving for the optimal production quantity, the solution gives the best quantity to achieve the desired objective.

Example problem

Let us solve a sample problem using the graphical method to illustrate the steps.

Description of the problem:

A company produces two products, P1 and P2, on which there is a profit of $3 and $5 per unit, respectively. The company wants to maximize profit. The production of these products is subject to the following constraints:

  • Each unit of P1 takes 1 hour to process, and each unit of P2 takes 2 hours. The total available processing time is 10 hours.
  • Each unit of P1 takes 4 hours of machine time, and each unit of P2 takes 3 hours. The total available machine time is 12 hours.
  • Non-negativity constraints: P1 ≥ 0, P2 ≥ 0.

The formal linear programming model would be:

  • Objective Function: Z = 3P1 + 5P2 (Maximize Profit)
  • Restrictions:
    • P1 + 2P2 ≤ 10
    • 4P1 + 3P2 ≤ 12
    • P1 ≥ 0
    • P2 ≥ 0

Designing the obstacles

Convert inequalities to equalities and find the intercepts to plot on the graph:

P1 + 2P2 = 10
  • Intercepts: (10, 0), (0, 5)
4P1 + 3P2 = 12
  • Intercepts: (3, 0), (0, 4)

Plot the lines and identify the feasible region.


  
  
  
  p1 + 2p2 = 10
  
  4p1 + 3p2 = 12

Finding the feasible region

Identify the feasible region where both the conditions are satisfied along with the non-negativity conditions. This region is a polygon formed within the intersection of these conditions on the graph.

Top point

Calculate the intersection points, by solving the constraints simultaneously:

P1 + 2P2 = 10
4P1 + 3P2 = 12

Solution:

To eliminate P2, multiply the first equation by 3 and the second by 2:

3P1 + 6P2 = 30
8P1 + 6P2 = 24

Subtract the equation:

-5P1 = 6
P1 = 1.2

Substitute P1 into one of the original equations to obtain P2:

1.2 + 2P2 = 10
2P2 = 8.8
P2 = 4.4

Thus, there is a point (1.2, 4.4) Find all possible vertex points through similar calculations.

Evaluating the objective function

Calculate the objective function Z = 3P1 + 5P2 at each vertex.

  • At (0, 0): Z = 3(0) + 5(0) = 0
  • At (10, 0): Z = 3(10) + 5(0) = 30
  • At (0, 4): Z = 3(0) + 5(4) = 20
  • At (1.2, 4.4): Z = 3(1.2) + 5(4.4) = 3.6 + 22 = 25.6

Conclusion

The highest value of Z occurs at (10, 0). Therefore, the optimal profit-maximizing solution is to produce 10 units of P1 and 0 units of P2.

In conclusion, the graphical method provides a clear visual approach to understanding how changes affect the system and is an excellent way to introduce the concepts of feasibility and optimization. It is limited to problems with two decision variables because visualization becomes impractical with more than two dimensions.


Grade 12 → 4.1


U
username
0%
completed in Grade 12


Comments