You are on page 1of 174

MEC4103: OPERATIONS RESEARCH (3CUs)

Course Instructor: Ms. Gloria Faith Atto


Email: attogloriafaith@gmail.com
Tel: 0784167066/0703548650

Brief course description


• This course introduces students to the systematic planning of resource
allocation and utilization
Course objectives/learning outcomes
• At the end of the course students will be able to decide between alternatives
in industrial design and optimum use of available resources
• Effectively communicate ideas, explain procedures and interpret results and
solutions in simulation
DETAILED COURSE DESCRIPTION
• Review of linear algebra (Read about this in Pgs. 27-32 of PDF)
• Linear programming: LP formulations, solving LPs by; Graphical method, simplex
methods, duality, and sensitivity analysis.
• Network flows: transportation and assignment problems, shortest paths, minimum
spanning trees, network simplex method, multi-commodity flows.
• Modeling issues in linear programming and network flow applications.

Course Assessment
• Course work assignments (20%), Tests (20%), Final examination (60%)

Recommended Resources
• Hamdy A. Taha (2006): Operations Research: An Introduction, 8th Edition. Prentice Hall;
• Philip M. Morse (2007): Methods of Operations Research. Kormendi Press;
• Frederick S. Hillier, Gerald J. Lieberman, Frederick Hillier, and Gerald Lieberman
(2004): MP Introduction to Operations Research. McGraw-Hill
• The internet and other electronic resource
LECTURE ONE: INTRODUCTION
Definitions
• Operations research (OR) is the application of scientific methods to improve the effectiveness
of operations, decisions and management by means such as analyzing data, creating
mathematical models and proposing innovative approaches. OR is often concerned with
determining the maximum (of profit, performance or yield) or minimum (of loss, risk or cost)
of some real world objective

• “O.R. is applied decision theory, which uses any scientific, mathematical or logical means
to attempt to cope with the problems that confront the executive, when he tries to achieve
a thorough-going rationality in dealing with his decision problem”. ( Miller and Starr)

• “Operational Research is the attack of modern science on complex problems arising in the
direction and management of large systems of Men, Machines, Materials and Money in
Industry, Business, Government and Defense (Operational Research Society of Great
Britain)
INTRODUCTION…

Principal phases of implementing


Applications of OR operations research
•Military operations • The principal phases of
•Manufacturing eg manufacturing of safety implementing an operations
boots research in practice include:
•transportation • Definition of the problem
•public services • Mathematical model
•construction formulation
•telecommunication
• Solution of the model
• Validation of the model
•Finance
• Implementation of the
model
PRINCIPLE PHASES IN DETAILS

1. Problem definition
• This involves defining the scope of the problem under investigation. This phase is carried out by the
entire OR team. The aim is to identify three principal elements of the decision problem:
• Description of the decision alternatives
• Determination of the objective of the study
• Specification of the limitations under which the modeled system operates

2. Model formulation
• This entails an attempt to translate the problem definition into mathematical relationships. The
problem is identified with decision variables such as:
 How many units to buy/sell...
 How much time to spend on a task...
• Measure of performance is through the objective function
 What is the goal/objective?
 Usually: Max/min profit/cost/time/units
PRINCIPLE PHASES IN DETAILS…

3. Model Solutions
• Mathematical representations are always approximations of the real world. Model solution is by far the
simplest of all OR phases because it entails the use of well-defined optimization algorithms. An
important aspect of the model solution phase is sensitivity analysis. It deals with obtaining additional
information about the behavior of the optimal solution when the model undergoes some parameter
changes. Sensitivity analysis is particularly needed when the parameters of the model cannot be
estimated accurately.

4. Model testing/validation
• The process of testing/improving model is known as model validation. Model validity checks whether or
not the proposed model does what it purports to do (i.e. does it predict adequately the behavior of the
system under study?). Initially the OR team should be convinced that the model’s output does not
include “surprises.” In other words does the output make sense?
• The common method for checking validity is to compare its output with historical output data. The
model is valid if, under similar input conditions, it reasonably duplicates past performance. However, if
the proposed model represents a new (non-existing) system, no historical data would be available. In
such cases, we may use simulation as an independent tool for verifying the output of the mathematical
model.
PRINCIPLE PHASES IN DETAILS…

5. Implementation of the model solution


• Implementation of the solution of the validated model involves the translation of
the results into understandable operating instructions to be issued to the people
who will administer the recommended system. The burden of this task lies
primarily with the OR team.
 OR team explains system to management
 OR team develops procedures required to put system into operation
 Management trains personnel
LECTURE TWO: LINEAR PROGRAMMING (LP)
•2.1 Introduction
•2.2 Requirements of a Linear Programming problem
•2.3 Formulating small to moderate LP problems
•2.4 Graphical solution to an LP problem
•2.5 Special cases in LP problems

Introduction
• Linear programming is a technique that helps in resource allocation decisions. Resources include
machinery, labour, money, time, warehouse space, raw materials, etc.
• Computer programs help much in solving real life LP problems that are too cumbersome to solve by
hand or with a calculator.
• Requirements of a LP Problem
• All LP problems have three properties in common.
a. All LP problems seek to maximize or minimize a linear function of the decision variables.
The function to be minimized or maximized is called the objective function. That is max /
min z = f(x1, x2, …, xn) = c1x1+c2x2+…+cnxn; where xi is decision variable, ci is the
coefficient of the decision variable.
LINEAR PROGRAMMING
a. The values of the decision variables must satisfy a set of technological constraints. Each
constraint must be a linear equation or linear inequality. That is a 1jx1+a2jx2+…+anjxn = / ≥/≤ bj.
b. A sign restriction is associated with each variable. For any variable x i, the sign restriction
specifies that xi must be nonnegative (xi ≥ 0) or that xi may be unrestricted in sign (urs).
The general LP formulation

The general form for a Linear Programming problem is as follows:

Objective Function:

s.t.
Technological Constraints:

Sign Restrictions:

where ``urs'' implies unrestricted in sign.


Formulating a linear program
• 1. Choose decision variables
• 2. Choose an objective function – linear function in variables
• 3. Choose constraints – linear inequalities
• 4. Choose sign restrictions
LP Formulation, Example1
• A toy company makes two types of toys: toy soldiers and trains. Each toy is produced in two
stages, first it is constructed in a carpentry shop, and then it is sent to a finishing shop, where it is
varnished, vaxed, and polished. To make one toy soldier costs $10 for raw materials and $14 for
labor; it takes 1 hour in the carpentry shop, and 2 hours for finishing. To make one train costs $9
for raw materials and $10 for labor; it takes 1 hour in the carpentry shop, and 1 hour for finishing.
There are 80 hours available each week in the carpentry shop, and 100 hours for finishing. Each
toy soldier is sold for $27 while each train for $21. Due to decreased demand for toy soldiers, the
company plans to make and sell at most 40 toy soldiers; the number of trains is not restriced in any
way. What is the optimum (best) product mix (i.e., what quantities of which products to make) that
maximizes the profit (assuming all toys produced will be sold)?
• Solution

Hrs in Carpentry Hrs in finishing RM Labour S/price

Soldier 1 2 10 14 27

Train 1 1 9 10 21

Avail hrs 80 100


LP Formulation…
• Profits: Selling price -costs
Toy soldier, 27-(10+14)$ =3$
Toy train, 21-(9+10)$ =2$
Decision variables
Let x1 be the no. of toy soldiers produced
Let x2 be the no. of toy trains produced
Mathematical model formulated
Main Objective, Max z=3x1+2x2 (Objective function)
S.t. (constraints) x1 + x2 ≤ 80 (Carpentry time constraint)
2x1 +x2≤ 100 (Finishing time constraint)
x1 ≤ 40 (Soldier selling constraint)
Xi≥0, i=1,2
LP Formulation, Example 2
• Furniture company manufactures four models of chairs. Each chair
requires certain amount of raw materials (wood/steel) to make. The
company wants to decide on a production that maximizes profit
(assuming all produced chairs are sold). The required and available
amounts of materials are as follows;
Chair 1 Chair 2 Chair 3 Chair 4 Total
available
Wood 1 1 3 9 4,400 (lbs)

Steel 4 9 7 2 6,000 (lbs)


Profit $12 $20 $18 $40 maximize
Example 2…..
Decision variables
Let x1 be the no. of chair 1 produced
Let x2 be the no. of chair 2 produced
Let x3 be the no. of chair 3 produced
Let x4 be the no. of chair 4 produced

Mathematical model formulated


Main Objective, Max (Profit) z=12x1+20x2 +18x3 +40x4 (Objective function)
S.t. (constraints) x1+x2 +3x3 +9x4 ≤ 4,400 (Wood constraint)
4x1+9x2 +7x3 +2x4 ≤ 6,000(steel constraint)
Xi≥0, i=1,2,3,4
LP Formulation, Example 3
• A company wants to produce a certain alloy containing 30% lead, 30% zinc, and
40% tin. This is to be done by mixing certain amounts of existing alloys that can
be purchased at certain prices. The company wishes to minimize the cost. There
are 9 available alloys with the following composition and prices
Alloy 1 2 3 4 5 6 7 8 9 Blend
Lead (%) 20 50 30 30 30 60 40 10 10 30

Zinc(%) 30 40 20 40 30 30 50 30 10 30

Tin (%) 50 10 50 30 40 10 10 60 80 40

Cost ($/lb) 7.3 6.9 7.3 7.5 7.6 6.0 5.8 4.3 4.1 Minimize
Example 3…
Decision variables
Let x1 be the amount of alloy 1 in a unit of blend
Let x2 be the amount of alloy 2 in a unit of blend
Let x3 be the amount of alloy 3 in a unit of blend
Let x4 4
Let x5 5
Let x6 6
Let x7 7
Let x8 8
Let x9 9

Mathematical model formulated


Main Objcteive, Min (cost) z=7.3x1+6.9x2 +7.3x3 +7.5x4 +7.6 x5+6.0x6 +5.8x7 +4.3x8+4.1x9

S.t. (constraints) 0.2x1+0.5x2 +0.3x3 +0.3x4 +0.3x5+0.6x6 +0.4x7 +0.1x8 +0.1x4 = 0.3
9

0.3x1+0.4x2 +0.2x3 +0.4x4 +0.3x5+0.3x6 +0.5x7 +0.3x8 +0.1x4 = 0.3


9

0.5x1+0.1x2 +0.5x3 +0.3x4 +0.4x5+0.1x6 +0.1x7 +0.6x8 +0.8x4 = 0.4


9

Xi≥0, i=1,2,3,4,5,6,7,8,9
Class exercise
1. Post office requires different numbers of full-time employees on different days.
Each full time employee works 5 consecutive days (e.g. an employee may work
from Monday to Friday or, say from Wednesday to Sunday). Post office wants to
hire minimum number of employees that meet its daily requirements, which are as
follows.
Monday Tuesday Wednesday Thursday Friday Saturday Sunday
17 13 15 19 14 16 11

Problem 2: Dorian makes luxury cars and jeeps for high-income men and women. It
wishes to advertise with 1 minute spots in comedy shows and football games. Each
comedy spot costs $50K and is seen by 7M high-income women and 2M high-income
men. Each football spot costs $100K and is seen by 2M high-income women and 12M
high-income men. How can Dorian reach 28M high-income women and 24M high
income men at the least cost?
Class exercise…
• 3. My diet requires that all the food I eat come from one of the four “basic food groups”
(chocolate cake, ice cream, soda, and cheese cake). At present the following four foods
are available for consumption: brownies, chocolate ice cream, cola, and pineapple
cheesecake. Each brownie costs 50/=, each scoop of chocolate ice cream costs 20/=, each
bottle of cola costs 30/=, and each piece of pineapple cheesecake costs 80/=. Each day, I
must ingest at least 500 calories, 6 grams of chocolate, 10 grams of sugar and 8 grams of
fat. The nutritional content per unit of each food is shown in the table below. Formulate a
linear programming model that can be used to satisfy my daily nutritional requirements at
minimum cost.
Calories Chocolate Sugar Fat (gms)
(gms) (gms)

Brownie 400 3 2 2

Chocolate Ice Cream (1 scoop) 200 2 2 4

Cola (1 bottle) 150 0 4 1

Pineapple Cheesecake (1 piece) 500 0 4 5


