Chapter 3
Chapter 3
INTRODUCTION TO LINEAR
PROGRAMMING
06/12/2023 1
Linear Programming
• Is an optimization method, which shows how
to allocate scarce resources such as money,
materials or time and how to do such
allocation in the best possible way subject to
more than one limiting condition expressed in
the form of inequalities and/or equations.
• It enables users to find optimal solution to
certain problems in which the solution must
satisfy a given set of requirements or
constraints.
06/12/2023 2
• Optimization in linear programming implies
either maximization (such as profit, revenue,
sales, and market share) or minimization (such
as cost, time, and distance) a certain objective
function. It implies that in LP we cannot
max/min two quantities in one model. It involves
linearly related multi-variate functions, i.e.,
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.
06/12/2023 3
Linear programming Models (LPM)
06/12/2023 5
Components of LP model
1. The Objective Function- is the mathematical or
quantitative expression of the objective of the
company/model.
• A single quantifiable objective
2. The Decision Variables - represent unknown
quantities to be resolved for.
3. The constraints - are restrictions which define
or limit the feasibility of a proposed course of
action.
4. Parameters - are fixed values that specify the
impact that one unit of each decision variable will
have on the objective and on any constraint
06/12/2023 6
06/12/2023 7
Assumption of LP Models
1. Linearity. Each decision variable has a linear
impact on the objective function and in each
constraint.
2. Divisibility : Non-integer values are
acceptable.
3. Certainty. model parameters values are known
and constant
4. Non-negativity: Negative values of variables
are unrealistic and, therefore, will not be
considered in any potential solution
06/12/2023 8
Formulating LP Models
1. Define the problem/problem definition
To determine the # of type 1 and type 2
products to be produced per mother so as
to maximize the monthly profit.
2. Identify the decision variables or
represent unknown quantities
Let X1 and X2 be the monthly qualities of
Type 1 and type 2 products
06/12/2023 9
3. Determine the objective function
Decide if the problem is a maximization or
a minimization problem and the coefficients
of each decision variable.
4. Identifying the constraints
06/12/2023 10
Example 1 : A firm that assembles computer
and computer equipment is about to start
production of two new microcomputers. Each
type of micro-computer will require assembly
time, inspection time and storage space. The
amount of each of these resources that can
be devoted to the production of
microcomputers is limited. The manger of the
firm would like to determine the quantity of
each microcomputer to produce in order to
maximize the profit generated by sales of
these microcomputers.
06/12/2023 11
• The manger has obtained the following information:
Type 1 Type 2
Profit per unit Birr 60 Birr 50
Assembly time per unit 4hrs 10hrs
Inspection time per unit 2hrs 1hr
Storage space per unit 3cubic ft 3cubic ft
The weekly amounts of resources are:
Resource Resource available
Assembly time 100hrs
Inspection time 22hrs
Storage space 39 cubic feet
06/12/2023 12
Solution:
Step 1: Problem Definition
To determine the number of two types of
microcomputers to be produced (and sold) per week so
as to maximize the weekly profit given the restriction.
Step 2: Variable Representation
Let X1 and X2 be the weekly quantities of type 1 and
type 2 microcomputers, respectively.
Step 3: Develop the Objective Function
Maximize or Zmax = 60X1 + 50X2
06/12/2023 13
Step 4: Constraint Identification
System constraints:
4X1 + 10X2 100hrs Assembly time
2X1 + X2 22hrs Inspection time
3X1 + 3X2 39 cubic feet Storage space
Individual constraint
No
Non-negativity constraint
X1, X2 0
06/12/2023 14
In summary, the mathematical model for
the microcomputer problem is:
Zmax = 60X1 + 50X2
Subject to:
4X1 + 10X2 100
2X1 + X2 22
3X1 + 3X2 39
X1, X2 0
06/12/2023 15
Example 2: An electronics firm
produces three types of switching
devices. Each type involves a two-step
assembly operation. The assembly times
are shown in the following table:
Assembly time per Unit (in minutes)
Section #1 Section #2
Model A 2.5 3.0
Model B 1.8 1.6
Model C 2.0 2.2
06/12/2023 16
• Each workstation has a daily working time of
7.5 hrs. The manager wants to obtain the
greatest possible profit during the next five
working days. Model A yields a profit of Birr
8.25 per unit, Model B a profit of Birr 7.50 per
unit and Model C a profit of Birr 7.80 per unit.
Assume that the firm can sell all it produces
during this time, but it must fill outstanding
orders for 20 units of each model type.
Required:
Formulate the linear programming model of this
problem.
06/12/2023 17
Step 1. Problem definition
To determine the number of three types
of switching devices to be produced and
sold for the next 5 working days so as to
maximize the 5 days profit.
Step 2. Variable representation
Let X1, X2 and X3 be the number of Model
A, B and C switching devices respectively,
to be produced and sold.
Step 3. Develop objective function
Zmax: 8.25X1 + 7.50X2 + 7.80X3
06/12/2023 18
2.5X1 + 1.8X2 + 2.0X3 2250 minutes Ass. time station 1
3.0X1 + 1.6X2 + 2.2X3 2250 minutes Ass. time station 2
X1 20 Model A
X2 20 Model B
X3 20 Model C
X1, X2, X3 0Non negativity
In summary:
Zmax: 8.25X1 + 7.50X2 + 7.80X3
: 2.5X1 + 1.8X2 + 2.0X3 2250 minutes
3.0X1 + 1.6X2 + 2.2X3 2250 minutes
X1 20 model A
X2 20 model B
X3 20 model C
X1, X2, X3 0 non negativity
06/12/2023 19
Example 3 : A diet is to include at least 140 mgs of
vitamin A and at least 145 Mgs of vitamin B. These
requirements are to be obtained from two types of
foods: Type 1 and Type 2. Type 1 food contains 10Mgs
of vitamin A and 20mgs of vitamin B per pound. Type
2 food contains 30mgs of vitamin A and 15 mgs of
vitamin B per pound. If type 1 and 2 foods cost Birr 5
and Birr 8 per pound respectively, how many pounds
of each type should be purchased to satisfy the
requirements at a minimum cost?
Vitamins
Foods A B
Type 1 10 20
Type 2 30 15
06/12/2023 20
Solution:
Step 1. Problem definition
To determine the pounds of the two types of foods to be purchased to
make the diet at a minimum possible cost within the requirements.
Step 2. Variable representation
Let X1 and X2 be the number of pounds of type 1 and type 2 foods to be
purchased, respectively.
Step 3. Objective function
06/12/2023 25
A. The Graphic Solution Method
• It is a relatively straightforward method for determining
the optimal solution to certain linear programming problems.
• Used only to solve problems that involve two decision
variables.
Example 1. Solving the micro-computer problem with graphic
approach
Zmax = 60X1 + 50X2
4X1 + 10X2 100
2X1 + X2 22
3X1 + 3X2 39
X1, X2 0
06/12/2023 26
Steps:
1. Plot each of the constraints and identify
its region – make linear inequalities
linear equations.
2. Identify the common region, which is an
area that contains all of the points that
satisfy the entire set of constraints.
3. Determine the Optimal solution- identify
the point which leads to maximum
benefit or minimum cost.
06/12/2023 27
06/12/2023 28
• To identify the maximum (minimum) value we
use the corner point approach or the extreme
point approach. The corner point/extreme
point approach has one theorem: It states
that;
• For problems that have optimal solutions, a
solution will occur at an extreme, or corner
point. Thus, if a problem has a single optimal
solution, it will occur at a corner point.
i. Determine the values of the decision variables at each
corner point. Sometimes, this can be done by inspection
(observation) and sometimes by simultaneous equation.
ii. Substitute the value of the decision variables at each
corner point.
iii. After all corner points have been so evaluated, select the
one with the highest or lowest value depending on the
06/12/2023 29
optimization case.
Points Coordinates How Value of Objective function
X1 X2 Determined Z = 60X1 + 50X2
A 0 0 Observation Birr 0
B 11 0 Observation Birr 660
C 9 4 Simultaneous Birr 740
equations
D 5 8 Simultaneous Birr 700
equations
E 0 10 Observation Birr 500
Basic solution
X1 = 9
X2 = 4
Z = Birr 740
06/12/2023 30
Constraint Amount used with Originally Amount of slack
X1 = 9 and X2 = 4 available (available – Used)
Assembly time 4(9) + 10(4) = 76 100 hrs 100 – 76 = 24 hrs
Inspection time 2(9) = 1 (4) = 22 22 hrs 22 – 22 = 0 hr
Storage space 3(9) + 3(4) = 39 39 cubic ft 39 – 39 = 0 cubic ft
06/12/2023 32
06/12/2023 33
Points Coordinates How Determined Value of the objective
X1 X2 function
Z = 5X1 + 8X2
A 0 9.67 Observation Birr 77.30
B 5 3 Simultaneous equations Birr 49
C 14 0 Observation Birr 70
06/12/2023 35
• The simplex procedure for a maximization problem
with all constraints consists of the following steps.
1. Write the LPM in a standard form: all
of the constraints as equalities by
adding the slack variables to each
constraint.
When slack variables are introduced to
the constraints, they are no longer
inequalities because the slack variable
accounts for any difference between
the left and right-hand sides of an
expression.
06/12/2023 36
Slack = Requirement – Production,
surplus = Production – Requirement
Taking the microcomputer problem its standard form
is as follows:
Zmax = 60X1 + 50X2 Zmax = 60X1 + 50X2 + 0S1 + S2 +
0S3
: 4X1 + 10X2 100 : 4X1 + 10X2 + S1 = 100
2X1 + X2 22 2X1 + X2 + S2 = 22
3X1 + 3X2 39 3X1 + 3X2 + S3 = 39
X1 , X 2 0 X 1, X2, S1, S2, S3 0
06/12/2023 37
2. Develop the initial tableau: the initial tableau
always represents the “Do Nothing” strategy,
so that the decision variables are initially
non-basic.
• List the variables across the top of the table and write
the objective function coefficient of each variable jut
above it.
• There should be one row in the body of the table for
each constraint. List the slack variables in the basis
column, one per raw.
• In the Cj column, enter the objective function
coefficient of zero for each slack variable. (Cj -
coefficient of variable j in the objective function)
• Compute values for row Zj
• Computer values for Cj – Zj.
06/12/2023 38
Entering
Variable
Sol/ Cj 60 50 0 0 0
n X1 X2 S1 S2 S3 RHS Øj = bj/xj (aij)
basi V
s
S1 0 4 10 1 0 0 100 100/4 = 25
Pivot S2 0 2* 1 0 1 0 22 22/2 =11 Leaving
row Variable
S3 0 3 3 0 0 1 39 39/3 = 13
Zj 0 0 0 0 0 0
Cj- 60 50 0 0 0 0
Zj
06/12/2023 39
2. Develop subsequent tableaus
06/12/2023 40
4. Find unique vectors for the new basic
variable using row operations on the pivot
element.
Sol/n Cj 60 50 0 0 0
basis X1 X2 S1 S2 S3 RHSV Øj = bj/xj (aij)
S1 0 0 8 1 -2 0 56 56/8 = 7
X1 60 1 1/2 0 1/2 0 11 11/. 5 = 22
Leaving
S3 0 0 3/2 0 -3/2 1 6 6/1.5 = 4
Variable
Zj 60 30 0 30 0 660
Cj-Zj 0 20 0 -30 0 0
Entering
Variable
Sol/n Cj 60 50 0 0 0
basis X1 X2 S1 S2 S3 RHSV
S1 0 0 0 1 6 -16/3 24 Optimal solution:
X1 60 1 0 0 1 -1/3 9 X1 = 9
X2 50 0 1 0 -1 2/3 4 X2 = 4
Zj 60 50 0 10 40/3 740 S1 = 24 hrs
Cj-Zj 0 0 0 -10 -40/3
06/12/2023
Z = Birr 740
41
5. Compute the Cj – Zj row, If all Cj – Zj
values are zeros and negatives you have
reached optimality.
6. If this is not the case, repeat step 2
to 4 until you get optimal solution.
• “A simplex solution in a maximization
problem is optimal if the Cj – Zj row
consists entirely of zeros and negative
numbers (i.e., there are no positive
values in the bottom row).”
06/12/2023 42
Example 2 :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
package; the self-propelled mower requires 12 minutes
to assemble and 6 minutes to package. Each type has
an engine. The company has 12 hrs of assembly time
available, 75 engines, and 5hrs of packing time. Profits
are Birr 70 for the self-propelled models and Birr 45
for the push-type mower per unit.
Required:
i. Formulate the linear programming models for this
problem.
ii. Determined how many mower of each type to make
in order to maximize the total profit (use the
simplex procedure).
06/12/2023 43
Solution:
1.
To determine ho many units of each types of mowers to
produce so as to maximize profit.
Let X1 - be push type mower.
X2 - be self-propelled mower.
c) Determine the objective function
Zmax = 45X1 + 70X2
d) Identify constraints
9X1 + 12X2 720 minutes Assembly time
2X1 + 6X2 300 minutes packing time
X1 + X2 75 engines Engines
X1, X2 0
06/12/2023 44
In summary:
Zmax = 45X1 + 70X2
: 9X1 + 12X2 720
2X1 + 6X2 300
X1 + X2 75
X1, X2 0
Sol/ Cj 45 70 0 0 0
n X1 X2 S1 S2 S3 RHSV
basis Optimal solutions:
X1 45 1 0 1/5 -2/5 0 24 X1 = 24 units
X2 70 0 1 -1/15 3/10 0 42 X2 = 42 units
S3 0 0 0 -2/15 1/10 1 9 S3 = 9 engines
Zj 45 70 13/3 3 0 4020 Z = Birr 4,020
06/12/2023 46
Cj-Zj 0 0 -13/3 -3 0
Example: A firm produces products A, B, and C,
each of which passes through assembly and inspection
departments. The number of person hours required
by a unit of each product in each department is given
in the following table. Person hours per unit of
product Product A Product B Product C
Assembly 2 4 2
Inspection 3 2 1
06/12/2023 49
Example: The state chairman of a political party
must allocate an advertising budget of birr 3,000,000
among three media: radio, television, and newspapers.
The expected number of votes gained per birr spent
on each advertising medium is given below. Expected
votes per Birr spent Radio Television Newspapers
3 5 2
Since these data are valid within the limited amounts spent on
each medium, the chairman has imposed the following restrictions:
• No more than Birr 500,000 may be spent on
television ads.
• No more than Birr 1,200,000 may be spent on radio
ads.
• No more than Birr 2,400,000 may be spent on
television and newspaper ads combined.
How much should be spent on each medium in order to
06/12/2023 50
maximize the expected number of votes gained?
06/12/2023 51
06/12/2023 52
06/12/2023 53
Some special Issues in LP
• Unbounded solutions
1. The objective function can be improved without
limit.
2. The solution is unbounded if there are no
positive ratios in determining the leaving
variable.
3. arises because the problem is incorrectly
formulated. For example, if the objective
function is stated as maximization when it
should be a minimization, if a constraint is
stated when it should be, or vice versa.
06/12/2023 54
• Multiple optimal solutions
• The same maximum value of the objective function
might be possible with a number of different
combinations of values of the decision variables.
• This occurs because the objective function is
parallel to a binding constraint.
• the Cj – Zj row of the final tableau. If a zero
appears in the column of a non-basic variable (i.e.,
a variable that is not in solution), it can be
concluded that an alternate solution exists.
06/12/2023 55
Degenerate:
• A basic feasible solution is called
degenerate if value of at least one basic
variable is zero.
06/12/2023 56
Important Definitions
• Solution The set of values of decision variables xj (j = 1,2,…, n) which
satisfy the constraints of an LP problem is said to constitute solution to
that LP problem.
• Feasible solution: The set of values of decision variables x j (j = 1,2,…, n)
which satisfy all the constraints and non- negativity conditions of an LP
problems 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)
which do not satisfy all the constraints and non- negativity conditions of an
LP problems simultaneously is said to constitute the infeasible solution to
that LP problem.
• Basic solution: For a set of m simultaneous equations in n variables ( n>m),
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. The (n-m)
variables whose value did not appear in this solution are called non-basic
variables and the remaining m variables are called basic variables.
06/12/2023 57
• Basic feasible solution: A feasible solution to 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 solutions are of two types:
• Non-degenerate: A basic feasible solution is
called non-degenerate if value of all m basic
variables are non- zero and positive.
• Optimal Basic feasible solution: A basic feasible
solution which optimizes the objective function
value of the given LP problem is called an optimal
basic feasible solution.
• Unbounded solution: A solution which can increase
or decrease the value of the LP problem
indefinitely is called an unbounded solution.
06/12/2023 58
Limitations of linear programming
• In linear programming uncertainty is not allowed, i.e., LP
methods are applicable only when values for costs, constraints,
etc. are known, but in real life such factors may be unknown.
• According to the LP problem, the solution variables can have any
value, whereas sometimes it happens that some of the variables
can have only integral values. For example, in finding how may
machines to be produced; only integral values of decision
variables are meaningful. Except when the variables have large
values, rounding the solution to the nearest integer will not
yield an optimal solution. Such situations justify the use of
Integer Programming.
• Many times, it is not possible to express both the objective
function and constraints in linear form.
06/12/2023 59
06/12/2023 60