Methods of Solving LP Problems
(Graphical Method)
Dr. B.E. OWUSU
KNUST
January 22, 2025
Graphical Method
An optimal as well as a feasible solution to an LP problem is
obtained by choosing one set of values from several possible
values of decision variables x1 , x2 , · · · , xn , that satisfies the
given constraints simultaneously and also provides an optimal
(maximum or minimum) value of the given objective function.
For LP problems that have only two variables, it is possible
that the entire set of feasible solutions can be displayed
graphically by plotting linear constraints on a graph paper in
order to locate the best (optimal) solution.
The technique used to identify the optimal solution is called
the graphical solution method (approach or technique) for an
LP problem with two variables.
Dr. B.E. OWUSU Methods of Solving LP Problems
Important Definitions
Solution: The set of values of decision variables
xj v (j = 1, 2, ..., n) that satisfy the constraint of an LP
problem is said to constitute the solution to that LP problem.
Feasible solution: The set of values of decision variables
xj v (j = 1, 2, ..., n) that satisfy all the constraints and
non-negativity conditions of an LP problem simultaneously is
said to constitute the feasible solution to that LP problem.
Infeasible solution: The set of values of decision variables
xj (j = 1, 2, ..., n) that do not satisfy all the constraints and
non-negativity conditions of an LP problem simultaneously is
said to constitute the infeasible solution to that LP problem.
Dr. B.E. OWUSU Methods of Solving LP Problems
Cont’d
Basic solution: For a set of m simultaneous equations in n
variables (n > m) in an LP problem, a solution obtained by
setting (n – m) variables equal to zero and solving for
remaining m equations in m variables is called a basic solution
of that LP problem.
The (n – m) variables whose value did not appear in basic
solution are called non-basic variables and the remaining m
variables are called basic variables.
Basic feasible solution: A feasible solution to an LP problem
which is also the basic solution is called the basic feasible
solution. That is, all basic variables assume non-negative
values. Basic feasible solution is of two types:
Dr. B.E. OWUSU Methods of Solving LP Problems
cont’d
(a) Degenerate: A basic feasible solution is called degenerate if
the value of at least one basic variable is zero.
(b) Non-degenerate: A basic feasible solution is called
non-degenerate if value of all m basic variables is non-zero
and positive.
Optimum basic feasible: solution A basic feasible solution
that optimizes (maximizes or minimizes) the objective
function value of the given LP problem is called an optimum
basic feasible solution.
Unbounded solution: A solution that can increase or
decrease infinitely the value of the objective function of the
LP problem is called an unbounded solution.
Dr. B.E. OWUSU Methods of Solving LP Problems
Extreme Point Solution Method
In this method, the coordinates of all corner (or extreme)
points of the feasible region (space or area) are determined
and then value of the objective function at each of these
points is computed and compared.
The coordinates of an extreme point where the optimal
(maximum or minimum) value of the objective function is
found represent solution of the given LP problem. The steps
of the method are summarized as follows:
Dr. B.E. OWUSU Methods of Solving LP Problems
Cont’d
1 Develop an LP model: State the given problem in the
mathematical LP model as illustrated in the previous lecture.
2 Plot constraints on graph paper and decide the feasible
region:
(a) Replace the inequality sign in each constraint by an equality
sign.
(b) Draw these straight lines on the graph paper and decide each
time the area of feasible solutions according to the inequality
sign of the constraint. Shade the common portion of the
graph that satisfies all the constraints simultaneously drawn
so far.
(c) The final shaded area is called the feasible region (or solution
space) of the given LP problem. Any point inside this region
is called feasible solution and this provides values of x1 and x2
that satisfy all the constraints.
Dr. B.E. OWUSU Methods of Solving LP Problems
Cont’d
3 Examine extreme points of the feasible solution space to find
an optimal solution.
(a) Determine the coordinates of each extreme point of the
feasible solution space.
(b) Compute and compare the value of the objective function at
each extreme point.
(c) Identify the extreme point that gives optimal (max. or min.)
value of the objective function.
Dr. B.E. OWUSU Methods of Solving LP Problems
Example One(1)
Example
An office manager needs to purchase new filing cabinets. He knows
that Ace cabinets cost $80 each, require 6 ft2 of floor space, and
hold 24 ft3 of files. On the other hand, Excello cabinets cost $160
each, require 8 ft2 of floor space, and hold 36 ft3 of files.
The manager’s budget permits him to spend no more than $1120
on cabinets, while the office has space for no more than 72 ft2 of
cabinets. The manager desires the greatest storage capacity within
the limitations imposed by funds and space. How many of each
type of cabinet should he buy?
Dr. B.E. OWUSU Methods of Solving LP Problems
Solution to Example One(1)
Let:
x represent the number of Ace cabinets
y be the number of Excello cabinets
Ace Excello Total
Number of Cabinets x y
Cost of Each $80 $160 ≤ 1120
Space Required 6 ft2 8 ft2 ≤ 72 ft2
Storage Capacity 24 ft3 36 ft3
The constraints;
80x + 160y ≤ 1120
6x + 8y ≤ 72
Since the number cannot be negative x , y ≥ 0
Dr. B.E. OWUSU Methods of Solving LP Problems
Cont’d
The Objective function
z = 24x + 36y
The mathematical model for the given linear programming problem
is as follows:
Maximize z = 24x + 36y (1)
subject to:
80x + 160y ≤ 1120 (2)
6x + 8y ≤ 72 (3)
x ≥0 (4)
y ≥0 (5)
Using the methods described in the previous section, graph the
feasible region for the system of inequalities (2)–(5). Three of the
corner points can be identified from the graph as (0, 0), (0, 7), and
(12, 0). The fourth corner point, labeled Q in the figure, can be
found by solving the system of equations:
Dr. B.E. OWUSU Methods of Solving LP Problems
Cont’d
8
(0, 7)
6
4
Q(8, 3)
6x + 8y = 72
2
80x + 160y = 1120
(0, 0) (12, x
2 4 6 8 10 120) 14
Dr. B.E. OWUSU Methods of Solving LP Problems
Cont’d
80x + 160y = 1120
6x + 8y = 72
Solve this system to find that Q is the point (8, 3). Now test these
four points in the objective function to determine the maximum
value of z. The results are shown in the table below:
Corner Point Value of z = 24x + 36y
(0, 0) 0
(0, 7) 252
(12, 0) 288
(8, 3) 300 (Maximum)
The objective function which represents storage space is maximized
when x = 8 and y = 3
Dr. B.E. OWUSU Methods of Solving LP Problems
Example Two(2)
Example
A 4-H member raises only goats and pigs. She wants to raise no
more than 16 animals, including no more than 10 goats. She
spends $25 to raise a goat and $75 to raise a pig, and she has $900
available for this project. The 4-H member wishes to maximize her
profits. Each goat produces $12 in profit and each pig $40 in profit.
Dr. B.E. OWUSU Methods of Solving LP Problems
Solution to Example Two(2)
Goats (x ) Pigs (y ) Total
Number Raised x y x + y ≤ 16
Cost to Raise $25 $75 25x + 75y ≤ 900
Profit (each) $12 $40
Use the table to write the necessary constraints. Since the total
number of animals cannot exceed 16, the first constraint is:
x + y ≤ 16
The cost to raise x goats at $25 per goat is 25x dollars, while the
cost for y pigs at $75 each is 75y dollars. Since only $900 is
available:
25x + 75y ≤ 900
Dividing both sides by 25 gives the equivalent inequality:
x + 3y ≤ 36
Dr. B.E. OWUSU Methods of Solving LP Problems
Cont’d
“No more than 10 goats” means:
x ≤ 10
The number of goats and pigs cannot be negative, so:
x ≥0 and y ≥ 0
The objective function;
z = 12x + 40y
Dr. B.E. OWUSU Methods of Solving LP Problems
Cont’d
Maximize: z = 12x + 40y
Subject to:
x + y ≤ 16
x + 3y ≤ 36
x ≤ 10
x ≥ 0, y ≥0
A graph of the feasible region is shown below. The corner points
(0, 12), (0, 0), and (10, 0) can be read directly from the graph.
The coordinates of each of the other corner points can be found by
solving a system of linear equations.
Dr. B.E. OWUSU Methods of Solving LP Problems
Cont’d
20
15
x = 10
x + y = 16
10 x + 3y = 36
(6, 10)
5 (10, 6)
x
5 10 15 20 25 30 35
Dr. B.E. OWUSU Methods of Solving LP Problems
Cont’d
Corner Point Value of z = 12x + 40y
(0, 12) 12(0) + 40(12) = 480 Maximum
(6, 10) 12(6) + 40(10) = 472
(10, 6) 12(10) + 40(6) = 360
(10, 0) 12(10) + 40(0) = 120
(0, 0) 12(0) + 40(0) = 0
The maximum of 480 occurs at (0, 12). Thus, 12 pigs and no
goats will produce a maximum profit of $480.
Dr. B.E. OWUSU Methods of Solving LP Problems
Example Three(3)
Example
Certain laboratory animals must have at least 30 g of protein and
at least 20 g of fat per feeding period. These nutrients come from
food A, which costs 18¢ per unit and supplies 2 g of protein and 4
g of fat; and food B, which costs 12¢ per unit and has 6 g of
protein and 2 g of fat. Food B is bought under a long-term
contract requiring that at least 2 units of B be used per serving.
How much of each food must be bought to produce the minimum
cost per serving?
Dr. B.E. OWUSU Methods of Solving LP Problems
Solution to Example Three(3)
Food A (x ) Food B (y ) Total
Number of Units x y
Grams of Protein 2 6 ≥ 30
Grams of Fat 4 2 ≥ 20
Cost (¢) 18 12
The linear programming problem can be stated as follows:
Minimize: z = 0.18x + 0.12y
Subject to:
2x + 6y ≥ 30 (Protein)
4x + 2y ≥ 20 (Fat)
y ≥2
x ≥0
Dr. B.E. OWUSU Methods of Solving LP Problems
Cont’d
15
(0, 10)
10
4x + 2y = 20
2x 5+ 6y = 30
(3, 4) y =2
(9, 2)
x
5 10 15 20 25
Dr. B.E. OWUSU Methods of Solving LP Problems
Cont’d
Corner Point Value of z = .18x + .12y
(0, 10) .18(0) + .12(10) = 1.20
(3, 4) .18(3) + .12(4) = 1.02 minimum
(9, 2) .18(9) + .12(2) = 1.86
The minimum of 1.02 occurs at 3, 4. Thus 3 units of food A
and 4 units of food B will produce a minimum cost of $1.02
per serving
Dr. B.E. OWUSU Methods of Solving LP Problems