DAY 2 : FORMULATING LARGER LPs
• On the Word Document
SOLVING LPs BY GRAPHICAL METHOD
• Graphical Analysis of Linear Programming: In this we use two models
1. Maximization Problems
2. Minimization problems
Maximization Problem :-
Maximize Z = 30x1 + 40x2
Subject to; 3x1 + 2x2 ≤ 600
3x1 + 5x2 ≤ 800
5x1 + 6x2 ≤ 1100 and
x1 ≥ 0, x2 ≥ 0
Solution:-
Let us consider Equation (1) i.e; 3x1 + 2x2 ≤ 600
Put x1= 0 and x2= 0 in equation (1), we get point (0,0)
GRAPHICAL METHOD…
Put x1= 0 in equation (1), x2= 300, we get point (0,300)
Put x2= 0 in equation (1), x1= 200, we get point (200,0)

Let us consider Equation (2) i.e; 3x1 + 5x2 ≤ 800


Put x1= 0 in equation (2), x2= 160, we get point (0,160)
Put x2= 0 in equation (2), x1= 266.66, we get point (266.66,0)

Let us consider Equation (3) i.e; 5x1 + 6x2 ≤ 1100


Put x1= 0 in equation (3), x2= 183.33, we get point (0,183.33)
Put x2= 0 in equation (3), x1= 220 we get point (220,0)

We then plot these points shading the side of the inequality sign for each equation and then
determining the feasible solution from the graph
GRAPHICAL METHOD…

NB, B is (220,0) and not (200,0) as shown in the graph


A, B, C, and D is feasible Region With help of graph from the Feasible Region we calculate Z Max
Value
Key Terms
Feasible Solution: Is a solution which satisfies all the constraints (including the non-negative)
presents in the problem. Feasible Region: Is the collection of feasible solutions. Multiple Solutions:
Are solutions each of which maximize or minimize the objective function. Unbounded Solution: Is a
solution whose objective function is infinite. Infeasible Solution: Means no feasible solution.
KEY TERMS…
• Basic Variable: Variable of a basic feasible solution has n non-negative value.
Non Basic Variable: Variable of a feasible solution has a value equal to zero.
• Artificial Variable: A non-negative variable introduced to provide basic feasible
solution and initiate the simplex procedures.
• Slack Variable: A variable corresponding to a ≤ type constraint is a non-negative
variable introduced to convert the inequalities into equations.
• Surplus Variable: A variable corresponding to a ≥ type constraint is a non-
negative variable introduced to convert the constraint into equations.
• Basic Solution: System of m-equation and n-variables is a solution where atleast
n-m variables equals zero.
• Basic Feasible Solution: System of m-equation and n-variables is a solution
where m variables are non-negative and n-m variables are zero.
• Optimum Solution: A solution where the objective function is minimized or
maximized.
GRAPHICAL METHOD, Example 2
Maximize Z = 3x1 + 2x2
Subject to; x1 + x2 ≤ 80
2x1 + x2 ≤ 100
x1 ≤ 40 and
x1 ≥ 0, x2 ≥ 0
Example 2…

Solving a linear program amounts to finding a best corner point by the following theorem.
Theorem 1. If a linear program has an optimal solution, then it also has an optimal
solution that is a corner point of the feasible region
Example 2…
Example 2…
• Graphical Method (main steps): 1. Find the feasible region.
• 2. Plot an iso-value (isoprofit, isocost) line for some value
• 3. Slide the line in the direction of increasing value until it only touches the region.
• 4. Read-off an optimal solution
Exercise
• Optimal solution is (x1 , x2) = (20, 60).
Qn.1 Use graphical method to solve the following problem:
Max (Z) = 4x1 + 10x2
Subject to 2x1 + x2 ≤ 50
2x1 + 5x2 ≤ 100
2x1 + 3x2 ≤ 90
x 1, x 2 ≥ 0

Qn.2 Use the graphical method to solve the following LP problem


Min (Z) = 3x1 + 2x2
Subject to 5x1 + x2 ≥ 10
x1 + x2 ≥ 6
x1 + 4x2 ≥ 12
x 1, x 2 ≥ 0
Exercise…
• Qn.3 Solve the following LP problem graphically
Min (Z) = 2x1 + 1.7x2
Subject to 0.15x1 + 0.10x2 ≥ 1.0
0.75x1 + 1.70x2 ≥ 7.5
1.30x1 + 1.10x2 ≥ 10.0
x1, x2 ≥ 0

• Qn.4 Solve the following LP problem graphically


Max (Z) = 2x1 + 3x2
Subject to x1 -x2 ≤ 1
x1 + x2 ≥ 3
x1, x2 ≥ 0
Exercise…
• Qn.5 Graphically solve the following problem of LP
Max (Z) = 3x1 + 2x2
Subject to 2x1 -3x2 ≥ 0
3x1 + 4x2 ≤-12
x1, x2 ≥ 0

Qn.6 Solve the following problem graphically


Min (Z) = 4x1 + 4x2
Subject to -2x1 + x2 ≤ 1
x1 ≤ 2
x1 + x2 ≤ 3
x1, x2 ≥ 0
SIMPLEX METHOD OF SOLVING LPs
• Starting feasible solution
• Set variables x1, x2 to zero and set slack variables to the values on the right-hand
side. → yields a feasible solution x1 = x2 = 0, x3 = 80, x4 = 100, x5 = 40
• Recall that the solution is feasible because all variables are non-negative and
satisfy all equations. (we get a feasible solution right away because the right-hand
side is non-negative; this may not always work)
• Note something interesting: in this feasible solution two variables (namely x1, x2)
are zero. Such a solution is called a basic solution of this problem, because the
value of at least two variables is zero.
• In a problem with n variables and m constraints, a solution where at least (n − m)
variables are zero is a basic solution
SIMPLEX METHOD…
• A basic solution that is also feasible is called a basic feasible solution (BFS). The
importance of basic solutions is revealed by the following observation.
• A basic solution that is also feasible is called a basic feasible solution (BFS). The
importance of basic solutions is revealed by the following observation.
• Basic solutions are precisely the corner points of the feasible region
• Recall that we have discussed that to find an optimal solution to an LP, it suffices
to find a best solution among all corner points. The above tells us how to compute
them – they are the basic feasible solutions.
• A variable in a basic solution is called a non-basic variable if it is chosen to be
zero. Otherwise, the variable is basic.
• The basic variables we collectively call a basis.
SIMPLEX METHOD…
Dictionary
• To conveniently deal with basic solutions, we use the so-called dictionary. A
dictionary lists values of basic variables as a function of non-basic variables.
• Example 1
Maximize Z = 3x1 + 2x2
S.t; x1 + x2 ≤ 80
2x1 + x2 ≤ 100
x1 ≤ 40
x1 ≥ 0, x2 ≥ 0
• Solution
• Express the constraints/inequalities interms of slack variables
SIMPLEX METHOD…
Max 3x1 + 2x2
S.t; x1 + x2 + x3 = 80
2x1 + x2 + x4 =100
x1 + x5 = 40
x1, x2 , x3 x4 x5 ≥ 0
Initial Dictionary
x3 = 80 - x1 -x2
x4 =100 - 2x1 - x2
x5 = 40 - x1
Z = 0 +3x1 + 2x2

N.B: The variable with the biggest positive integer enters basis
SIMPLEX METHOD…
• x1, x2 independent (non-basic) variables
• x3, x4, x5 dependent (basic) variables
• { x3, x4 , x5} is a basis
set x1 = x2 = 0 → the corresponding (feasible) solution is x3 = 80, x4 = 100,
x5 = 40 with value z = 0
X1 enters basis; NB: We consider only ratios with negative coefficients of
the variable entering basis
Ratio test
x3 : 80/1 = 80
x4 : 100/2 = 50
x5 : 40 /1 = 40 Lowest ratio, therefore x5 leaves basis
SIMPLEX METHOD…
x3 = 80 - x1 -x2
x4 = 100 - 2x1 -x2
x5 = 40 - x1
Z = 0 +3x1 + 2x2

We express x1 interms of x5 ;
x5 = 40 - x1 x1 = 40 - x5
Substitute x1 in all the equation in the initial dictionary ;
x1 = 40 - x5 x1 = 40 – x5
x3 = 80 – (40 - x5) -x2 New feasible dictionary x3 = 40 – x2 + x5
x4 =100 - 2(40 - x5) - x2 x4 =20 – x2 + 2 x5
Z = 0 +3 (40 - x5) + 2x2 Z = 120 +2x2- 3x5
enters basis
SIMPLEX METHOD…
• now x2, x5 are independent variables and x1 ,x3, x4 are dependent
• → {x1, x3, x4} is a basis
• X2 enters basis;
Ratio test
x1 : No negative coefficient of x2
x3 : 40/1 = 40
x4 : 20 /1 = 20 Lowest ratio, therefore x4 leaves basis
We express x2 interms of x4 ;
x4 = 20 – x2 + 2 x5 x2 = 20 – x4 + 2x5
SIMPLEX METHOD…
x1 = 40 - x5 New feasible dictionary x1 = 40 – x5
x2 = 20 – x4 + 2x5 x2 = 20 – x4 + 2x5
x3 = 40 –(20-x4 + 2x5) + x5 x3 = 20 +x4 - x5
Z = 120 +2(20-x4 + 2x5) -3 x5 Z = 160 -2x4+x5
enters basis
Ratio test x5 enters basis
x1 : 40/1 =40
x2 : Positive coefficient of x5
x3 : 20 /1 = 20 Lowest ratio, therefore x3 leaves basis
We express x5 interms of x3 ;
x3 = 20 +x4 - x5 x5 = 20 – x3 + x4
SIMPLEX METHOD…
x1 = 40 –(20 – x3 + x4) x1 = 20 + x3– x4
x2 = 20 – x4 + 2(20 – x3 + x4) Optimal dictionary x2 = 60 – 2x3 + x4

x5 = 20 – x3 + x4 x5 = 20 –x3 + x4
Z = 120 +2(20-x4 + 2x5) -3 x5 Z = 180 -x3 – x4

• no more improvement possible → optimal solution


• x1 = 20, x2 = 60, x3 = 0, x4 = 0, x5 = 20 of value z = 180
• Why? setting x3, x4 to any non-zero values results in a smaller value of
z
SIMPLEX METHOD…
• Summary of simplex Algorithm
• Preparation: find a starting feasible solution/dictionary
• 1. Convert to the canonical form (constraints are equalities) by adding slack
variables xn+1, . . . , xn+m
• 2. Construct a starting dictionary - express slack variables and objective function z
3. If the resulting dictionary is feasible, then we are done with preparation If not,
try to find a feasible dictionary using the Phase I. method
• Simplex step (maximization LP): try to improve the solution
• 1. (Optimality test): If no variable appears with a positive coefficient in the
equation for z → STOP, current solution is optimal
• set non-basic variables to zero • read off the values of the basic variables and the
objective function z → Hint: the values are the constant terms in respective
equations • report this (optimal) solution 2
SIMPLEX METHOD…
2. Else pick a variable xi having positive coefficient in the equation for z xi ≡
incoming variable
3. Ratio test: in the dictionary, find an equation for a variable xj in which xi appears
with a negative coefficient −a ,the ratio b/a is smallest possible (where b is the
constant term in the equation for xj )
4. If no such xj exists → stop, no optimal solution, report that LP is unbounded
5. Else xj ≡ outgoing variable → construct a new dictionary by pivoting: express xi
from the equation for xj , add this as a new equation, remove the equation for xj ,
substitute xi to all other equations (including the one for z)
6. Repeat from 1
SIMPLEX METHOD…
• Special cases
• Special case 1. Alternative solutions
Max x1 + I/2x2 x3 = 4 – 2x1 -x2
S.t; 2x1 + x2 ≤ 4 x4 =3 –x1 - 2x2 initial dictionary
x1 + 2x2 ≤ 3 Z = x1 + 1/2x2
x1 ≥ 0, x2 ≥ 0

• x1 enters basis
Ratio test
x3 : 4/2 = 2
x4 : 3/1 = 3
Lowest ratio is 2, therefore x3 leaves basis

We express x1 interms of x3 ;
-2x1 = x3 – 4 + x2 x1 = 2 –1/2x2 –1/2x3

Substitute x1 back in to the initial dictionary


