Unit Three Intro. to Linear Programming 1
Unit Three Intro. to Linear Programming 1
Introduction
Linear programming is an optimization method (maximization or minimization), which shows ways to
allocate scarce resources in the best possible way subject to more than one limiting condition expressed in
the form of inequalities and /or equations.
- Linear programming enables users to find optional solution to certain problems in which the
solution must satisfy a given set of requirements or constraints.
- Optimization in linear programming implies maximization (max) of profit, revenue, sales, market
share or minimization (min) of cost, time, distance, or a certain objective function.
- Linear programming involves linearly related multi-variety functions that are functions with more
than one independent variable.
- The goal in linear programming is to find the best solution given the constraints imposed by the
problem, hence the term constrained optimization
3.1 Introduction to Linear Programming and its Application in Business
Linear Programming (LP) is one of the mathematical optimization techniques which attempt to maximize
or minimize some objects; for example, maximize profit or minimize cost.
Linear programming models are mathematical representation of linear programming problems. There
have been extensive applications of LP within military and petroleum industries. Although these sections
have perhaps been the heaviest users of linear programming, the service and public sectors of the
economy have also applied the method extensively. Some models have a specialized format whereas
others have a more generalized format. Despite this, linear programming models have certain
characteristics in common. Knowledge of these characteristics enables us to recognize problems that are
amenable to a solution using Linear Programming models and to correctly formulate a Linear
Programming model. The characteristics can be grouped into two categories: Components and
assumptions. The components relate to the structure of a model, whereas the assumptions describe the
conditions under which the model is valid.
Components Assumptions
1. Objective function 1. Linearity
2. Decision variables Model 2. Divisibility
3. Constraints Structure 3. Certainty Model
4. Parameters and right- 4. Non-negativity Validity
hand side values
Components of LP Model
a) The Objective function: -is -is the mathematical (quantitative expression of the objective of the
company) model. The objective in problem solving is the criterion by which all decisions are
evaluated. In linear programming model the decision maker must specify a single quantifiable
objective. For example, the objective might relate to profits, costs or market share, and might be
best to only one of these. Moreover, because we are dealing with optimization, the objective will
be either maximization or minimization, but not both at a time
b) The Decision Variables: - represent unknown quantities to be resolved. These decision variables
may represent such things as:
- the number of units of different products to be sold
- the number of dollars to invest in various projects
- the number of advertisings to place with different media
Since the decision maker has freedom of choice among actions, these decision variables are
controllable variables.
c) The constraints: - are restrictions which define or limit the attainability (achievability) and
feasibility of a proposed course of action. They limit the degree to which the objective can be
pursued. The constraints are stated in terms of the decision variables and must be satisfied when
determining the levels of the decision variables.
A typical restriction embodies scarce resources (such as labor supply, raw materials, production
capacity, machine time, storage space); legal or contractual requirements (e.g. Product standards,
work standards); or they may reflect other limits based on forecasts, customer orders, company
policies etc.
d) Parameters: - are fixed values that specify the impact that one unit of each decision variable will
have on the objective and on any constraint it pertains to as well as to the numerical value of each
constraint.
The components are the building blocks of an LP model. We can understand their meaning by examining
a simple linear programming problem model as follows.
Maximize (Profit):
Z=3 x1 +7 x 2 +5 x 3 …….… objective function
Subject to:
2x1+3x2+6x3≤30 labourhours ¿}5x1 +4x3≤20 materil }¿ sytemconstrain's¿ x1 =30 }¿ indvualconstrain's¿ x1, 2x3≥0 no-egativyconstrain's¿
Where:
x 1 is the quantity of product 1
x 2 isthe quantity of product 2
x 3 is the quantity of product 3
System constraints- involve more than one decision variables
Individual constraint- involves only one decision variable.
Non-negativity constrains-
constrains- specifies that no variable will be allowed to take on a negative value. The
non-negativity constraints typically apply in an LP model, whether they are explicitly stated or not.
b) Divisibility:-
Divisibility:- The divisibility requirement pertains to potential values of decision variables. It is
assumed that non-integer values are acceptable. For example: 3.5 TV sets per hour would be acceptable.
This implies that 7 TV sets per 2 hours.
c) Certainty: - The parameters of certainty are known and constant. The certainty requirement involves
two aspects of LP models. The constraint equations do not change.
(1) With respect to model parameters (i.e. the numerical values) it is assumed that these values are
known and constant. For example, in the above example, that each unit of product 1 requires 2
labor hours is known and remain constant, and also the 300 labor available is deemed (considered)
to be known and constant.
(2) All the relevant constraints identified and represented in the model are as they are.
d) Non-negativity:-
Non-negativity:- The non-negativity constraint maintains that negative values of variables are
unrealistic and, therefore, will not be considered in any potential solutions; only positive values and zero
will be allowed.
Once a problem has been defined, the attention of the analyst shifts to formulating a model. Just as it is
important to carefully formulate the model that will be used to solve the problem. If the LP model is ill
formulated, or ill structured, it can easily lend to poor decisions.
2) Identity the decision variables or represent the unknown quantities: Here using
using variables like
x , y ,⋯ represent the unknown values. For instance consider the following case
x
Let 1 be the monthly quantities of type 1 product.
x 2 be the monthly quantities of type 2 product.
x 3 be the monthly quantities of type 3 product.
3) Determine the objective function: Once the variables have been identified, the objective
function can be specified. It is necessary to decide if the problem is maximization or a
minimization problem and identify the coefficients of each decision variable.
4) Identify the constraints: Any thing, which limits the optimal value of the objective function, is
considered as a constraint. This may include material, labour, time, demand, capacity and other
resources, which are naturally scarce.
Example 3.1 A firm that assembles computer equipment is about to start production of two new
microcomputers. Each type of microcomputer will require assembly time, inspection time, and storage
space. The amount of each of these resources that can be devoted to the production of the microcomputers
is limited. The manager of the firm wants to determine the quantity of each microcomputer in order to
maximize the profit generated from the sales of these microcomputers.
Additional information
In order to develop a suitable model of the problem, the manager has met with the design and
manufacturing personnel. As a result of these meetings, the manager has obtained the following
information:
Type 1 Type 2
Profit per unit $ 60 $ 50
Assembly time per unit 4 hrs 10 hrs
Inspection time per unit 2 hrs 1 hr
Storage space per unit 3 cubic ft 3 cubic ft
The manager also has acquired information on the weekly available company resources. as indicated
below:
The manager has also met with the firm’s marketing manager and learned that demand for the
microcomputers is high.
Required: develop the linear programming model for the problem
3.3 SolutionApproaches
SolutionApproaches to Linear Programming Problems
It’s a relatively straightforward method for determining the optimal solution to certain linear
programming problems. This method can be used only to solve problems that involve two decision
variables, as you are able to draw the graph of all problem constraints that involve, at most, two variables
on the same coordinate plane. However, if the numbers of decision variables in the problem constraints
is three or more you need the graph on three or more dimensional coordinate plane; which is not simple to
handle. Therefore, the graphical method is used to solve only linear programming problems with two
decision variables, but the technique will be used to develop ways of solving linear programming
problems with three or more decision variables. In this case, you will definitely use the simplex method.
In solving a linear programming problem you need to draw the graph of the constraints which involve
inequality relation on the same coordinate plane. The solution to such system graphically is to find the set
of ordered pairs ( x , y ) that satisfy all inequalities in the system (Please, recall the graph of a relation). The
graph of the system is called the feasible region or feasible solution and is denoted by F.
Definition: An extreme point or corner point of a feasible region is a point in the feasible region (F)
that is the intersection of any two lines determined from the inequalities.
Example 3.2 Solving the microcomputer problem in example 3.1 with graphic approach,
Z max =60 x+50 y
Subject to
4 x+10 y ≤100
2 x+ y≤22
3 x+ 3 y≤39
x , y ≥0
Solution
Step-1 is already developed, hence you will move to step 2.
Step-2 Draw the graph of all the constraints on he same coordinate plane. From the non-negativity
constraints retractions you draw the graph of the system on the first quadrant of the coordinate plane.
Let 4 x+10 y ≤100 and take the corresponding equation4 x+10 y =100 , then
x 0 25
y 10 0
If you plot these lines on the same coordinate plane, you have the following graph.
y
24
20
4 x 10 y 100
16
12 3x 3 y 39
E D
8
F C 4 x 10 y 100
4
A BB
4 8 B 12 16 20 24 E 28
Error! Bookmark not defined.
The feasible region is the polygon described by ABCDE, which is a bounded region. Hence you have
both maximum and minimum values on this feasible region.
To identity the maximum value of the objective function with respect to the restrictions made using the
graphical method; find the corner or extreme points by solving two equations determined from the
constraints simultaneously as follows:
To find the point A, you use the intersection point of the y-axis and x-axis, i. e. x=0 ∧ y=0 . Hence
A(0,0) is a corner point.
To find the point B, we take the intersection point of x-axis and the line 2 x+ y=22 , i. e.
y=0∧3 x +3 y=39 . Hence B(11,0) is the corner point.
To find the point C, we take the intersection point of the lines 2 x+ y=22 and 3 x+3 y=39 .
{2 x+y=22¿¿¿¿
1
−
If you multiply the second equation by 3 and add it to the first equation, you have:
{2 x+y=22¿¿¿¿ ¿
¿
Put x=9 , in the first equations y=22−2(9 )=4 . Hence C(9,4) is the corner point.
To find the point D, we take the intersection point of the lines 4 x+10 y =100 and3 x+3 y=39 .
{4 x+10y=100¿¿¿¿
If you multiply the first equation by 3 , and multiply the second equation by −4 and add them, you
{12x+30y=300¿¿¿¿ ¿
have: ¿
This implies that y=8 . Put y=8 , in the first equations
4 x=100−10 (8)=20
⇒ x=5
Hence D(5,8) is the corner point.
To find the point E, we take the intersection point of y-axis and the line 4 x+10 y =100 , i. e.
x=0∧4 x+10 y =100 . Hence B(0,10) is the corner point.
Therefore, the corner points are (0,0), (11,0), (9,4), (5,8), and (0,10).
Z =60 x+50 y .
Now at each corner point evaluate the objective function max
At (0, 0)⇒ Z=60 (0)+50( 0)=0 Birr
At (11, 0)⇒ Z=60 (11)+50( 0)=660 Birr
At (9, 4)⇒ Z=60 (9)+50 (4 )=740 Birr √
At (5, 8)⇒ Z=60 (5)+50(8 )=340 Birr
At (0, 10)⇒ Z=60 (0)+50(10 )=500 Birr
You observe that the maximum profit attained is 740 Birr, when x=9∧ y=4 .The maximum profit of
740 Birr when 9 type one microcomputers and 4 type two microcomputers per week are produced.
Substitute the value of the decision variables at each corner point into the objective function to obtain
its value at each corner point.
After all corner points have been so evaluated, select the one with the highest or lowest value
depending on the optimization case.
Once we get the optimal solution, x=9 , y=4 , and Z=740 Birr we have to substitute the value
of the decision variables into the constraints and check whether all the resources available are used or not.
If there is any unused resource we can use it for other purposes. The amount of unused resource is known
as slack- the amount of a scarce resource that is unused by a given solution. The slack can range from
zero, for a case in which all of a particular resource is used; to the original amount of the resource that
was available (i.e. none of it is used.)
Constraints that have no slack are sometimes referred to as binding constraints since they limit or bind the
solution. In the above cases, inspection time and storage space are binding constraints, while assembly
time has slack.
Knowledge of unused resource capacity can be useful for planning. A manager may be able to use the
remaining assembly time for other products, or, perhaps to schedule equipment maintenance, safety
seminars, training sermons or other activities
Interpretation:
The company is advised to produce 9 units of type one microcomputer and 4 units of type two
microcomputers per week to maximize its early profit to Birr 740 and, in doing so, the company would be
left with unused resource of 24 assembly hours, which can be used for other purposes.
Example 3-3 A dietitian is planning to serve the menu for lunch at a hotel. He plans to serve two main
items, all having different nutritional content. The dietitian is interested in providing at least a minimum
daily requirement of each of two vitamins in this one meal. The following table summarizes the vitamins
content per ounce of each of type of food, the cost per ounce of each food, and the minimum daily
requirement (MDR) for the two vitamins.
Solve using graphic approach based on the above diet problem summarized in the form of the linear
programming model stated below.
C min=5 x 1 +8 x 2
Subject to
10 x 1 +30 x 2 ≥140
20 x 1 +15 x 2 ≥145
x 1 , x 2≥0
Solution To find the feasible region draw the the graph of all the constraints on he same coordinate plane.
20 x 1 +15 x 2≥145
For the constraint
20 x 1 +15 x 2=145
4 x1 +3 x2 =29
x 0 29/4
y 29/3 0
x2
20
16
12
8 F
C
20 x1 15 x 2 145
4
BB 10 x1 30 x 2 140
A x1
The feasible region is shown in the above figure, which is unbounded and from fundamental theorem of
linear programming problems it has a minimum value (but no maximum value).
{10x1+30x2=140 ¿ ¿¿¿
Hence to solve for the point of intersection multiply the first equation by –2 and add it to the second
equation:
{−20x1−60x2=−280 ¿ ¿¿¿ ¿
¿
Hence
x 2 =3 and if you put this value in the first equation you have 10 x 1=140−30(3 )=50 . That
x =5 .
implies 1
Hence, the coordinate of the point B is (5,3).
Therefore, the corner points are (14,0), (5,3), and (0 , 29 /3) .
The difference between the minimum required amount and the optimal solution is called surplus. It can
be determined in the same way that slack can: substitute the optimum values of the decision variables into
the left side of the constraint and solve. The difference between the resulting value and the original right-
hand side amount is the amount of surplus. Surplus can potentially occur in a ¿ constraint.
The simplex method involves the use of the matrix operation and is used to reach the optimal solution of
the linear programming problem. In linear programming problems, the problem constraints are involved
with inequalities or equation and solving such system of inequalities graphically is impossible if there are
three or more variables. Hence, conversion of the inequalities into equations will take place and the whole
system will be handled using the matrix operation to find the optimal solution.
Therefore, the simplex method is an iterative technique that begins with a feasible solution that is not
optimal, but serves as a starting point. Through algebraic manipulation, the solution is improved until no
further improvement is possible (i.e. until the optimal solution has been identified). In each iteration
process you move one step closer to the optimal solution or reach on the optimal solution. In this section
you will deal with simplex method to handle standard maximization problems.
Example 3.3 Consider a linear programming problem associated with the microcomputers problem in
example 3.1. The linear programming problem is:
Basic
Cj 60 50 0 0 0 RHSV
Variables x y s1 s2 s 3 bj
s1 0 4 10 1 0 0 100
s2 0 2 1 0 1 0 22
s3 0 3 3 0 0 1 39
Zj 0 0 0 0 0 0
C j −Z j 60 50 0 0 0
In the second row and third column of the simplex matrix, you have the right hand side values (RHSV) of
each problem constraint.
In the second row and second column of the simplex matrix, the variables 1 2
s , s , and s3 have only one
non-zero entries (that is 1) under them and are referred to as the basic variables of the simplex matrix.
However, the variables x and y have more than one non-zero entries under them and are referred to as
the non-basic variables of the simplex matrix. The non-basic variables are always assigned a value zero,
that is x= y =0 .
In the second row and first column of the simplex matrix, the basic variables
s1 , s2 , and s3 are listed with
their coefficients in the objective function.
The value of the row
Zj is obtained by adding the product of the basic variables coefficient of objective
function with the corresponding coefficients of the problem constraints, while the
Z j value in obtained
using the RHSV values under it.
For example, the
Zj row is obtained as follows:
0( 4 )+0(2 )+0(3)=0 , 0 (10 )+0(1 )+0(3 )=0 , ⋯⋯, 0(100)+0 (22)+0(39 )=0
C j −Z j is obtained by subtracting the Z j row values from the coefficients of the objective function on
the top row correspondingly.
For example the
C j −Z j row is obtained as follows:
60−0=60 , 50−0=50 , 0−0=0 , 0−0=0 , 0−0=0 ,
The values of the basic variables are obtained by adding the product of the coefficient of the objective
function with corresponding values under it.
For example in the above simplex matrix, since x and y are non-basic variables they are always zero,
hence you have:
4 (0 )+10(0 )+ 1(s 1 )+ 0(s 2 )+ 0(s 3 )=100 ⇒ s 1=100
2(0 )+ 1(0 )+ 0(s 1 )+1(s 2 )+ 00(s 3 )=22 ⇒ s2 =22
3(0 )+3(0 )+0( s1 )+0( s2 )+1( s3 ) =39 ⇒ s 3 =39
Hence, the initial feasible solution is
x=0 , y =0 , s 1=100 , s 2=22 , s3 =39 and Z=0
2. Find unique solution for the new basic variable using pivot operations on the pivot element.
Now starting from the initial simplex matrix, you proceed with the pivot operation as follows:
Pivot element
Basic
Cj 60 50 0 0 0 RHSV
Variables x y s1 s2 s 3 b j b j / aij
s1 0 4 10 1 0 0 100 100/4=25
s2
s3
0
0
[ 2]
3 3
1 0
0
1
0
0
1
22
39 22/ 2=11∗¿¿39/ 3=13
⃗R1−2R2¿⃗(1/2)R2¿ R3−(3/2)R2¿
Zj 0 0 0 0 0 0
C j −Z j 60 50 0 0 0
Entering variable
or pivot column
Basic
Cj 60 50 0 0 0 RHSV
Variables x y s1 s2 s 3 bi
s1 0 0 0 1 6 −16 /3 24
x 60 1 0 0 1 −1/3 9
y 50 0 1 0 −1 0 4
Zj 60 50 0 10 40 /3 740 Optimal solution
C j −Z j 0 0 0 −10 −4 0/3
C −Z
Note: If all j j values are zeros and negatives, you have reached optimality, so you stop the pivot
operation, otherwise you need to continue with pivot operation and go from 3 to 4 until you get optimal
solution.
Example 3-4 A manufacturer of lawn and garden equipment makes two basic types of lawn mowers; a
push-type and a self-propelled model. The push type requires 9 minutes to assemble and 2 minutes to
pack; the self-propelled mover requires 12 minute to assemble and 6 minutes to pack. Each type has an
engine. The company has 12 hrs of assembly time, 75 engines, and 5 hrs of packing time available; profits
are Birr 70 for the self-propelled model and Birr 45 for the push type model per unit.
Required:
1. Develop the linear programming model
2. Find the optimal solution using simplex procedure
Solution
1. a. Problem definition:
To determine the number of units of each type of mower to be produce so that the profit is
maximized.
b. Variable representation
Let
x 1 be the number of push type mower manufactured, and
x 2 be the number of self propelled mower manufactured.
Basic
Cj 45 70 0 0 0 RHSV
Variables x 1 x 2 s 1 s2 s 3 b j b j / aij
s1 0 5 0 1 −2 0
p.c. 120 120/5=24∗¿¿50/( 1/3)=150
⃗(1/5)R ⃗
1 ¿R2−(1/15)R1¿ R3−(2/15)R1 ¿
x2 0 1/3 1 0 1/6 0 50
s3 0 2/3 0 0 −1/6 1 25 25/(2/3)=75/2
Zj 70/3 70 0 70/6 0 3500
C j −Z j p.c.
65 3 0 0 70 6 0
If we apply the graphic approach to solve the same problem we need to draw the graph of the constraints
on the same coordinate plane.
Z max =45 x 1 +70 x 2
Subject to
9 x 1 +12 x 2≤720
2 x 1 +6 x 2 ≤300
x 1 + x 2 ≤75
x 1 , x 2≥0
9 x +12 x 2≤720 , the corresponding equation is 9 x 1 +12 x 2=720
For the constraint 1
x1 0 80
x2 60 0
x2
80
9 x1 12 x 2 720
60
E
x1 x 2 75
40 D
C
20 F 2 x1 6 x 2 300
A B 80
x1
40 100 120 140
The corner points are A(0,0), B(0,75), C(60,15), D(24,42) and E(0,50).
Z =45 x 1 +70 x 2 .
Now, at each corner point, evaluate the objective function max
At (0 , 0)⇒ Z=45(0 )+70(0 )=0 Birr
At (75 , 0)⇒ Z=45(75 )+70 (0)=3375 Birr
At (60, 15) ⇒ Z=45(60 )+70(15)=3750 Birr
At (24 , 42) ⇒ Z=45(24 )+70( 42)=4020 Birr √
At (0 , 50) ⇒ Z=45(0 )+70(50)=3500 Birr
Therefore, the maximum profit is attained when 1
x =24 , x 2=42 and Z=4020 Birr.
From the problem constraints you observe,
a) On the assembly time: 9(24) + 12(42) = 720.
b) On the packing time: 2 (24) + 6 (42) =300.
s =9
c) On the number of engine: 24 + 42 = 66, there is 75 – 66 = 9 engines as a slack, so 3
Interpretation
The company is advised to produce 24 units of push type mower and 40 units of self-propelled mowers so
as to realize a profit of Birr 4020. In doing so, the company would be left with nine unused engines,
which can be used for other purposes.