Debre Markos University Debre Markos Institut of Technology
Debre Markos University Debre Markos Institut of Technology
1
PART ONE
Formulation and Graphic solution.
✦ Introduction
✦ Concept of LP.
✦ Formulation of LP problems.
✦ Assumptions underlying LP.
✦ Graphical method.
✦ Some special cases of LP.
2
Introduction
Linear programming is a mathematical programming
technique to optimize performance ( e.g profit or cost ) under a
set of resource constraint ( e.g machine-hours, man-hours,
money, materials, etc) as specified by an organization.
Mathematical programming is used to find the best or optimal
3
Cont….
Steps involved in mathematical programming
4
Cont….
5
The Linear Programming Model
Let: X1, X2, X3, ………, X n = Decision variables
Z = Objective function or linear function
…Eq (2)
9
Examples of LP Problems (1)
1. A Product Mix Problem
A manufacturer has fixed amounts of different
resources such as raw material, labor, and equipment.
These resources can be combined to produce any one of
several different products.
The quantity of the ith resource required to produce one
unit of the jth product is known.
The decision maker wishes to produce the combination
of products that will maximize total income.
10
Examples of LP Problems (2)
2. A Blending Problem
Blending problems refer to situations in which a number
of components (or commodities) are mixed together to
yield one or more products.
Typically, different commodities are to be purchased.
Each commodity has known characteristics and costs.
The problem is to determine how much of each
commodity should be purchased and blended with the
rest so that the characteristics of the mixture lie within
specified bounds and the total cost is minimized.
11
Examples of LP Problems (3)
3. A Production Scheduling Problem
A manufacturer knows that he must supply a given
number of items of a certain product each month for the
next n months.
They can be produced either in regular time, subject to a
maximum each month, or in overtime. The cost of
producing an item during overtime is greater than
during regular time. A storage cost is associated with
each item not sold at the end of the month.
The problem is to determine the production schedule
that minimizes the sum of production and storage costs.
12
Examples of LP Problems (4)
4. A Transportation Problem
A product is to be shipped in the amounts al, a2, ..., am
from m shipping origins and received in amounts bl,
b2, ..., bn at each of n shipping destinations.
14
Developing LP Model
15
Applied Example 1: A Production Problem
Muger cement manufacture wishes to produce two types
of cement: type-A will result in a profit of 10.00 birr, and
type-B in a profit of 12.00 birr.
To manufacture a type-A cement requires 20 minutes on
machine I and 10 minute on machine II.
A type-B cement requires 10 minute on machine I and
30 minutes on machine II.
There are 3 hours available on machine I and 5 hours
available on machine II.
How many cement of each type should Muger cement
make in order to maximize its profit ?
16
Applied Example 1: A Production Problem
Solution
Let’s first tabulate the given information:
Type-A Type-B Time Available
Profit/Unit 10.00 birr 12.00 birr
Machine I 20 min 10 min 180 min
Machine II 10 min 30 min 300 min
17
Applied Example 1: A Production Problem
Solution
Let’s first tabulate the given information:
P = 10x+12y
which is the objective function to be maximized.
18
Applied Example 1: A Production Problem
Solution
Let’s first tabulate the given information:
20x+10y
and must not exceed 180 minutes.
Thus, we have the inequality
20x+10y ≤ 180
19
Applied Example 1: A Production Problem
Solution
Let’s first tabulate the given information:
10x+30y
and must not exceed 300 minutes.
Thus, we have the inequality
10x+30y ≤ 300
20
Applied Example 1: A Production Problem
Solution
Let’s first tabulate the given information:
x 0
y 0
21
Applied Example 1: A Production Problem
Solution
In short, we want to maximize the objective function
P = 10x+12y
subject to the system of inequalities
20x+10y ≤ 180
10x+30y ≤ 300
x 0
y 0
22
Excersice
A firm is engaged in producing two product , A and B. Each
unit of product A requires 2 kg of row material and 4 labour
hours for processing , whereas each unit of product B
requires 3 kg of row material and 3 hours of labour , of the
same type . Every week ,the firm has an availability of 60
kg of row material and 90 labor hours. one unit of product
A sold yields 40 birr and one unit of product B sold give 35
birr as profit .
Formulate this problem as LP to determine how many
unit of each of the product should be produced per week so
that the firm can earn the maximum profit . Assume that
there is no marketing constraint so that all that is produced
can be sold .
23
Graphing Linear Inequalities
We’ve seen that a linear equation in two variables x and y
ax by c 0
has a solution set that may be exhibited graphically as points on
a straight line in the xy-plane.
There is also a simple graphical representation for linear
inequalities of two variables:
ax by c 0
ax by c 0
ax by c 0
ax by c 0
24
Procedure for Graphing Linear Inequalities
1. Draw the graph of the equation obtained for the given inequality
by replacing the inequality sign with an equal sign .
✦ Use a dashed or dotted line if the problem involves a strict
inequality, < or >.
✦ Otherwise, use a solid line to indicate that the line itself
constitutes part of the solution.
2. Pick a test point lying in one of the half-planes determined by the
line sketched in step 1 and substitute the values of x and y into
the given inequality.
✦ Use the origin whenever possible.
3. If the inequality is satisfied, the graph of the inequality includes
the half-plane containing the test point.
✦ Otherwise, the solution includes the half-plane not containing
the test point.
25
Examples
Determine the solution set for the inequality 2x + 3y 6.
Solution
Replacing the inequality with an equality =, we obtain
the equation 2x + 3y = 6, whose graph is:
y
7
2x + 3 y = 6 3
1
x
–5 –3 –1 1 3 5
–1
26
Examples
Determine the solution set for the inequality 2x + 3y 6.
Solution
Picking the origin as a test point, we find 2(0) + 3(0) 6,
or 0 6, which is false.
Thus, the solution set is:
y
7
5
2x + 3 y 6
2x + 3 y = 6 3
1
(0, 0)
x
–5 –3 –1 1 3 5
–1
27
Graphing Systems of Linear Inequalities
1
x
–5 –3 1 3 5
–1
–3 29
Examples
Graph x – 3y > 0.
Solution
We use a dashed line to indicate the line itself will not be
part of the solution, since we are dealing with a strict
inequality >.
y
3
x – 3y = 0
1
x
–5 –3 1 3 5
–1
–3 30
Examples
Graph x – 3y > 0.
Solution
Since the origin lies on the line, we cannot use the origin
as a testing point:
y
3
x – 3y = 0
1
(0, 0)
x
–5 –3 1 3 5
–1
–3 31
Examples
Graph x – 3y > 0.
Solution
Picking instead (3, 0) as a test point, we find (3) – 2(0) > 0,
or 3 > 0, which is true.
Thus, the solution set is:
y
3
x – 3y = 0
1
(3, 0)
x
–5 –3 1 3 5
–1
x – 3y > 0
–3 32
Example
Determine the solution set for the system
4 x 3 y 12
x y 0
Solution
The intersection of the solution regions of the two
inequalities represents the solution to the system:
y
4x + 3y = 12
4
3 4x + 3y 12
x
–1 1 2 3
33
Example
Determine the solution set for the system
4 x 3 y 12
x y 0
Solution
The intersection of the solution regions of the two
inequalities represents the solution to the system:
y
4
x–y0 x–y=0
3
x
–1 1 2 3
34
Example
Determine the solution set for the system
4 x 3 y 12
x y 0
Solution
The intersection of the solution regions of the two
inequalities represents the solution to the system:
y
4x + 3y = 12
4 4 x 3 y 12
x y 0 x–y=0
3
2
P ( 127 , 127 )
1
x
–1 1 2 3
35
Bounded and Unbounded Sets
36
Example
The solution to the problem we just discussed is
unbounded, since the solution set cannot be
enclosed in a circle:
4x + 3y = 12
4 4 x 3 y 12
x y 0
3 x–y=0
2
P ( 127 , 127 )
1
x
–1 1 2 3
37
Example
Determine the solution set for the system
x y 6 0 2 x y 8 0 x 0 y 0
Solution
The intersection of the solution regions of the four
inequalities represents the solution to the system:
2 x y 8 0
7
5 P (2, 4)
3
x y 6 0
1
x
–1 1 3 5 9
38
Example
Determine the solution set for the system
x y 6 0 2 x y 8 0 x 0 y 0
Solution
Note that the solution to this problem is bounded, since it
can be enclosed by a circle:
2 x y 8 0
7
5 P (2, 4)
3
x y 6 0
1
x
–1 1 3 5 9
39
Linear Programming Problems
Maximize P x 1.2 y
Subject to 2 x y 180
x 3 y 300
x 0
y 0
Feasible Solution Set and Optimal Solution
The constraints in a linear programming problem
form a system of linear inequalities, which have a
solution set S.
Each point in S is a candidate for the solution of the
linear programming problem and is referred to as a
feasible solution.
The set S itself is referred to as a feasible set.
Among all the points in the set S, the point(s) that
optimizes the objective function of the linear
programming problem is called an optimal solution.
41
Theorem 1
Linear Programming
If a linear programming problem has a
solution, then it must occur at a vertex, or
corner point, of the feasible set S associated
with the problem.
If the objective function P is optimized at two
adjacent vertices of S, then it is optimized at
every point on the line segment joining these
vertices, in which case there are infinitely
many solutions to the problem.
42
Theorem 2
Existence of a Solution
Suppose we are given a linear programming problem
with a feasible set S and an objective function
P = ax + by.
a. If S is bounded, then P has both a maximum and a
minimum value on S.
b. If S is unbounded and both a and b are nonnegative, then
P has a minimum value on S provided that the constraints
defining S include the inequalities x 0 and y 0.
c. If S is the empty set, then the linear programming
problem has no solution: that is, P has neither a maximum
nor a minimum value.
43
The Method of Corners
1. Graph the feasible set.
2. Find the coordinates of all corner points (vertices) of
the feasible set.
3. Evaluate the objective function at each corner point.
4. Find the vertex that renders the objective function a
maximum or a minimum.
✦ If there is only one such vertex, it constitutes a unique
solution to the problem.
✦ If there are two such adjacent vertices, there are infinitely
many optimal solutions given by the points on the line
segment determined by these vertices.
44
Applied Example 1: A Production Problem
Recall Applied Example 1 from the last section (divide all
number by 10 for this calculation only ), which required us to
find the optimal quantities to produce of type-A and type-B
cements in order to maximize profits.
We restated the problem as a linear programming problem in
which we wanted to maximize the objective function
P x 1.2 y
subject to the system of inequalities
2 x y 180
x 3 y 300
x 0
y 0
We can now solve the problem graphically.
45
Applied Example 1: A Production Problem
We first graph the feasible set S for the problem.
✦ Graph the solution for the inequality
2 x y 180
considering only positive values for x and y:
y
200 (0, 180)
2 x y 180
100
(90, 0)
x
100 200 300
2 x y 180 46
Applied Example 1: A Production Problem
y
200
(0, 100)
100 x 3 y 300
x 3 y 300
(300, 0)
x
100 200 300
47
Applied Example 1: A Production Problem
We first graph the feasible set S for the problem.
✦ Graph the intersection of the solutions to the inequalities,
yielding the feasible set S.
(Note that the feasible set S is bounded)
y
200
100
S x 3 y 300
x
100 200 300
2 x y 180 48
Applied Example 1: A Production Problem
y
200
D(0, 100)
100 C(48, 84)
S x 3 y 300
A(0, 0) B(90, 0)
x
100 200 300
2 x y 180 49
Applied Example 1: A Production Problem
Now, find the values of P at the vertices and tabulate them:
Vertex P = x + 1.2 y
A(0, 0) 0
y
B(90, 0) 90
200
C(48, 84) 148.8
D(0, 100) D(0, 100) 120
100 C(48, 84)
S x 3 y 300
A(0, 0) B(90, 0)
x
100 200 300
2 x y 180 50
Applied Example 1: A Production Problem
Finally, identify the vertex with the highest value for P:
✦ We can see that P is maximized at the vertex C(48, 84) and
has a value of 148.8.
Vertex P = x + 1.2 y
A(0, 0) 0
y
B(90, 0) 90
200
C(48, 84) 148.8
D(0, 100) D(0, 100) 120
100 C(48, 84)
S x 3 y 300
A(0, 0) B(90, 0)
x
100 200 300
2 x y 180 51
Applied Example 1: A Production Problem
Finally, identify the vertex with the highest value for P:
✦ We can see that P is maximized at the vertex C(48, 84) and has
a value of 148.8.
52
Solve the following LP problems graphically
1. Maximize Z= 20x1+80x2 3. Maximize Z= 20x1+30x2
subject to 4x1 + 6x2 ≤ 90
subject to 2x1 + x2 ≤ 40
8x1 + 6x2 ≤
100 4x1 -
5x1 + 4x2 ≤ 80 x2 ≤ 20
x1 and x2 ≥ 0
x1 ≤ 30
2. Minimize Z= 20X1+ 10X2
x1
subject to x1 + 2x2 ≤ 40
and x2 ≥ 0
3x1 + x2 ≥ 30
4x1 + 3x2 ≥ 60
x1 and x2 ≥ 0 4. Minimize Z= 6X1+ 14X2
subject to 5x1 + 4x2 ≥ 60
3x1
53
+ 7x2 ≥ 84
THANK YOU
54