SIMPLEX METHOD…
x1 = 2 –1/2x2 –1/2x3
x4 = 1 –3/2x2 +1/2x3
Z = 2 +0x2 -1/2x3
• Optimal solution (all coefficients non-positive) x1 = 2, x2 = 0, x3 = 0, x4 = 1, z = 2 Note that x2 appears with
zero coefficient in the expression for z → increasing x2 is possible, but does not affect the value of z
• Let x2 enter basis
Ratio test
x1 : 2 = 4
1/2
x4 : 1 = 2/3
3/2
Lowest ratio is 2/3, therefore x4 leaves basis

We express x2 interms of x4 ;
x2 = 2/3 +1/3x3 –2/3x4

Substitute x2 back in to the new feasible dictionary


SIMPLEX METHOD…
x1 = 5/3 -2/3x3 +1/3x4
x2 = 2/3 +1/3x3 –2/3x4
Z = 2 -1/2x3 +0x4
Again an optimal solution x1 = 5/3 , x2 = 2/3 , x3 = 0, x4 = 0, z = 2 → same value What if we
pivot again (on x4 ) ?

• Special case 2. Unbounded LP


max 2x1 + x2
s.t. -x1 + x2 ≤ 1
x1 -2x2 ≤ 2
x1, x2 ≥ 0
SIMPLEX METHOD…
x3 = 1 +x1 -x2
x4 = 2 – x1 +2x2
Z = 2x1 +x2
x1 enters basis, x4 leaves (the only choice), x1 = 2 + 2x2 − x4
x1 = 2 +2x2 -x4
x3 = 3 + x2 –x4
Z = 4+5x2 -2x4
For x2= x4= 0 , x1= 2, x3 = 3, z = 4 → A feasible solution

Special case 3: Degeneracy


x4 = 1 -2x3
x5 = 3 -2x1 +4x2 -6x3
x6 = 2 +x1 -3x2 -4x3

Z = 2x1-x2 +8x3
SIMPLEX METHOD…
X3 enters basis;
Ratio test
x4 : 1 = 1/2; x5 : 3 = 1/2 ; x5 : 2 = 1/2
2 6 4

Any of x4, x5, x6 , can be chosen to leave basis


we choose x4 to leave
We express x3 interms of x4 ; x3 = 1/2 +1/2x4

x3 = 1/2 -1/2x4
x5 = -2x1 +4x2 +3x4
x6 = x1 -3x2 +2x4
Z = 4 +2x1 –x2 -4x4

• now x1 enters, and x5 leaves (the only choice), x1 = 2x2 − 3/2 x4 − 1/2x5
SIMPLEX METHOD…
x1 = 2x2 +3/2x4 -1/2x5
x3 = 1/2 -1/4x4
x6 = -x2 +7/2x4 -1/2x5
Z = 4 +3x2 –x4 -x5
• Degenerate for instance, if there is more than one choice for an outgoing variable (the
ones not chosen will be zero in the subsequent dictionary)

Exercise questions
1. Solve the following LP problem using the simplex method.
Max 3x1 + 2x2
S.t; 2x1 + x2 ≤ 2
3x1 + 4x2 ≥ 12
x1, x2 ≥ 0
SIMPLEX METHOD…
2. Solve the following LPP using graphical method and verify by Simplex method
Max Z = 10x1 + 8x2
S.t; x1 + 2x2 ≤ 1000
x1 ≤ 300
x2 ≤ 500
x1, x2 ≥ 0
3. Solve the following LPP (Linear Programming Problem)by simplex method.
Max 60x1 + 70x2
S.t; 2x1 + x2 ≤ 300
3x1 + 4x2 ≥ 509
4x1 + 7x2 ≥ 812
x1, x2 ≥ 0
DUALITY
• Primal – Dual
Associated with any LP is another LP called the dual. Knowledge of the dual
provides interesting economic and sensitivity analysis insights. When taking the
dual of any LP, the given LP is referred to as the primal. If the primal is a max
problem, the dual will be a min problem and vice versa.

• Finding the Dual of an LP


The dual of a normal max problem is a normal min problem. Normal max problem
is a problem in which all the variables are required to be nonnegative and all the
constraints are ≤ constraints. Normal min problem is a problem in which all the
variables are required to be nonnegative and all the constraints are ≥ constraints.
Similarly, the dual of a normal min problem is a normal max problem.

The Dual Theorem: The primal and dual have equal optimal objective function
values (if the problems have optimal solutions).
DUALITY
• It is clear from the above that the dual is obtained symmetrically from the primal according to
the following rules:
1. For every primal constraint there is a dual variable.
2. For every primal variable there is a dual constraint.
3. The constraint coefficients of a primal variable form (in transposed form) the left hand side
coefficients of the corresponding dual constraint. Or the matrix of constraints coefficients for
one problem is the transpose of the matrix of the constraint coefficients for the other problem,
4. The objective coefficient of the primal variable becomes the right hand side of the dual
constraint.
In general, for maximization problem with ≤ inequalities, the dual is obtained simply by
• transposing (flipping around the diagonal) the matrix A,
• swapping vectors b and c,
• switching the inequalities to ≥, and
• changing max to min.
max c Tx Ax ≤ b min b Ty ATy ≥ c
x≥0 y≥0
DUALITY
• Finding the Dual of a Normal Max Problem
PRIMAL max z = c1 x1 + c2 x2 +…+ cn xn
s.t. a11 x1 + a12 x2 + … + a1n xn ≤ b1
a21 x1 + a22 x2 + … + a2n xn ≤ b2
am1 x1 + am2 x2 + … + amn xn ≤ bm
xj ≥ 0 (j = 1, 2, …, n)

DUAL min w = b1 y1 + b2 y2 +…+ bm ym


s.t. a11 y1 + a21 y2 + … + am1 ym ≥ c1
a12 y1 + a22 y2 + … + am2 ym ≥ c2

a1n y1 + a2n y2 + … + amn ym ≥ cn


yi ≥ 0 (i = 1, 2, …, m)
DUALITY
Example 1. Consider the primal LP;
Min w = 3y1 + 2y2 + y3
S.t; y1 + y2 + y3 ≥ 4
y1 - y3 ≤ 2
y1 + y2 + y3 ≥ 6
y1, y2 , y3 ≥ 0
It’s Dual will be;
Max z = 4x1 + 2x2 + 6x3
S.t; x1 + x2 + x3 ≤ 3
x1 + x3 ≥ 2
x1 -x2 + x3 ≤ 1
x1, x2 , x3 ≥ 0
DUALITY
• Economic Interpretation
When the primal is a normal max problem, the dual variables are related to
the value of resources available to the decision maker. For this reason, dual
variables are often referred to as resource shadow prices.

• Example: PRIMAL; Let x1, x2, x3 be the number of desks, tables and
chairs produced. Let the weekly profit be $z. Then, we must
max z = 60x1 + 30x2 + 20x3
s.t. 8x1 + 6x2 + x3 ≤ 48 (Lumber constraint)
4x1 + 2x2 + 1.5x3 ≤ 20 (Finishing hour constraint)
2x1 + 1.5x2 + 0.5x3 ≤ 8 (Carpentry hour constraint)
x1, x2, x3 ≥ 0
DUALITY
• DUAL Suppose an entrepreneur wants to purchase all of Dakota’s
resources. In the dual problem y1, y2, y3 are the resource prices (price
paid for one board ft of lumber, one finishing hour, and one carpentry
hour). $w is the cost of purchasing the resources. Resource prices must
be set high enough to induce Dakota to sell. i.e. total purchasing cost
equals total profit.

min w = 48y1 + 20y2 + 8y3


s.t. 8y1 + 4y2 + 2y3 ≥ 60 (Desk constraint)
6y1 + 2y2 + 1.5y3 ≥ 30 (Table constraint)
y1 + 1.5y2 + 0.5y3 ≥ 20 (Chair constraint)
y1, y2, y3 ≥ 0
DUALITY
• Example 3: Consider the primal;
Max 3x1+2x2
x1 + x2 ≤ 80 [wood]
2x1+ x2 ≤ 100 [paint]
x1,x2 ≥ 0

It’s dual will be;


Min 80y1+100y2
y1 + 2y2 ≥ 3 [toy soldiers]
y1+ y2 ≥ 2 [toy trains]
y1,y2 ≥ 0
NON NORMAL LPs
Finding the dual of a non-normal LP
• A primal LP will be considered non-normal when either of the following is
observed
1. The constraint is an equation
2. The variable is unrestricted in sign
3. The constraint is of the type ≥ for a maximization LP problem
4. The constraint is of the type ≤ for a maximization LP problem
• The following is done when such a situation occurs
1. If some primal constraint is an equality constraint, then the corresponding dual
variable is unrestricted in sign.
2. If some primal variable is unrestricted, then the corresponding dual constraint is
an equality constraint.
NON NORMAL LPs
• Summary
Objective Function Variables Nature of Remarks
Constraints
Maximization xi ≥ 0 All ≤ Normal LP
some are urs =, ≥ Non normal LP

Minimization xi ≥ 0 All ≥ Normal LP


some are urs =, ≤ Non normal LP

• Examples of non-normal LPs; Primal LP


Max z = 2x1 + x2
s.t. x1 + x2 = 2
2x1 – x2 ≤ 3
-x1 + x2 ≤ -1
X1 ≥ 0; x2urs
NON NORMAL LPs
The dual LP
Min Z= 2y1+3y2 –y3
s.t. y1+2y2 –y3 ≥ 2
y1- y2+ y3 = 1
y1 urs,y2, y3 ≥ 0

• Example 2
• Primal LP Dual LP

Max z = 5x1+12x2+4x3 Min z = 10 y1+8y2


s.t. x1+2x2 +x3 ≤ 10 s.t. y1+2y2 ≥ 5
2x1 – x2 +3x3 = 8 2y1 – y2 ≥ 12
x1, x2, x3, ≥ 0 y1+3y2 ≥ 4
y1, y2,urs
MINIMIZATION BY THE SIMPLEX METHOD
• Steps
1. From the initial primal minimization problem, formulate a dual problem in
standard maximization form
2. Use the simplex method to solve the dual maximization problem
3. Identify the optimal solution to the original minimization problem from the
optimal simplex dictionary
Example 1: Solve the LPP below by the simplex method
Min Z = 12x1+16x2
x1 + 2x2 ≥ 40
x1+ x2 ≥ 30
x1,x2 ≥ 0
MINIMIZATION…
Solution
• It’s dual maximization problem would be;
Max Z = 40y1+30y2 canonical form;
y1+y2 ≤ 12 y1+y2 +y3 = 12
2y1+ y2 ≤ 16 2y1+ y2 +y4 = 16
y1,y2 ≥ 0 y1,y2 y3,y4 ≥ 0
Initial dictionary;
y3 = 12 - y1-y2
y4 = 16 - 2y1- y2
Z = 40y1+30y2
MINIMIZATION…
y1 enters basis; Ratio tests: y3: 12/1= 12, y4 : 16/2 = 8. Therefore y4 with the lowest ratio leaves basis
From y4 = 16 - 2y1- y2 ;
-2y1 = y4 -16 + y2
y1 = 8 – 1/2y2 -1/2y4

y3 = 12 – (8-1/2y2 -1/2y4) - y2 y1 = 8 – 1/2y2 -1/2y4


y3 = 4+1/2y2 +1/2y4 - y2 y3=4-1/2y2 +1/2y4 New feasible dictionary

y3=4-1/2y2 +1/2y4 Z = 320+10y2 -20y4

Z = 40(8-1/2y2 -1/2y4) +30y2


= 320-20y2 -20y4) +30y2
Z = 320+10y2 -20y4
MINIMIZATION…
y2 enters basis; Ratio tests: y1: 8 = 16, y3: 4 = 8. Therefore y3 with the lowest ratio leaves basis ½
½ ½

y3 = 4+1/2y2 +1/2y4 - y2
-1/2y2 = y3 – 4 -1/2y4
-y2 = 2y3 -8-y4
y2 = 8-2y3 +y4

y1 = 8 – 1/2(8-2y3+y4) – 1/2y4
= 8 – 4+y3-1/2y4) – 1/2y4
y1 = 4+y3-y4

Z = 320+10(8-2y3 +y4) -20y4 y1 = 4 +y3 -y4


= 320+80-20y3 +10y4 -20y4 y2=8-2y3 +y4 Optimal dictionary

Z = 400-20y3 -10y4 Z = 400-20y3 -10y4


