LP - Graphical Method
LP - Graphical Method
Graphical Method
This learning material about linear programming involves graphical method in solving
optimization (maximize or minimize) problems that comprise linear inequality constraints.
Graphs of system of linear inequalities will be discussed and will be used in solving linear
programs.
This includes the following topics:
Lesson 1
System of linear Inequalities in Two Variables
Many applications of mathematics can have more than one solution or infinitely many
solutions. In fact, the solution to some problems may be represented as a region in a Cartesian
plane. For instance, we are to take two numbers such that their sum exceeds 20, we can have
many possible solutions, we can have pairs of numbers whose sum is 21, 22, and so on. This
kind of problem involves inequality. There are also instances that problems involve more than
one condition, say aside from the condition that the sum of the numbers exceeds 20, another
condition is to be considered, say we state the problem as, the difference of the two numbers is
less than 10 but their sum is exceeds 20. Then still we will have many solutions for it. If the
problem already consists of more than one linear inequality condition, we call it as system of
linear inequality which the concern of this section.
Definition
Let a line divide the plane into half. Each side of the line is called a half-plane. The line
serves as the boundary of the half-planes. That is, let l be a line in the plane and M and N be the
division of the plane, then M and N are half-planes.
LINEAR PROGRAMMING
If l is a vertical line, then M and N are the left and right half-planes.(figure 1)
If l is non-vertical line, then M and N are the upper and lower half-planes.(figure 2,
3, 4)
y y
M M
l l
upper half- upper half-
plane plane
y l N
x lower half- x
N
M N lower half- y plane
figure 3
left half- right half- figureplane
2
plane x plane
M
upper half-plane
l
figure 1 N x
lower half-plane
figure 4
Graphing a linear inequality in two variables involves visually showing all the points
that satisfy the inequality (e. i., solution set). Such a graph will be a half-plane.
The four kinds of inequalities that can arise are as follows:
Ax + By < C; Ax + By C; Ax + By > C; Ax + By C
proceed as follows:
1. Graph the corresponding equation Ax + By = C. Use dashed for line in the < and > cases,
and a solid line in the and cases.
2. The solution set is the half-plane on one side of the boundary line. To determine which
side, choose a test point P(a, b) not on the line and check to see if the coordinates a and
b satisfy the given inequality.
To illustrate how to graph linear inequality in two variables, consider the example given below.
LINEAR PROGRAMMING
Example:
1. Graph the inequality x – 2y > 6.
Solution:
First consider the related equation x – 2y = 6 to determine the boundary line.
We can use the intercepts of the line to sketch the line.
Setting y = 0, and setting x = 0
x – 2(0) = 6 0 – 2y = 6
x=6 -2y = 6
y = -3
We obtain the x-intercept (6, 0) and y-intercept (0, -3).
The inequality involves >, thus the half-plane is open and we use dashed line to draw
the boundary line
y
5
x - 2y = 6
0 x
-15 -1 0 -5 0 5 10 15
-5
To determine which side is the solution set, we pick a “test” point P off the line and
check to see if the coordinates of P satisfy the given inequality.
Suppose that we pick P(0, 0)
Then 0 – 2(0) = 0 < 6
P(0, 0) does not satisfy the inequality, hence all points in the half-plane(upper half-
plane) containing (0, 0) do not satisfy the inequality.
This means that the solution set is the set containing points in the lower half-plane, but
not including, the boundary line x – 2y = 6. This is the shaded region below.
5
x - 2y = 6
0 x
-15 -1 0 -5 0 5 10 15
-5
LINEAR PROGRAMMING
Example:
2. Graph each of the following inequality.
a. 2x + y < 4 b. 2x – 3y 6 c. 3x + y 9
Solutions:
a. Let us graph first 2x + y = 4.
Thus we have
y
2x + y = 4
5
0 x
-15 -1 0 -5 0 5 10 15
-5
0 x
-15 -1 0 -5 0 5 10 15
-5
2x + y = 4
b. Let us graph first 2x – 3y = 6 .
Thus we have 2x – 3y = 6
y
0 x
-15 -1 0 -5 0 5 10 15
-5
Thus the solution set is the half-plane were P(0, 0) is not positioned, lower half-plane.
LINEAR PROGRAMMING
y
0 x
-15 -1 0 -5 0 5 10 15
-5
2x – 3y
=6
c. Let us graph first 3x + y = 9.
Thus we have
y
3x + y = 9
5
0 x
-15 -1 0 -5 0 5 10 15
-5
Thus the solution set is the half-plane were P(0, 0) is located, lower half-plane.
y
0 x
-15 -1 0 -5 0 5 10 15
-5
3x + y 9
Definition
Two of more linear inequalities that are conditions imposed simultaneously on all
variables, but may of may not have common solutions are called simultaneous linear inequality
or system of linear inequalities.
To find the solution set of a system of linear inequalities, we find first all the set of
points that satisfy all the inequalities in the system simultaneously. The solution set will be a
region of the plane, which refer to as feasibility region for the system of inequalities.
To obtain the feasibility region, we graph the individual inequalities in the system on
the same coordinate plane. The solution set or the feasibility region will be the intersection of
the individual graphs of the linear inequalities.
LINEAR PROGRAMMING
Below are some examples to illustrate how to find solution set of systems of linear
inequalities.
Example:
x+ y ≥ 3
1. Find the solution set of {x− y≥3
.
Solutions:
To find the solution set of the system, we graph the solution of the two inequalities in a
single plane, the intersection of the graphs is the solution to the system.
5 5
0 x 0 x
-1 0 -5 0 5 10 -1 0 -5 0 5 10
-5 -5
The intersection of the two graphs above is the solution to the system which is shown below.
Corner point
(3, 0)
x
0 Feasibility region
-15 -10 -5 0 5 10 15
-5
The points in a feasibility region where two of its boundary lines intersect plays a useful role in
linear programming.
Definition
A corner point of a particular feasibility region is a point where two of its boundary
lines intersect.
For instance, in the previous example, the corner point is (3, 0).
LINEAR PROGRAMMING
The graph if x <4 is given below. The graph if y <6 is given below.
y y
4 6
2
4
0 x
-4 -3 -2 -1 0 1 2 3 4 2
-2
0 x
-1 0 1 2 3 4 5 6
-4
The intersection of the two graphs above is the solution to the system which is shown
below.
y
6
Corner point
2 Feasibility region (4, 6)
0 x
-1 0 1 2 3 4 5 6
Corner
2 point Feasibility
region
(2, -1)
0 x
-2 -1 0 1 2 3 4 5 6
-2
y >2
4. Find the solution set of
{
x< 1 .
y−2 x ≤ 2
4
Corner point
(0, 1);(1, 2);(1, 4)
Feasibility
region
2
0 x
-2 -1 0 1 2 3 4 5 6
-2
x + y >3
5. Find the solution set of
{ y −2 x ≥ 0 .
x−2 y+ 6≤ 0
Feasibility
4 region
1 Corner points
(0, 3);(2, 4)
0 x
-2 -1 0 1 2 3 4 5 6
Exercises
A. Sketch the graph of the following linear inequalities.
1. y < 3 6. 2x y 3
2. x > 4 7. 2x + 5y < 9
3. x + 5 0 8. 2y + x 0
4. y – 8 0 −1
9. y x+5
2
5. x + y 5
10. 2x 6y 3
LINEAR PROGRAMMING
B. Find the feasible region of the following systems of linear inequalities and the corner
points, if any.
2 x +3 y >13 y> 6
1. {x +2 y >8
{
7. y−2 x> 3
x >0
2. {2xx+4+5yy>2<1 x+ y ≤4
3. {72 xx 52 yy ≤≥84
8.
{ x− y ≤ 2
x ≥0
x ≤7
4. {23xy+83 xy≥15
> 40 9.
{ y≤5
x≥4
y≥0
5. {53yx82xy≤>720 x +3 y ≤5
x≤6
10.
{
4 x−5 ≤ 3
x≥0
y ≥0
6.
{ y≥5
x+ y ≥ 3
Lesson 2
Geometric Linear Programming
In this lesson, we will extend a method for solving linear programming problems
geometrically in the special case where only two variables are involved.
To begin with, let us define some terms to be used.
Definition
In general, a linear program in two variables x and y consist of a linear function F = ax
+ by called the objective function that is to be optimized (maximized or minimized)
subject to a system of linear constraint inequalities.
The variables x and y are called the decision variables, and the solution set of the
system of inequality constraints is called the feasibility region.
LINEAR PROGRAMMING
To solve a linear, program, we select from the set of all feasible solutions one that
produces the optimum value (maximum or minimum) of the objective function. We
refer to such solution (there may be more that one) as an optimal solution.
To illustrate how to find the optimal solution to a linear program, consider the given
example below.
Example: 4
y
Maximize F = 2x + 3y Subject to
2x – y 2 2
x + 2y 6 x
0
x, y 0 -6 -4 -2 0 2 4 6
-2
-4
We need to find the point(s) in the feasibility region such that function F = 2x + 3y is as
large as possible. Toward this end, note that each constant C, the graph of the equation 2x + 3y
−2
= C is a straight line with slope . We call this a line of constant value since all points (x, y)
3
on such line yield the same value of F. The lines of constants have the same slope, hence, they
are parallel and as C increases, the corresponding lines are located farther and farther from the
origin. The last (outermost) line to touch the feasibility region does so at the corner point (2, 2),
and we conclude that the required maximum is
F = 2(2) + 3(2) = 10
That is, subject to the given constraints. The maximum value of the function F is 10,
which is obtained when x = 2 and y = 2.
Definition
The feasibility region R is said to be bounded if it can be enclosed in a circle. If the
feasibility region cannot be enclosed with circle, it is said to be unbounded.
Below are illustrations of bounded feasibility region with corresponding maximum and
minimum points. P1
Q F=C
F=C
P2
P
LINEAR PROGRAMMING
Fig. 1 Fig. 2
In fig. 1, one of the parallel line passes through the lowest point P of the feasibility
region, thus function F has its minimum at P and also another line of constants passes through
the highest point Q, thus the maximum of F is at Q. In fig. 2, one of the parallel lines passes
through two adjacent corner points P1 and P2 which happens to be the highest part of the
feasibility region, hence, maximum of F is along P1P2.
Fig. 3
The feasibility region in fig. 3 is unbounded as C increases, thus, the maximum does not
exist.
Notice that in any case, the minimum or maximum, if any, is located at a corner point of
the feasibility region. This leads to the following theorem of corner point.
Note : If a linear program has an optimal solution (maximum or minimum), it must occur at a
corner point of the feasibility region.
Geometric Method for Solving a Linear Program with Two Decision Variables
1. Graph the feasibility region R and find the coordinates of all corner points of R.
2. Make a table evaluating the objective function F at each corner point.
3. If R is bounded, the largest(smallest) value of F on R is its largest (smallest) value at a
corner point.
4. If R unbounded, an optimum solution may not exist. However, if it does, it must be at a
corner point.
Example:
1. Find the largest and the smallest value of F = 7x + 2y
LINEAR PROGRAMMING
x+ y ≤ 8
Subject to the constraints
{ x− y ≤ 2
x , y≥0
Solutions:
We find the feasibility region by graphing.
y
8
0 x
-4 -2 0 2 4 6
The feasibility region is bounded with corner points are at (0, 0), (0, 8), (2, 0), and (5, 3).
Hence, the largest value of F is 41 at (5, 3) and the smallest is 0 at the origin.
Example:
2. What can be said about the largest and smallest values of the function F = 2x + 7y
x + y ≥6
subject to
{
8 x+2 y ≥18
x ,y≥0
Solution:
We graph the constraints to find the feasibility region.
y
0 x
-4 -2 0 2 4 6
The feasibility region is unbounded. The corner points are at (0, 8), (1, 5), and (6, 0).
Corner Point Value of F = 2x + 7y
(0, 8) 42
(1, 5) 37
LINEAR PROGRAMMING
Since the feasibility region is unbounded, F has a smallest value but no largest value.
Thus, the smallest value of F is 12 which occurs at x = 6 and y = 0.
Exercises
Find both the maximum and minimum values and the point at which these values are attained
for the given function subject to the given constraints.
1. F = 2x – 3y 2. G = 3x + 2y
x+y ¿ 3 x+y ¿ 5
2x – y ¿ 4 x – 2y ¿ 6
x, y ¿ 0 2x + y ¿ 2
x, y ¿ 0
3. K = 4x + 3y 4. L = 2x + 5y
4x + y ¿ 8 x+y ¿ 5
2x + y ¿ 4 6x + y ¿ 6
x, y ¿ 0 2x + 5y ¿ 2
x, y ¿ 0
5. M = 8x – 2y 6. N = 5x + 4y
y – 2x ¿ -1 y + 3x ¿ 6
3y – x ¿ 2 3y + 2x ¿ 11
2y – x ¿ 2 4y + x ¿ 8
x ¿ 10 4y + 3x ¿ 6
7. S = -5x + 2y 8. T = -4x + 7y
y – 2x ¿ -1 y + 3x ¿ 6
3y – x ¿ 2 3y + 2x ¿ 11
2y – x ¿ 2 4y + x ¿ 8
x ¿ 10 4y + 3x ¿ 6
9. U = 12x – 6y 10. V = 5x + 7y
2x + y ¿ 4 3y + 8x ¿ 6
3y + 4x ¿ 5 7x – y ¿ 14
-2y – 4x ¿ 12 4y – x ¿ 8
x ¿ 9 2x – 3y ¿ 6
LINEAR PROGRAMMING