MINIMIZATION…
• The minimum value for the minimization problem can be obtained from the last row; Z= 400, x1
= 20, x2 = 10
Example 2: Solve the LP problem below by the simplex method
Min Z = 6x1+8x2
2x1+3x2 ≥ 7
4x1+ 5x2 ≥ 9
x 1 ,x 2 ≥ 0
Solution
• It’s dual maximization problem would be;
Max Z = 7y1+9y2 canonical form;
2y1+4y2 ≤ 6 2y1+4y2 +y3 = 6
3y1+5y2 ≤ 8 3y1+5y2 +y4 = 8
y 1 ,y 2 ≥ 0 y 1 ,y 2 y 3 ,y 4 ≥ 0
MINIMIZATION…
Initial dictionary;
y3 = 6- 2y1-4y2
y4 = 8 - 3y1-5y2
Z = 7y1+9y2
y2 enters basis; Ratio tests: y3: 6/4= 1.5, y4 : 8/5 = 1.6. Therefore y3 with the lowest ratio
leaves basis
-4y2 = y3-6+2y1
y2 = 6/4-1/2y1-1/4y3
y2 = 3/2-1/2y1-1/4y3

Substitute back in to the equation;

y4 = 8 - 3y1-5(3/2-1/2y1-1/4y3)
y4 = 8 - 3y1-15/2+5/2y1+5/4y3
y4 = ½-1/2y1+5/4y3
MINIMIZATION…
Z = 7y1+9(3/2-1/2y1-1/4y3)
= 7y1+27/2-9/2y1-9/4y3)
z =5/2y1+27/2-9/4y3 ½

New feasible dictionary


y2 = 3/2-1/2y1-1/4y3
y4 = ½-1/2y1+5/4y3
z =5/2y1+27/2-9/4y3

y1 enters basis; Ratio tests: y2: (3/2)x2 = 3, y4 : (1/2)x2 = 1. Therefore y4 with the lowest
ratio leaves basis
-1/2y1 = y4-1/2-5/4y3
-y1 = 2y4-1-5/2y3
y1 = 1+5/2y3 -2y4

y2 = 3/2-1/2(1+5/2y3 -2y4) -1/4y3


= 3/2-1/2-5/4y3+y4-1/4y3
MINIMIZATION…
Z = 5/2(1+5/2y3-2y4) +27/2-9/4y3
= 16+25/4y3-(5/2)x2y4-9/4y3
z =16+4y3-5y4

New feasible dictionary


y1 = 1+5/2y3-2y4
y2 = 1-3/2y3+y4
z =16+4y3-5y4

y3 enters basis; y2 leaves basis (only option)


-3/2y3= y2 -1-y4
-y3= 2/3y2 -2/3-2/3y4
y3= 2/3 -2/3y2 -2/3y4

y1 = 1+5/2(2/3 -2/3y2 -2/3y4)-2y4


= 1+5/3 -5/3y2 -5/3y4-2y4
y1 = 8/3 -5/3y2 -11/3y4
MINIMIZATION…
Z = 16+4(2/3-2/3y2-2/3y4) -5y4
= 16+8/3-8/3y2-8/3y4 -5y4
z =56/3-8/3y2-23/3y4

Optimal dictionary
y1 = 8/3+5/3y2-11/3y4
y3 = 2/3-2/3y2-2/3y4
z =56/3-8/3y2-23/3y4
• The minimum value for the minimization problem can be obtained from the last row;
z = 56/3, x1 = 8/3, x2 = 23/3
Class Exercise
Solve the following minimization LP problems by simplex method
1. Min Z = 12x1+10x2
s.t. x1+ x2 ≥ 6
2x1+ x2 ≥ 8
x1,x2 ≥ 0
MINIMIZATION…
2. Min Z = 40x1+48x2+30x3
s.t. 2x1+2x2+x3 ≥ 25
x1+3x2 +2x3 ≥ 30
x1,x2 ,x3 ≥ 0

3. Min Z = 3x1+2x2
s.t. 2x1+ x2 ≥ 6
x1 + x2 ≥ 4
x1,x2 ≥ 0

4. Min Z = 0.12x1+0.15x2
s.t. 60x1+ 60x2 ≥ 300
12x1+ 6x2 ≥ 36
10x1+ 30x2 ≥ 90
x1,x2 ≥ 0
SENSTIVITY ANALYSIS
Introduction:
• Optimal solutions to linear programming problems have thus far been found under
what are called deterministic assumptions. This means that we assume complete
certainty in the data and relationships of a problem namely, prices/costs are fixed,
resources known, time needed to produce a unit exactly set, etc. But this is not the
case in real world, conditions are dynamic and changing.

• The chapter will address how changes in the LP’s parameters affect the LP’s
optimal solution, hence sensitivity / post optimality analysis. The Modified
problem is obtained by:
1. changing the objective function
2. changing the right-hand side (rhs) of a constraint
3. adding a variable/activity
4. adding a constraint
SENSTIVITY…
Initial Dictionary (basis) Optimal Dictionary (basis) NBV Optimal solution
Problem =0

Modified Modified Initial Dictionary Modified Optimal Modified Optimal


Problem Dictionary solution

For what changes is the original optimal solution also optimal in the modified
problem?
For what changes is it feasible?
For what changes is the optimal basis also optimal in the modified problem?
How do we recompute modified optimal solution from optimal basis?
How do we recompute modified optimal dictionary?
SENSTIVITY…
1. Changing the objective function
Considering this LP;
Maximize Z = 3x1 + 2x2
Subject to; x1 + x2 ≤ 80
2x1 + x2 ≤ 100
x1 ≤ 40
x1 ≥ 0, x2 ≥ 0

optimal solution x1 = 20, x2 = 60


Change the coefficient c1 = 3 in z to 2.5 → z ′ = 2.5x1 + 2x2
The solution x1 = 20, x2 = 60 still optimal, value z ′ = 170

The basic solutions (corner points) are; (0,0), (0,80), (20,60), (20,40), (40,0) as
shown on the graph in the next slide. Substitute these coordinates in to z ′ = 2.5x1 +
2x2 , you will find the max z ′ value still with (20,60)
SENSTIVITY…
SENSTIVITY…
Change c1 = 3 to 1 → z” = x1 + 2x2
Again substitute the coordinates of the corner points in to z” = x1 + 2x2 , you will
find the max z” value will be at (0,80)
→ The solution x1 = 20, x2 = 60 not optimal, value z ′ = 140
→ Better solution x1 = 0, x2 = 80, value z ′ = 160 > 140

Change c1 = 3 to 5 → z’ = 5x1 + 2x2


Again substitute the coordinates of the corner points in to z’ = 5x1 + 2x2, you will
find the max z’ value will be at (40,20)
→ the solution x1 = 20, x2 = 60 not optimal, value z ′ = 220
→ better solution x1 = 40, x2 = 20, value z ′ = 240 > 220
SENSTIVITY…
Optimal dictionary containing optimal solution. The effect of changing c will be
observed in the optimal solution as seen in the z values in slides 70-71
x1 = 20 + x3– x4
x2 = 60 – 2x3 + x4 Substitute the two equations in to the original objective function
x5 = 20 –x3 + x4 for the different c values chosen
Z = 180 -x3 – x4
Using the initial objective function; Maximize z = 3x1 + 2x2
z = 3(20 + x3– x4) + 2(60 –2x3+ x4)
z= 180−x3−x4

For c1 = 2.5 For c1 = 1 For c1 = 5


Max z = 2.5x1 + 2x2 Max z = x1 + 2x2 Max z = 5x1 + 2x2
= 2.5(20 + x3– x4)+2(60 –2x3+ x4) =(20 + x3– x4)+2(60 –2x3+ x4) =5(20 + x3– x4)+2(60 –2x3+ x4)
= 170−1.5x −0.5x = 140−3x +x = 220+x −3x
SENSTIVITY…
• Coefficient ranging
• we want to find the range for the coefficient c 1 for which the optimal solution remains optimal
z’ = c1x1 + 2x2
= c1(20 + x3– x4) +2(60 –2x3+ x4)
= 20c1 +c1x3– c1x4+120-4x3+2x4
= 20c1+120+(c1– 4)x3+(2-c1)x4
≤0 ≤0
It is optimal if all coefficients are non-positive → c 1−4 ≤ 0 and 2−c1 ≤ 0
⇒ 2 ≤ c1 ≤ 4

• Second coefficient
z’ = 3x1 + c2x2
= 3(20 + x3– x4) +c2(60 –2x3+ x4)
= 60 +3x3– 3x4+60c2 -2c2 x3+ c2 x4
= 60(1+c2)+(3-2c2)x3+(c2-3)x4
≤0 ≤0
It is optimal if all coefficients are non-positive → 3-2c 2 ≤ 0 and c2−3 ≤ 0
⇒ 3/2 ≤ c2 ≤ 3
SENSTIVITY…
2. Changing the right hand side value
Maximize Z = 3x1 + 2x2
Subject to; x1 + x2 ≤ 80 x1 = 20 + x3– x4
2x1 + x2 ≤ 100 Optimal dictionary x2 = 60 – 2x3 + xOptimal basis{x , x , x ,}
1 2 2
4
x1 ≤ 40 and
x5 = 20 –x3 + x4
x1 ≥ 0, x2 ≥ 0
Z = 180 -x3 – x4
• Change the coefficient b1= 80 on the rhs of the 1st constraint to 70 → x1 + x2 ≤ 70 → the point x1=20, x2 = 60
not feasible
• New optimum x1= 30, x2= 40 but same basis {x1,x2,x5}
• Change b1 to 50 → x1+ x2 ≤ 50 → the point x1 = 20, x2 = 60 not feasible → new optimum x1= 10, x2= 40 new
basis {x1, x2, x4}
• Change b1 to 90 → x1 + x2 ≤ 90 → the point x1= 20, x2= 60 feasible but not optimal
• New optimum x1= 10, x2= 80 same basis
• change b1 to 110 → x1 + x2 ≤ 110 → the point x1= 20, x2= 60 feasible but not optimal
• new optimum x = 0, x = 110 new basis {x ,x ,x }
SENSTIVITY…
SENSTIVITY…
• Coefficient ranging
We want to find the values of b1 for which the optimal basis remains optimal (optimal solution may not)
Initial dictionary Optimal dictionary
x3 = 80 – x1– x2 x1 = 20 + x3– x4
x4 = 100 – 2x1 – x2 x2 = 60 – 2x3 + x4
x5 = 40 –x1 x5 = 20 –x3 + x4
Z = 0 + 3x1 +2x2 Z = 180 -x3 – x4

Changing b1= 80 to 80+∆1 where ∆1 can be positive or negative. How does it change the final
dictionary?
x3 = (80+∆1) - x1– x2 x3 -∆1 = 80 – x1– x2 x3’ = 80 – x1– x2
x4 = 100 – 2x1 - x2 x4 = 100 – 2x1 – x2 x4 = 100 – 2x1 – x2
x5 = 40 –x1 – x2 x5 = 40 –x1 – x2 x5 = 40 –x1 – x2
Z = 0 +3x1 +2x2 Z = 0 +3x1 +2x2 Z = 0 +3x1 +2x2

where x3’ = x3 -∆1


SENSTIVITY…
• Substituting in the optimal dictionary (with x3’ in place of x3)
x1 = 20 + x3’-x4 x1 = 20 +(x3 -∆1) – x4 x1 = 20 -∆1+x3– x4
x2 = 60 – 2x3’+ x4 x2 = 60 – 2(x3 -∆1) + x4 x2 = 60 +2∆1– 2x3 – x4
x5 = 20 –x3’ + x4 x5 = 20 –(x3 -∆1) + x4 x5 = 20 +∆1–x3 + x4
Z = 180 - x3’-x4 Z = 180 -(x3 -∆1) –x4 Z = 180 +∆1 -x3 –x4
Final modified dictionary
When is this dictionary optimal? When it is feasible, since all coefficients in z are
non-positive It is feasible, if x1,x2,x5 are non-negative. Setting the non-basic
variables x3= x4= 0, we obtain
x1 = 20 − ∆1 ≥ 0 ∆1 ≤ 20
x2 = 60 + 2∆1 ≥ 0 → ∆1 ≥ −30 −20 ≤ ∆1 ≤ 20
x5 = 20 + ∆1 ≥ 0 ∆1 ≥ −20
Try ∆1 = 10 → b1 = 90, x1= 10, x2= 80, z = 190 → exactly as we saw before
Try ∆1= −10 → b1 = 70, x1 = 30, x2 = 40, z = 170
SENSTIVITY…
• Similarly for b2= 100 the coefficient of the 2nd constraint → b2 = 100+∆2 ⇒ substitute
x4’ = x4−∆2
x1 = 20 + x3-x4’ x1 = 20 +x3 -(x4 -∆2) x1 = (20 +∆2)+x3
x2 = 60 – 2x3+ x4’ x2 = 60 – 2x3+(x4 -∆2) x2 = (60 -∆2)– 2x3+x4
x5 = 20 –x3 + x4’ x5 = 20 –x3+(x4 -∆2) x5 = (20-∆2)–x3 + x4
Z = 180 - x3-x4’ Z = 180 -x3-(x4 -∆2) Z = (180 +∆2) -x3 –x4

Optimal if feasible → x1 = 20 + ∆2 ≥ 0; ∆2 ≥ −20


x2 = 60 − ∆2 ≥ 0; → ∆2 ≤ 60 −20 ≤ ∆2 ≤ 20
x5 = 20 − ∆2 ≥ 0; ∆2 ≤ 20
SENSTIVITY…
• Finally, changing b3 = 40, the rhs of the 3rd constraint→ b3 = 40 +∆3 ⇒ substitute x5’ = x5−∆3
x1 = 20 + x3-x4 x1 = 20 +x3 -x4 x1 = 20 +x3 -x4
x2 = 60 – 2x3+ x4 x2 = 60 – 2x3+x4 x2 = 60 – 2x3+x4
x5’ = 20 –x3 + x4 (x5 -∆3) = 20 –x3+x4 x5 = (20+∆3)–x3 + x4
Z = 180 - x3-x4 Z = 180 -x3-x4 Z =180 -x3 –x4

Optimal if feasible → x5 = 20 + ∆3 ≥ 0; ∆3 ≥ −20 −20 ≤ ∆3 ≤ ∞

3. Modifying the left-hand side of a constraint


Equipment shortages cause that toy soldiers require 3 hours in the finishing shop (instead of 2).

Maximize Z= 3x1+2x2 x3 = 80 – x1-x2 x1 = 20 +x3 –x4


Subject to; x1 + x2 ≤ 80 x4 = 100 –2x1-x2 x2 = 60 – 2x3+x4
2x1 + x2 ≤ 100 x5 = 40 –x1 x5 = 20–x3 + x4
x1 ≤ 40
x1 ≥ 0, x2 ≥ 0 Z = 0 +3x1+2x2 Z =180 -x3 –x4

Initial problem Initial dictionary Optimal dictionary


SENSTIVITY…
Maximize Z= 3x1+2x2 x3 = 80 – x1-x2
Subject to; x1 + x2 ≤ 80 x4 = 100 –3x1-x2
3x1 + x2 ≤ 100 x5 = 40 –x1 ?
x1 ≤ 40 Z = 0 +3x1+2x2
x1 ≥ 0, x2 ≥ 0
Modified problem Modified initial dictionary Modified optimal dictionary

x3 = 80 – x1-x2 x1 = 20 +x3- x4’ x1 = 20 +x3- (x4 +x1)


(x4 +x1) = 100 –2x1-x2 x2 = 60 –2x3+x4’ x2 = 60 – 2x3+(x4 +x1)
x5 = 40 –x1 x5 = 20 –x3 +x4’ x5 = 20–x3+(x4 +x1)
Z = 0 +3x1+2x2 Z = 180 –x3-x4’ Z =180 -x3–(x4 +x1)
• Eliminate x1 from the rhs by solving for x1 from the first equation, and then substituting:
x1 = 20 +x3- (x4 +x1)
2x1 = 20 +x3- x4
SENSTIVITY…
x2 = 60 – 2x3+x4 +10 +1/2x3-1/2x4 = 70 -3/2x3+1/2x4
x5 = 20–x3+x4+10 +1/2x3-1/2x4 = 30 -3/2x3+1/2x4
Z =180 -x3–x4 -10 -1/2x3+1/2x4 =170 -3/2x3-1/2x4

x1 = 10 +1/2x3- 1/2x4
x2 = 70 –3/2x3+1/2x4
x5 = 30–3/2x3+1/2x4
Z =170-3/2x3–1/2x4

Conclusion: the optimal solution remains optimal.


What if we buy a new machine that shortens the finishing process of toy soldiers to 1.5 hour
(instead of 2) ? Then current optimal solution will no longer be optimal (+ x4 will appear in
the z value).
SENSTIVITY…
4. Adding a constraint
• Packaging constraint: 150 pieces of cardboard, 1 piece per each toy soldier, 2 pieces per
each toy train
• new constraint: x1 +2x2 ≤ 150
• introduce a slack variable x6 : x6 = 150 − x1 − 2x2
• substitute from the final dictionary: x6= 150 − (20+x3− x4) −2(60 −2x3+x4) = 10 +3x3 − x4
• Adding this to the final dictionary yields a feasible dictionary (since the value 10 in the
constraint is non-negative) → optimal solution remains optimal after adding the
constraint
x1 = 20 + x3– x4 What if we only have 130 units of cardboard?
x2 = 60 – 2x3 + x4 Then the original optimal solution becomes infeasible in the
x5 = 20 –x3 + x4 modified problem (the constant term works out to −10
x6 = 10 + 3x3 − x4 instead of 10) and we need to recalculate or use the dual Z =
180 -x3 – x4 simplex method
SENSTIVITY…
• Conclusion: so long as we have at least 140 units of cardboard we don’t need to
change the production plan
Example
Consider the LPP Maximize z= 4x1+6x2
Subject to x1 +2x2 ≤ 8
6x1+4x2 ≤ 24
x1, x2 ≥0
(i) What is the optimal solution?
If the objective function is altered to z= 2x1+6x2 ,does the optimal solution change?
(iii) If the first constraint is altered as: x1+3x2 ≤8, does the optimal solution change?
(iv) Discuss the effect of adding a new constraint 2x1+x2 ≤8 to the given set of
constraints.
TRANSPORTATION PROBLEM
Introduction
• A special class of linear programming problem is Transportation Problem, where the
objective is to minimize the cost of distributing a product from a number of sources (e.g.
factories) to a number of destinations (e.g. warehouses) while satisfying both the supply
limits and the demand requirement. Because of the special structure of the
Transportation Problem the Simplex Method of solving is unsuitable for the
Transportation Problem. The model assumes that the distributing cost on a given route is
directly proportional to the number of units distributed on that route.

• The two common objectives of transportation problems are either minimize the cost of
shipping m units to n destinations or maximize the profit of shipping m units to n
destinations.

• Generally, the transportation model can be extended to areas other than the direct
transportation of a commodity, including among others, inventory control, employment
scheduling, and personnel assignment.
TRANSPORTATION PROBLEM
• Example
• Suppose a manufacturing company owns three factories (sources) and distribute
his products to five different retail agencies (destinations). The following table
shows the capacities of the three factories, the quantity of products required by the
various retail agencies and the cost of shipping one unit of the product from each
of the three factories to each of the five retail agencies.
Retail Agency

Factories 1 2 3 4 5 Capacities
1 1 9 13 36 51 50
2 24 12 16 20 1 100
3 14 33 1 23 26 150
Requirement 100 60 50 50 40 300
TRANSPORTATION PROBLEM
• Usually the above table is referred to as Transportation Table, which provides the basic
information regarding the transportation problem. The quantities inside the table are
known as transportation cost per unit of product. The capacity of the factories 1, 2, 3 is
50, 100 and 150 respectively. The requirement of the retail agency 1, 2, 3, 4, 5 is
100,60,50,50, and 40 respectively. In this case, the transportation cost of one unit from
factory 1 to retail agency 1 is 1, from factory 1 to retail agency 2 is 9, from factory 1 to
retail agency 3 is 13, and so on. A transportation problem can be formulated as linear
programming problem using variables with two subscripts
Let
x11 =Amount to be transported from factory 1 to retail agency 1
x12 = Amount to be transported from factory 1 to retail agency 2
……..
……..
……..
……..
x35 = Amount to be transported from factory 3 to retail agency 5
TRANSPORTATION…
• Let the transportation cost per unit be represented by C11 , C12 , ….. C35 that is C11
=1, C12 =9, and so on. Let the capacities of the three factories be represented by
a1 =50, a2=100, a3=150. Let the requirement of the retail agencies are b1=100,
b2=60, b3=50, b4=50, and b5=40. Thus, the problem can be formulated as
Minimize c11x11+c12x12+……………+c35x35
Subjected to x11 +x12 +x13 +x14 +x15 = a1
x21 + x22 + x23 + x24 + x25 = a2
x31 + x32 +x33 + x34 + x35 = a3
x11 + x21 + x31 = b1
x12 + x22 + x32 = b2
x13 + x23 + x33 = b3
x14 + x24 + x34 = b4
x15 + x25 + x35 = b5
x , x , ……, x ≥ 0
TRANSPORTATION…
• Thus, the problem has 8 constraints and 15 variables. So, it is not possible to solve such a
problem using simplex method. This is the reason for the need of special computational
procedure to solve transportation problem. There are varieties of procedures, which are
described in the next section.

• Transportation Model:
• Let us assume that there are m sources supplying n destinations. Source capacities,
destination demands and costs of material transportation from each source to each
destination are given. It is also assumed that a destination can receive its demand from one
or more sources.
• Supply point: This is the point that can send goods to another point but cannot receive
goods from any other point.
• Demand point: This is a point that can receive goods from other points but cannot send
goods to any other point.
• Transshipment point: This is a point that can both receive goods from other points and
send goods to other points.
TRANSPORTATION…
Transportation Algorithm
• The steps of the transportation algorithm are exact parallels of the simplex algorithm,
they are:
• Step 1: Determine a starting basic feasible solution, using any one of the following
three methods North West Corner Method, Least Cost Method, Vogel Approximation
Method Step
• 2: Determine the optimal solution using the following method 1.MODI (Modified
Distribution Method) or stepping stone Method.
Basic Feasible Solution of a Transportation Problem
• The special structure of the transportation problem allows securing a non artificial basic
feasible solution using one the following three methods.
1. North West Corner Method
2. Least Cost Method
3. Vogel Approximation Method
TRANSPORTATION…
• The difference among these three methods is the quality of the initial basic
feasible solution they produce, in the sense that a better initial solution yields a
smaller objective value. Generally the Vogel Approximation Method produces the
best initial basic feasible solution, and the North West Corner Method produces
the worst, but the North West Corner Method involves least computations.
Transportation tableau
• The transportation tableau shown below is the one where supply availability at
each source is shown in the far right column and the destination demands are
shown in the bottom row. Each cell represents one route. The unit shipping cost is
shown in the upper right corner of the cell, the amount of shipped material is
shown in the center of the cell.
TRANSPORTATION…
TRANSPORTATION…
a. Balanced transportation model
Models where the total demand is equal to total supply
1. North West Corner Method:
• The method starts at the North West (upper left) corner cell of the tableau (variable x11 ).
Allocate as much as possible to the selected cell, and adjust the associated amounts of
capacity (supply) and requirement (demand) by subtracting the allocated amount. The
satisfied row / column is crossed out, indicating that the remaining variables equal to zero.
• If a column and a row are satisfied simultaneously, only one may be crossed out; and the
other column or row assigned a value of zero. This condition guarantees locating zero to
basic variables.
• The procedure is then repeated for the second row, third row, and so on, until all row and
column requirements are met.

For a balanced transportation problem, there will be no more than m +n – 1 filled cells or basic
variables, where m = number of rows and n = number of columns.
TRANSPORTATION…
• Example of NWCM for determining a starting feasible solution
1 2 3 4 Supply
1
15
2
25
3
5
Demand 5 15 15 10
Soln
1 2 3 4 Supply
1
5 10 15
2
5 15 5 25
3
5 5
Demand 5 15 15 10
TRANSPORTATION…
• Example 2:
1 2 3 4 Supply
1
5 5 10
2
5 5
3
8 7 15
Demand 5 10 8 7
Soln
1 2 3 4 Supply
1
5 5 10
2
5 5
3
8 7 15
Demand 5 10 8 7
TRANSPORTATION…
Solution to the previous example
Retail Agency
Factories 1 2 3 4 5 Capacity

1 1 50 9 13 36 51 50

2 24 50 12 50 16 20 1 100

3 14 33 10 1 50 23 50 26 40 150
Requirement 100 60 50 50 40 300
TRANSPORTATION…
• The starting basic solution is given as x11 = 50, x21 = 50, x22= 50 x32 = 10, x33 = 50, x34 = 50,
x35 = 40
• The corresponding transportation cost is
50 * 1 + 50 * 24 + 50 * 12 + 10 * 33 + 50 * 1 + 50 * 23 + 40 * 26 = 4420
2. Least Cost Method (LCM)
The least cost method is also known as matrix minimum method in the sense we look for the
row and the column corresponding to which Cij (cost) is minimum. This method finds a better
initial basic feasible solution by concentrating on the cheapest routes. Instead of starting the
allocation with the northwest cell as in the North West Corner Method, we start by allocating as
much as possible to the cell with the smallest unit cost.
If there are two or more minimum costs then we should select the row and the column
corresponding to the lower numbered row. If they appear in the same row we should select the
lower numbered column. We then cross out the satisfied row or column, and adjust the amounts
of capacity and requirement accordingly. If both a row and a column is satisfied simultaneously,
only one is crossed out. Next, we look for the uncrossed-out cell with the smallest unit cost and
repeat the process until we are left at the end with exactly one uncrossed-out row or column.
TRANSPORTATION…
• Example & solution on LCM
1 2 3 Supply
1 5 4 3
100
2 8 4 3
300
3 9 7 5
300
Demand 300 200 200

1 2 3 Supply
1 5 4 3
0 100 100
2 8 4 3
200 100 300
3 9 7 5
300 300
Demand 300 200 200
TRANSPORTATION…
• Note that the minimum transportation cost obtained by the least cost method is much lower than the
corresponding cost of the solution developed by using the north-west corner method.
3. Vogel’s Approximation Method (VAM)
• VAM is an improved version of the least cost method that generally produces better solutions. The
steps involved in this method are:
1. Determine the difference between the lowest two cells in all rows and columns, including dummies.
2. Identify the row or column with the largest difference. Ties may be broken arbitrarily.
3. Allocate as much as possible to the lowest-cost cell in the row or column with the highest difference.
If two or more differences are equal, allocate as much as possible to the lowest-cost cell in these rows
or columns.
4. Stop the process if all row and column requirements are met. If not, go to the next step.
5. Recalculate the differences between the two lowest cells remaining in all rows and columns. Any row
and column with zero supply or demand should not be used in calculating further differences. Then
go to Step 2.

• The Vogel's approximation method (VAM) usually produces an optimal or near- optimal starting
solution. One study found that VAM yields an optimum solution in 80 percent of the sample problems
tested.
TRANSPORTATION…
• Example 1) Solve the following transportation problem

Solution : Note: ai = capacity (supply) bj = requirement (demand) Now, compute the penalty for
various rows and columns which is shown in the following table:
TRANSPORTATION…
TRANSPORTATION…

The transportation cost corresponding to this choice of basic variables is;


22 x 40 + 4 x 80 + 9 x 30 + 7 x 30 + 24 x 10 + 32 x 50 = 3520
TRANSPORTATION…
Example of VAM on unbalanced transportation
1 2 3 4 Supply It1 It2 It3 It4 It5 It6 It 7
10 30 25 15 5 5 5 5 10
14 14
2 20 15 20 10 5 5
10 10
3 10 30 20 20 10 10 10 0 0 0
10 4 1 15
4 30 40 35 45 5 5 5 5 5 5 5
5 7 12
5 0 0 0 0 1 0
1
Demand 10 15 12 15
10 15 20 10
10 15 5 10
0 0 5 5
0 5 5
10 15 25
10 15
TRANSPORTATION…
Solving Transportation Problems by; Stepping stone and modified distribution
(MODI) methods
• After application of the allocation method to the transportation problem, the next
requirement is to get an improved solution thus determining the entering and
leaving variables. The procedures to be utilized are the stepping-stone method,
MODI method, and the Vogel’s Approximation method.
1. Stepping stone method
• The stepping-stone method is an iterative technique for moving from an initial
feasible solution to an optimal feasible solution; and is only applicable to balanced
transportation problems. The stepping-stone method involves testing each unused
route to see if shipping one unit on that route would increase or decrease total
transportation costs.
TRANSPORTATION…
• The testing of each unused square/cell is conducted by the following five steps.
1. Select an unused square to be evaluated.
2. Begin at this square; trace a closed path back to the original square via squares
that are currently being used, and moving with only horizontal and vertical
moves.
3. Beginning with a plus (+) sign at the unused square, place alternate minus (-)
signs and plus (+) signs on each corner square of the closed path just traced.
4. Calculate an improvement index by adding together the unit cost figures found
in each square containing a plus sign and then subtracting the unit costs in each
square containing a minus sign.
5. Repeat steps 1 to 4 until an improvement index has been calculated for all
unused squares. If all indices computed are greater than or equal to zero, an
optimal solution has been reached. If not, select the crossed path with the most
negative value and make the necessary shipment adjustments as it will be
possible to improve the current solution and decrease total transportation costs.
TRANSPORTATION…
• Examples of closed paths
TRANSPORTATION…
TRANSPORTATION…
• Summary of closed paths
Un Used square Route Improvement Index
AE AE, CE, CH, AH 5
AF AF, DF, DG, CG, CH, AH 10
AG AG, AH, CH, CG 10
BE BE, BF, DF, DG, CG, CE 20
BG BG, DG, DF, BF 10
BH BH, CH, CG, DG, DF, BF 0
CF CF, CG, DG, DF 10
DE DE, CE, CG, DG 5
DH DH, CH, CG, DG 10
XE XE, CE, CG, XG 10
XF XF, DF, DG, XG -5
XH XH, CH, CG, XG 0
On considering cell X-F and the closed path leading to it, which is a short one: X-G, D-G, and D-F. The
improved shipment is as indicated below
TRANSPORTATION…

Applying the stepping stone method to this new solution (above table) indicates that
making this shift we obtain an optimal solution; there are no negative improvement
indices.
TRANSPORTATION…
Transportation problem with alternative solution
• The tableau below shows how a transportation problem with alternate solutions can be
identified. It indicates one marked cell B-H. This cell has closed path C-H, C-G, D-G, D-
F and B-F with improvement index of zero. The pluses and minuses all add up to zero.
TRANSPORTATION…
• Since there is a savings of $0 (70 - 70) per unit from shipping via B-H, we obtain a
different – "alternate optimal solution" with the same transportation cost (next table).

1
TRANSPORTATION…
• Rules governing the construction of the closed path
 Any two consecutive cells lie in either the same row or same column.
 No three consecutive cells lie in the same row or column.
 The last cell in the sequence has a row or column in common with the
first cell in the sequence.

2. MODI Method
• The MODI (modified distribution) method allows us to compute
improvement indices quickly for each unused square without drawing
the entire closed path. Once the smallest index has been identified,
only one closed path is traced and will help in determining the
maximum number of units that can be shipped via the best unused
path.
TRANSPORTATION…
• The approach is used after an initial solution has been identified. Then the rows and
columns in the transportation table are assigned values R i and Kj respectively. In general,
Ri = value assigned to row i
Kj = value assigned to column j
Cij = cost in square ij

• The MODI method then requires the following five steps.


1. For all squares occupied set R i + Kj = Cij
2. After all equations have been written, set R 1 = 0
3. Solve system of equations for all R and K values.
4. Compute improvement index for each unused square by the formula I ij = Cij – Ri - Kj.
5. Select the largest negative index and proceed to solve the problem; that is trace a closed
path to the square with the best improvement index and make shipment adjustments
accordingly.
TRANSPORTATION…
• Example

Supply

5 4 3 RI
1 100 100
8 4 3
2 200 100 300 R2
9 7 5
3 200 100 300 R3

Demand 300 200 200


KI K2 K3
TRANSPORTATION…
Transportation
Cost: 4300
For used squares: Ri + Kj = Cij
R1 + K1 = 5
R2 + K1 = 8
R2 + K3 = 3
R3 + K2 = 7
R3 + K3 = 5

For R1= 0; gives


K1= 5, R2= 3, K3= 0, R3= 5, K2= 2

Improvement index for unused squares are computed


Square 12 13 22 31
Index Iij 2 3 -1 -1
TRANSPORTATION…
Improved shipment table is as below with a transportation cost of 4200
Supply
1 5 4 3
100 100
2 8 4 3
200 100 300
3 9 7 5
100 200 300
Demand 300 200 200

Next iteration
TRANSPORTATION…
Supply
1 5 4 3
100 100
2 8 4 3
200 100 300
3 9 7 5
100 200 300
Demand 300 200 200
For used squares: Ri + Kj = Cij, therefore,
R1 + K1 = 5
R2 + K1 = 8
R2 + K2 = 4
R3 + K2 = 7
R3 + K3 = 5

For R1= 0; gives


K1= 5, R2= 3, K2= 1, R3= 6, K3= -1
TRANSPORTATION…
Improvement index for unused squares are computed as below;
Square 12 13 23 31
Index ij 3 4 1 -2

Improved shipment table with a transportation cost of 4000


Supply
1 5 4 3 100
100
2 8 4 3 300
100 200
3 9 7 5 300
100 200
Demand 300 200 200
TRANSPORTATION…
• Next Iteration
1 2 3 Supply
1 5 4 100
100 3
2 8 4 3 300
100 200
3 9 7 5 300
100 200
Demand 300 200 200

For used squares: Ri + Kj = Cij, therefore;


R1 + K1 = 5
R2 + K1 = 8
R2 + K2 = 4
R3 + K1 = 9
R3 + K3 = 5

For R1= 0; gives


K1= 5, R2= 3, K3= 1, R3= 4, K2= 1
TRANSPORTATION…
• Improvement index for unused squares
Square 12 13 23 32
Index Iij 3 2 -1 2

• Improved shipment with a transportation cost of 3900


Supply
1 5 4 3 100
100
2 8 4 3 300
200 100
3 9 7 5 300
200 100
Demand 300 200 200
TRANSPORTATION…
Next iteration
Supply
1 5 4 3 100
100
2 8 4 3 300
200 100
3 9 7 5 300
200 100
Demand 300 200 200

For used squares: Ri + Kj = Cij, therefore;


R1 + K1 = 5
R2 + K2 = 4
R2 + K3 = 3
R3 + K1 = 9
R3 + K3 = 5

For R1= 0; gives;


K1= 5, R2= 2, K2= 2, R3= 4, K3= 1
TRANSPORTATION…
• Improvement index for unused squares
Square 12 13 21 32
Index Iij 2 2 1 2

• Optimal shipment since there is no negative improvement index

Special cases of the transportation problem


• The common special cases of the transportation problem are:
1. Unbalanced transportation problem.
2. Degeneracy in transportation problem.
3. More than one optimal solution.
• Dummy sources or destinations are used to balance problems where demand is not
equal to supply.
TRANSPORTATION…
Balancing a TP if total supply exceeds total demand and vice verser
• If total supply exceeds total demand, we can balance the problem by adding dummy
demand point. Since shipments to the dummy demand point are not real, they are
assigned a cost of zero.
• If a transportation problem has a total supply that is strictly less than total demand the
problem has no feasible solution. There is no doubt that in such a case one or more of
the demand will be left unmet. Generally in such situations a penalty cost is often
associated with unmet demand and as one can guess this time the total penalty cost is
desired to be a minimum value.

Degeneracy
• Degeneracy arises when the number of occupied squares is less than the number of
rows + columns – 1. Degeneracy in the initial solution can be overcome by placing a
zero shipment in unused square such that a stair step pattern is maintained during the
allocation.
TRANSPORTATION…
• Degeneracy can occur during the later solution stages if adding unused square results
in elimination of two previously occupied squares. An artificial zero will be placed in
one of the squares with the lowest shipping cost to handle the degeneracy problem.
Multiple solution transportation problems
• Multiple solutions to transportation problem are possible when one or more
improvement indices in the optimal solution stage are equal to zero.

Transhipment Transportation Problem


• A transportation problem allows only shipments that go directly from supply points to
demand points. In many situations, shipments are allowed between supply points or
between demand points. Sometimes there may also be points (called transhipment
points) through which goods can be transhipped on their journey from a supply point
to a demand point. Fortunately, the optimal solution to a transhipment problem can be
found by solving a transportation problem.
TRANSPORTATION…
• Transshipment Problem is considered an extension of a transportation problem except
that in this problem there are intermediate “transshipment points”. In addition,
shipments may be allowed between supply points and/or between demand points
 Supply point: It can send goods to another point but cannot receive goods from any
other point
 Demand point: It can receive goods from other points but cannot send goods to any
other point
 Transhipment point: It can both receive goods from other points send goods to
other points
• Step 1. If necessary, add a dummy demand point (with a supply of 0 and a demand
equal to the problem’s excess supply) to balance the problem. Shipments to the
dummy and from a point to itself will be zero. Let s= total available supply.
• Step 2. Construct a transportation tableau as follows: A row in the tableau will be
needed for each supply point and transshipment point, and a column will be needed
for each demand point and transshipment point.
NETWORK ANALYSIS
• Introduction A network consists of several destinations or jobs which are linked
with one another. A manager will have occasions to deal with some network or
other. Certain problems pertaining to networks are taken up for consideration in
this unit.
• The different types of network problems that will be looked at include;
a. Shortest Path/route problem
b. Maximum flow problem
c. Minimum Spanning Tree problem
d. Project scheduling by CPM and PERT

a) Shortest Path/route problem


The shortest route method aims to find how a person can travel from one location to
another, keeping the total distance traveled to the minimum. In other words, it seeks
to identify the shortest route to a series of destinations.
NETWORK ANALYSIS
Example 1
• A leather manufacturing company has to transport the finished goods from the
factory to the store house. The path from the factory to the store house is through
certain intermediate stations as indicated in the following diagram. The company
executive wants to identify the path with the shortest distance so as to minimize
the transportation cost. The problem is to achieve this objective.

95
2 4
40 40

65
1 35 70 6
100
40
3 20 5
NETWORK ANALYSIS
• The shortest route technique can be used to minimize the total distance from a node
designated as the starting node or origin to another node designated as the final node. In
the example under consideration, the origin is the factory and the final node is the store
house.
Steps In The Shortest Route Technique
Step 1:
• First, locate the origin. Then, find the node nearest to the origin. Mark the distance
between the origin and the nearest node. In some cases, it may be necessary to check
several paths to find the nearest node.
Step 2:
Repeat the above process until the nodes in the entire network have been accounted
for. The shortest route/path will be the summation of the distances of the nearest
nodes adjacent to each other up to final point(destination)
NETWORK ANALYSIS
Solution to example 1
Looking at the diagram, we see that node 1 is the origin and the nodes 2 and 3 are
neighbours to the origin. Among the two nodes, we see that node 2 is at a distance of 40
units from node 1 whereas node 3 is at a distance of 100 units from node 1. The minimum
of {40, 100} is 40. Thus, the node nearest to the origin is node 2, with a distance of 40
units. So, out of the two nodes 2 and 3, we select node 2. We form a set of nodes {1, 2} and
construct a path connecting the node 2 with node 1 by a thick line. This first iteration is
shown in the next diagram with a thick red arrow.

Now we search for the next node nearest to the set of nodes {1, 2}. For this purpose,
consider those nodes which are neighbours of either node 1 or node 2. The nodes 3, 4 and 5
fulfill this condition. We consider the following distances. The distance between nodes 1
and 3 = 100. The distance between nodes 2 and 3 = 35. The distance between nodes 2 and 4
= 95. The distance between nodes 2 and 5 = 65. Minimum of {100, 35, 95, 65} = 35.
NETWORK ANALYSIS
Solution…
Therefore, node 3 is the nearest one to the set {1, 2}. In view of this observation, the set of
nodes is enlarged from {1, 2} to {1, 2, 3}. For the set {1, 2, 3}, there are two possible
paths; Path 1 → 2 → 3 and Path 1 → 3 → 2. The Path 1 → 2 → 3 has a distance of 40 + 35
= 75 units while the Path 1 → 3 → 2 has a distance of 100 + 35 = 135 units. Minimum of
{75, 135} = 75. Hence we select the path 1 → 2 → 3 and display this path by thick edges.
The distance 75 is marked in a box by the side of node 3. At the end of Iteration 2, the
additional thick black arrow in the next diagram is obtained

We repeat the process. The next node nearest to the set {1, 2, 3} is either node 4 or node 5.
Node 4 is at a distance of 95 units from node 2 while node 2 is at a distance of 40 units
from node 1. Thus, node 4 is at a distance of 95 + 40 = 135 units from the origin. As
regards node 5, there are two paths; 2 → 5 and 3 → 5, providing a link to the origin. We
already know the shortest routes from nodes 2 and 3 to the origin. The path 3 → 5 involves
the shortest distance. Thus, the distance between nodes 1 and 5 is 95 units (20 units
between nodes 5 and 3 + 75 units between node 3 and the origin). Therefore, we select
node 5 and enlarge the set from {1, 2, 3} to {1, 2, 3, 5}. At the end of Iteration 3, the
additional thick blue arrow in the next diagram is obtained.
NETWORK ANALYSIS
• Now 2 nodes remain; nodes 4 and 6. Among them, node 4 is at a distance of 135 units
from the origin (95 units from node 4 to node 2 + 40 units from node 2 to the origin).
Node 6 is at a distance of 135 units from the origin (40 + 95 units). Therefore, nodes 4
and 6 are at equal distances from the origin. If we choose node 4, then travelling from
node 4 to node 6 will involve an additional distance of 40 units. However, node 6 is the
ending node. Therefore, we select node 6 instead of node 4. Thus the set is enlarged from
{1, 2, 3, 5} to {1, 2, 3, 5, 6}. Since we have got a path beginning from the start node and
terminating with the stop node, we see that the solution to the given problem has been
obtained. Iteration No. 4 is shown by the thick green arrow
NETWORK ANALYSIS
• Referring to the diagram below, we see that the shortest route is provided by the
path 1 → 2 → 3 → 5 → 6 with a minimum distance of 135 units.

40
95
40 2 4
40
65
1 35 70 6
100
40
3 20 135
5

75 95
NETWORK ANALYSIS
Questions
1. Explain the shortest path problem
2. Explain the algorithm for a shortest path problem
3. Find the shortest path of the following network
30

40 3 4
45
50
1 30 30 6
45
25
2
35 5
NETWORK ANALYSIS

2 16

5
7 7
9

15 4
1
6
8 4
25

3
NETWORK ANALYSIS
b) Minimum spanning tree problem
• Tree: A minimally connected network is called a tree. If there are n nodes in a
network, it will be a tree if the number of edges = n-1.
Steps followed in construction of minimum spanning tree network
• Step 1: First select any node in the network. This can be done arbitrarily. We will start
with this node.
• Step 2: Connect the selected node to the nearest node.
• Step 3: Consider the nodes that are now connected. Consider the remaining nodes. If
there is no node remaining, then stop. On the other hand, if some nodes remain,
among them find out which one is nearest to the nodes that are already connected.
Select this node and go to Step 2.
• Thus the method involves the repeated application of Steps 2 and 3. Since the
number of nodes in the given network is finite, the process will end after a finite
number of steps. The algorithm will terminate with step 3.
NETWORK ANALYSIS
• While applying the above algorithm, if some nodes remain in step 3 and if there is a
tie in the nearest node, then the tie can be broken arbitrarily. As a consequence of tie,
we may end up with more than one optimal solution.
• Problem 1
• Determine the minimum spanning tree for the following network.
60
5 70
60 2
60 80 7
100
1 40
3 50
120
50 60
80 8

4 6 30
90
NETWORK ANALYSIS
Solution
• Step 1: First select node 1. (This is done arbitrarily)
• Step 2: We have to connect node 1 to the nearest node. Nodes 2, 3 and 4 are adjacent
to node 1. They are at distances of 60, 40 and 80 units from node 1. Minimum of {60,
40, 80} = 40. Hence the shortest distance is 40. This corresponds to node 3. So we
connect node 1 to node 3 by a thick line. This is Iteration No. 1.
60
5 70
60 2
60 80 7
100
1 40
3 50
120
50 60
80 8

4 6 30
90
NETWORK ANALYSIS
Step 3: Now the connected nodes are 1 and 3. The remaining nodes are 2, 4, 5, 6, 7 and
8. Among them, nodes 2 and 4 are connected to node 1. They are at distances of 60 and
80 from node 1. Minimum of {60, 80} = 60. So the shortest distance is 60. Next, among
the nodes 2, 4, 5, 6, 7 and 8, find out which nodes are connected to node 3. We find that
all of them are connected to node 3. They are at distances of 60, 50, 80, 60, 100 and 120
from node 3. Minimum of {60, 50, 80, 60, 100, 120} = 50. Hence the shortest distance
is 50. Among these nodes, it is seen that node 4 is nearest to node 3. Now we go to Step
2. We connect node 3 to node 4 by a thick line. This is Iteration No.2.

60 5 70
2
60 60 80 7
100
40 50
1 3 120
50 60 8
80
6 30
4 90
NETWORK ANALYSIS
Next go to step 3. Now the connected nodes are 1, 3 and 4. The remaining nodes are 2,
5, 6, 7 and 8. Node 2 is at a distance of 60 from node 1. Nodes 5, 6, 7 and 8 are not
adjacent to node 1. All of the nodes 2, 5, 6, 7 and 8 are adjacent to node 3. Among them,
nodes 2 and 6 are nearer to node 3, with equal distance of 60. Node 6 is adjacent to
node 4, at a distance of 90. Now there is a tie between nodes 2 and 6. The tie can be
broken arbitrarily. So we select node 2. Connect node 3 to Node 2 by a thick line. This
is Iteration No. 3.

60 5 70
2
60 60 80 7
100
40 50
1 3 120
50 60 8
80
6 30
4 90
NETWORK ANALYSIS
We continue the above process. Now nodes 1, 2, 3 and 4 are connected. The
remaining nodes are 5, 6, 7 and 8. None of them is adjacent to node 1. Node 5 is
adjacent to node 2 at a distance of 60. Node 6 is at a distance of 60 from node 3.
Node 6 is at a distance of 90 from node 4. There is a tie between nodes 5 and 6. We
select node 5. Connect node 2 to node 5 by a thick line. This is Iteration No. 4.

60 5 70
2
60 60 80 7
100
40 50
1 3 120
50 60 8
80
6 30
4 90
NETWORK ANALYSIS
Now nodes 1, 2, 3, 4 and 5 are connected. The remaining nodes are 6, 7 and 8.
Among them, node 6 is at the shortest distance of 60 from node 3. So, connect node
3 to node 6 by a thick line. This is Iteration No. 5.

60 5 70
2
60 60 80 7
100
40 50
1 3 120
50 60 8
80
6 30
4 90
NETWORK ANALYSIS
Now nodes 1, 2, 3, 4, 5 and 6 are connected. The remaining nodes are 7 and 8. Among
them, node 8 is at the shortest distance of 30 from node 6. Consequently we connect
node 6 to node 8 by a thick line. This is Iteration No. 6.

60 5 70
2
60 60 80 7
100
40 50
1 3 120
50 60 8
80
6 30
4 90
NETWORK ANALYSIS
Now nodes 1, 2, 3, 4, 5, 6 and 8 are connected. The remaining node is 7. It is at the
shortest distance of 50 from node 8. So, connect node 8 to node 7 by a thick line. This is
Iteration No.7.
Now all the nodes 1, 2, 3, 4, 5, 6, 7 and 8 are connected by seven thick lines. Since
no node is remaining, we have reached the stopping condition. Thus we obtain the
following minimum spanning tree for the given network.

60 5 70
2
60 60 80 7
100
40 50
1 3 120
50 60 8
80
6 30
4 90
NETWORK ANALYSIS
Questions
1. Explain the minimum spanning tree algorithm.
2. 2. From the following network, find the minimum spanning tree.

75
2
6

80 55
90

70 3
1 100
40
60
25
5
4 30
NETWORK ANALYSIS
• Project Network
Certain key concepts pertaining to a project network are described below:
1. Activity
An activity means a work. A project consists of several activities. An activity takes time.
It is represented by an arrow in a diagram of the network. For example, an activity in
house construction can be flooring. This is represented as follows:
Flooring
Construction of a house involves various activities. Flooring is an activity in this
project. We can say that a project is completed only when all the activities in the project
are completed
2. Event
It is the beginning or the end of an activity. Events are represented by circles in a
project network diagram. The events in a network are called the nodes.
NETWORK ANALYSIS
• Example Start Stop

• Starting a punching machine is an activity. Stopping the punching machine is another


activity.
3. Predecessor Event
The event just before another event is called the predecessor event.
4. Successor Event
The event just following another event is called the successor event.
3

1 2 4 6

5
NETWORK ANALYSIS
• In this diagram, event 1 is predecessor for the event 2.
• Event 2 is successor to event 1.
• Event 2 is predecessor for the events 3, 4 and 5.
• Event 4 is predecessor for the event 6.
• Event 6 is successor to events 3, 4 and 5.
5. Network
• A network is a series of related activities and events which result in an end product or
service. The activities shall follow a prescribed sequence. For example, while
constructing a house, laying the foundation should take place before the construction
of walls. Fitting water tapes will be done towards the completion of the construction.
Such a sequence cannot be altered.
6. Dummy Activity
• A dummy activity is an activity which does not consume any time. Sometimes, it may
be necessary to introduce a dummy activity in order to provide connectivity to a
network or for the preservation of the logical sequence of the nodes and edges.
NETWORK ANALYSIS
7. Construction of a Project Network
• A project network consists of a finite number of events and activities, by adhering to a
certain specified sequence. There shall be a start event and an end event (or stop
event). All the other events shall be between the start and the end events. The
activities shall be marked by directed arrows. An activity takes the project from one
event to another event.
• An event takes place at a point of time whereas an activity takes place from one point
of time to another point of time.

• Construction of Project Network Diagrams


Problem 1
Construct the network diagram for a project with the following activities:
NETWORK ANALYSIS
Activity (Event Event) Name of Activity Immediate predecessor activity
1 2 A -
1 3 B -
1 4 C -
2 5 D A
3 6 E B
4 6 F C
5 6 G D

Solution:

The start event is node 1. The activities A, B, C start from node 1 and none of them has a
predecessor activity. A joins nodes1 and 2; B joins nodes 1 and 3; C joins nodes 1 and 4.
So we get the following
NETWORK ANALYSIS
D
2 5 G
A
Start Event End Event
B E
1 3 6
C
F
4
Rule
• Draw the networks for each activity separately then you combine the networks to
form the network for the entire project
• We validate the diagram by checking with the given data.
NETWORK ANALYSIS
• Problem 2
Develop a network diagram for the project specified below:
Activity Immediate predecessor activity
A -
B A
C,D B
E C
F D
G E,F

Solution
Activity A has no predecessor activity. i.e., It is the first activity. Let us suppose that
activity A takes the project from event 1 to event 2. Then we have the following
representation for A:
NETWORK ANALYSIS
A
1 2

For activity B, the predecessor activity is A. Let us suppose that B joins nodes 2 and 3.
Thus we get;

1 A B 3
2

Activities C and D have B as the predecessor activity. Therefore we obtain the


following:
4
C

2 B 3

5
NETWORK ANALYSIS
• Activity E has D as the predecessor activity. So we get
C E
3 4 6

• Activity F has D as the predecessor activity. So we get


D F
3 5 6

• Activity G has E and F as predecessor activities.

4
E

6 G 7

F
5
NETWORK ANALYSIS
• G is the last activity. Putting all the pieces together, we obtain the following diagram the project
network:

4
E
C

1 A B G
11 2 3 6 7
D F
5

• The diagram is validated by referring to the given data

Questions
1. Explain the terms: event, predecessor event, successor event, activity, dummy activity, network.
2. Construct the network diagram for the following project
NETWORK ANALYSIS
Activity Immediate predecessor Activity
A -
B -
C A
D B
E A
F C,D
G E
H E
I F,G
J H,I
NETWORK ANALYSIS
d) Critical Path Method (CPM)
• The critical path method (CPM) aims at the determination of the time to complete a
project and the important activities on which a manager shall focus attention.
• In CPM, it is assumed that precise time estimate is available for each activity
Project Completion Time
• From the start event to the end event, the time required to complete all the activities of
the project in the specified sequence is known as the project completion time.
• Path: A continuous sequence, consisting of nodes and activities alternatively,
beginning with the start event and stopping at the end event of a network is called a
path in the network.
Critical Path and critical activities
• The path with the largest time is called the critical path and the activities along
this path are called the critical activities or bottleneck activities. The activities are
called critical because they cannot be delayed.
NETWORK ANALYSIS
• However, a non-critical activity may be delayed to a certain extent. Any delay in a
critical activity will delay the completion of the whole project. However, a certain
permissible delay in a non –critical activity will not delay the completion of the whole
project. It shall be noted that delay in a non-critical activity beyond a limit would
certainly delay the completion of the whole project. Sometimes, there may be several
critical paths for a project. A project manager shall pay special attention to critical
activities.
• Problem 1
Activity Predecessor Activity Duration (Weeks)
A - 3
B A 5
C A 7
D B 10
E C 5
F D,E 4
NETWORK ANALYSIS
• Consider the details about a project given in the previous slide, determine the critical
path, the critical activities and the project completion time.

Solution
First let us construct the network diagram for the given project. We mark the time
estimates along the arrows representing the activities. We obtain the following diagram:

3
B
5 D
Start Event 10 End Event
1 A 2 F
3 5 6
4
C E 5
7
4
NETWORK ANALYSIS
• Consider the paths, beginning with the start node and stopping with the end node.
There are two such paths for the given project. They are as follows:
Path I
ABDF= 3+5+10+4 = 22Weeks
Path II
ACEF= 3+7+5+4 = 19 Weeks
Compare the times for the two paths. Maximum of {22,19} = 22. We see that path I has
the maximum time of 22 weeks. Therefore, path I is the critical path. The critical
activities are A, B, D and F. The project completion time is 22 weeks. We notice that C
and E are non- critical activities.
Time for path I - Time for path II = (22- 19) = 3 weeks. Therefore, together the non-
critical activities can be delayed up to a maximum of 3 weeks, without delaying the
completion of the whole project.
NETWORK ANALYSIS
Problem 2
• Find out the completion time and the critical activities for the following project:
D
2 20 5
A
8 8 G

1 B E H 8 K
3 16 6 6 10
10 11
C I L
14 5
7 F 7 J 9
4
25 10

Solution:
• In all, we identify 4 paths, beginning with the start node of 1 and terminating at the
end node of 10. They are as follows:
NETWORK ANALYSIS
Path I
ADGK= 8+20+8+6 = 42units of time
Path II
BEHK= 10+16+11+6 = 43 units of time
Path III
BEIL= 10+16+14+5 = 45 units of time
Path IV
CFJL= 7+25+10+5 = 47 units of time

Compare the times for the four paths. Maximum of {42, 43, 45, 47} = 47. We see that
the path with 47 units of time has the maximum time and so it is the critical path:

The critical activities are C, F, J and L. The non-critical activities are A, B, D, E, G, H, I


and K. The project completion time is 47 units of time.
NETWORK ANALYSIS
• Draw the network diagram and determine the critical path for the
following project
Activity Time Estimate (Weeks)
1-2 5
1-3 6
1-4 3
2-5 5
3-6 7
3-7 10
4-7 4
5-8 2
6-8 5
7-9 6
8-9 4
NETWORK ANALYSIS
Solution
• We have the following networkD diagram for the project
2 5 5
A
5 2 H

1 B E I 8 K
3 7 6 4 9
6 5
C F J 6
3 10
4 G 7
4

Solution:

• We assert that there are 4 paths, beginning with the start node of 1 and terminating at
the end node of 9. They are as follows;
NETWORK ANALYSIS
Path I
ADHK= 5+5+2+4 = 16 weeks
Path II
BEIK= 6+7+5+4 = 22 weeks
Path III
BFJ= 6+10+6 = 22 weeks
Path IV
CGJ= 3+4+6 = 13 weeks

Compare the times for the four paths. Maximum of {16, 22, 22, 13} = 22. We see that
two paths have the maximum time of 22 weeks and so they are the critical path

The critical activities are B, E, F,I, J and K. The non-critical activities are A, C, D, G
and H . The project completion time is 22 weeks.
NETWORK ANALYSIS
d). PERT
Introduction:
• Programme Evaluation and Review Technique (PERT) is a tool that helps a project
manager in project planning and control. It enables him continuously monitor a
project and take corrective measures wherever necessary. This technique involves
statistical methods.
Assumptions for PERT
Note that in CPM, the assumption is that precise time estimate is available for each
activity in a project. However, one finds most of the times that this is not practically
possible. In PERT, we assume that it is not possible to have precise time estimate for
each activity and instead, probabilistic estimates of time alone are possible. A multiple
time estimate approach is followed here. In probabilistic time estimate, the following 3
types of estimate are possible
1. Pessimistic time estimate (tp )
2. 2. Optimistic time estimate (to)
3. 3. Most likely time estimate (tm)
NETWORK ANALYSIS
• The optimistic estimate of time is based on the assumption that an activity will not
involve any difficulty during execution and it can be completed within a short period.
On the other hand, a pessimistic estimate is made on the assumption that there would
be unexpected problems during the execution of an activity and hence it would
consume more time. The most likely time estimate is made in between the optimistic
and the pessimistic estimates of time. Thus the three estimates of time have the
relationship; to ≤ tm ≤ tp
• Practically speaking, neither the pessimistic nor the optimistic estimate may hold in
reality and it is the most likely time estimate that is expected to prevail in almost all
cases. Therefore, it is preferable to give more weight to the most likely time estimate.
• We give a weight of 4 to most likely time estimate and a weight of 1 each to the
pessimistic and optimistic time estimates. We arrive at a time estimate (te) as the
weighted average of these estimates as follows: te
• Since we have taken 6 units ( 1 for tp , 4 for tm and 1 for to ), we divide the sum by 6.
NETWORK ANALYSIS
Measure of certainty
• The 3 estimates of time are such that; to ≤ tm ≤ tp
• Therefore the range for the time estimate is tp - to
• The time taken by an activity in a project network follows a distribution with a
standard deviation of one sixth of the range, approximately i.e., The standard
deviation (δ)
and the variance
The certainty of the time estimate of an activity can be analysed with the help of the
variance. The greater the variance, the more uncertainty in the time estimate of an
activity.
Problem 1
Two experts A and B examined an activity and arrived at the following time estimates.
Determine which expert is more certain about his estimates of time:
NETWORK ANALYSIS
Expert Time Estimate
to tm tp
A 4 6 8
B 4 7 10

Solution
Variance ( ) in time estimates
In the case of expert A, the variance

As regards expert B, the variance


So, the variance is less in the case of A. Hence, it is concluded that the expert A is
more certain about his estimates of time.
NETWORK ANALYSIS
Problem 2
• Find out the time required to complete the following project and the critical activities:
Activity Predecessor Optimistic time Most likely time Pessimistic time
Activity estimate (to days) estimate (tm days) estimate (tp days)

A - 2 4 6
B A 3 6 9
C A 8 10 12
D B 9 12 15
E C 8 9 10
F D,E 16 21 26
G D,E 19 22 25
H F 2 5 8
I G 1 3 5
NETWORK ANALYSIS
Solution
• We calculate the time estimate (te) as follows :
Activity Optimistic 4×Most likely time Pessimistic time Time Estimate
time estimate estimate (tm days) estimate (tp days) te
(to days)

A 2 16 6 4
B 3 24 9 6
C 8 40 12 10
D 9 48 15 12
E 8 36 10 9
F 16 84 26 21
G 19 88 25 22
H 2 20 8 5
I 1 12 5 3
NETWORK ANALYSIS
Summarize the table to be able to come up with Network diagram
Activity Predecessor activity Time Estimate
te

A - 4
B A 6
C A 10
D B 12
E C 9
F D,E 21
G D,E 22
H F 5
I G 3
NETWORK ANALYSIS

3 6
B D F H
6 12 21
5
1 A 2 5 8
4
G I
E 3
C
10 9 22 7
4
Path I
ABDFH= 4+6+12+21+5 = 48 units of time
Path II
ABDGI= 4+6+12+22+3 = 47 units of time
Path III
ACEFH= 4+10+9+21+5 = 49 units of time
Path IV
ACEGI= 4+10+9+22+3 = 48 units of time
NETWORK ANALYSIS
Compare the times for the four paths. Maximum of {48, 47, 49, 48} = 49. We see that path
ACEFH has the maximum time of 49 units of time so it is taken as the critical path
Problem 3 (For Trial)
Find out the time, variance and standard deviation of the project with the following time
estimates in weeks:
Activity Optimistic time Most likely time Pessimistic time
estimate (to days) estimate (tm days) estimate (tp days)
1-2 3 6 9
1-6 2 5 8
2-3 6 12 18
2-4 4 5 6
3-5 8 11 14
4-5 3 7 11
6-7 3 9 15
5-8 2 4 6
7-8 8 16 18

You might also like