Papiya Bhattacharjee
Assistant Professor,
Decision Sciences Area
Xavier Institute of
Management
Bhubaneswar
What is a Network ?
A graphical description of a real life system/situation
We have already seen two special types of network problems (Transportation and
Assignment Problems)
Many efficient algorithms have been developed for solving such problems
A network consists a set of points
(called nodes), a set of lines (called
arcs) connecting pairs of points
and many a times some
commodity flowing through the
network
Nodes
Arcs
Flow
Facilities location
Project planning
Transportation planning
Terminology of Networks
Directed arc If the flow through an arc is allowed in only one direction, it is a
Directed path If all the arcs in a path are directed, then the path is directed. If
Terminology of Networks
Cycle A path that begins and ends at the same node
connected
Terminology of Networks
Tree A connected network that contains no cycles
Terminology of Networks
Arc Capacity The maximum amount of the flow that can be carried through a
directed arc
Supply Node A node for which the total outflow is greater than the total inflow
Demand Node A node for which the total inflow is greater than the total outflow
Transshipment node A node for which the total inflow is equal to the total outflow
link
Objective
To design the network by inserting enough links so that there is a path
between every pair of nodes and the total length of the links inserted
into the network is minimized
To find a spanning tree containing all the given nodes and
with minimum total length of the links
Algorithm
Greedy Algorithm for Finding the Minimum Spanning Tree
(Prims algorithm)
1.
2.
Choose the shortest possible link to another node (ties may be broken
arbitrarily)
3.
4.
Repeat the previous step until all the nodes have been connected
Note:
The choice of initial node does not affect the final solution in terms of the total
minimum length. However, there may exist more than one minimum spanning tree
Example
Find a minimal spanning tree for the following network.
7
1
5
10
3
4
8
12
5
5
3
4
3
4
Some Applications
Design of telecommunication networks
Example
Some oil companies in the country are jointly planning to build an oil pipeline to connect
ten cities as shown in the following network:
120
490
235
7
520
320
270
400
1
175
210
580
250
10
8
750
The distance (in miles) between cities are shown besides each link. Determine a pipeline
system that will connect all 10 cities using the minimum number of miles of pipe.
120
175
235
2
400
10
270
8
1
The Wirehouse Lumber Company will soon begin logging eight groves of trees in the
same general area. Therefore, it must develop a system of dirt roads that makes each
grove accessible from every other grove. The distance (in miles) between every pair of
groves is as follows:
Management wishes to determine between which pairs of groves the roads should be
constructed to connect all groves with a minimum total length of road. What is the best
way to do this?
with minimum total time or with minimum total cost) from the origin
to the destination
Algorithm
Features of the algorithm
Starting from the origin, the algorithm successively finds out the shortest
path to each of the nodes of the network in the ascending order of their
shortest distances from the origin. The problem is solved when the
destination node is reached.
It is an iterative algorithm
Objective of nth Iteration: Find the nth nearest node to the origin (to be repeated for n = 1,
2, . . . until the nth nearest node is the destination
Input for nth iteration: n-1 nearest nodes to the origin (solved for at the previous iterations),
including their shortest path and distance from the origin. (These nodes, plus the origin, will
be called solved nodes; the others are unsolved nodes.)
Candidates for nth nearest node: Each solved node that is directly connected by a link to one
or more unsolved nodes provides one candidatethe unsolved node with the shortest
connecting link. (Ties provide additional candidates.)
Calculation of nth nearest node: For each such solved node and its candidate, add the
distance between them and the distance of the shortest path from the origin to this solved
node. The candidate with the smallest such total distance is the nth nearest node (ties
provide additional solved nodes), and its shortest path is the one generating this distance.
Example
A
4
Origin
1
6
O
5
7
D
1
4
E
5
C
Destination
Solved Nodes
Directly Connected
to Unsolved Nodes
Closest
connected
unsolved node
Total Distance
Involved
Minimum
Distance
Last Connection
OA
O
A
C
B
5
4+1 = 5
C
B
5
5
OC
AB
A
B
C
D
E
E
4+7 =11
5 +4 = 9
5+5 = 10
BE
A
B
E
D
D
D
4+7 = 11
5+5 = 10
9+1 = 10
D
D
10
BD
ED
D
E
T
T
10+6 = 16
9+8 = 17
16
DT
Applications
Example
A concrete company makes concrete at location 1 and delivers it to construction sites at
locations 2, 3, 4, 5, 6, 7 and 8. The following network shows the possible routes and distances
(in miles) from the concrete plant to the seven construction sites. Determine the shortest
route a concrete truck would take from plant at node 1 to all the construction sites.
14
2
12
10
20
17
8
7
15
4
24
10
28
8
18
3
12
18
Total Distance
Involved
nth Nearest
Node
Minimum
Distance
Last
Connection
12
12
1,2
1
2
4
5
17
26
17
1,4
1
2
4
3
5
6
18
26
26
18
2
3
4
5
6
6
26
30
26
4
5
6
7
7
8
32
34
44
4
6
7
8
8
8
45
44
42
1,3
2,5
26
4,6
32
4,7
42
7,8
A connected network with a source (the node at which all the flow originates) and
another node called the sink (at which all the flow terminates). All the remaining
nodes are transshipment nodes
The capacity of each arc (the maximum number of units allowed to flow through the
arc)
Objective
To maximize the total amount of flow (total number of units flowing) from source to
sink
(The total amount of flow can be measured as either the total amount leaving the
source or as total amount entering the sink)
Initially, before any flows have been assigned, the residual network is the original network.
After some flows have been assigned to the arcs, the residual network shows the remaining
arc capacities (called residual capacities) for assigning additional flows.
Augmenting path: A directed path from source to sink in the residual network along which
every arc has a residual capacity greater than zero
Residual Capacity of an augmenting path: The minimum of the residual capacities among all
the residual capacities along an augmenting path is called the residual capacity of the
augmenting path
Algorithm
Augmenting Path Algorithm
The augmenting path algorithm repeatedly selects some augmenting path and adds a flow
equal to its residual capacity to that path in the original network. This process continues until
there are no more augmenting paths, so the flow from the source to the sink cannot be
increased further.
Steps:
1.
2.
Identify minimum of the residual capacities, say c* on this path. Increase the flow
in this path by c*.
3.
Decrease by c* the residual capacity of each arc on this augmenting path. Increase
by c* the residual capacity of each arc in the opposite direction on this
augmenting path. Return to step 1.
Example
The Express Parcel Services has established various truck and air routes around the country over
which it ships parcels. The holiday season is approaching, which means a dramatic increase in the
number of packages that will be sent. The service wants to know the maximum flow of packages
it can accommodate (in Tons) from station 1 to station 7. The routes and the flow capacities (in
Tons of packages per day) are shown in the following network. Determine the maximum
tonnage of packages that can be transported per day from station 1 to station 7, and indicate the
flow along each arc.
0
2 2
1
2
4
4 6
2
3 5
6
3
9
0
4
2 6 4
0 2
2
5
0 3
4
6
9
2
5
3
67
0 7
0
4
0
7
2 6 1
3 2
2
3
4
4
2 6
1
5
6
0 3
7
4
9
2
5
3
0 7
0
7
2 6 1
5 2
0
1
1
6
0 3
4
4 4
7
4
5
3
2 7
0
7
4
0
7
2 6 1
5 2
0
1
1
6
4 3
7
0
4
4 4
7
4
5
3
3
2 7
4
7
2 6 1
5 2
0
1
6
5 3
4
4 4
6
4
4 5
3 7
4
A new airlines has been granted license and the permitted several routes between city A and
city B are shown in the following network. The flights per day for each route are also given
Determine the maximum number of flights the airline can schedule per day from city A to city
B and indicate the number of flights along each route.
8
S 6
2
8
10 P 7
4 5
9
R 4
0 7
10
7
A
5
5
3
4
2 Q 6
7 T
5
U
1
8
S 6
2
8
10 P 7
4 5
9
R 4
0 7
10
7
A
5
5
3
7 T
5
2 Q 6
U
1
14
S 0
2
2
16 P 7
4 5
9
R 4
0 7
4
7
A
5
5
3
4
2 Q 6
U
1
7 T
5
14
S 0
2
2
16 P 7
4 5
9
R 4
0 7
4
7
A
0
9
B
10
3
U
6
12 T 0
2
16 P 7
7 Q 1
14
S 0
2
9
13
B
10
4 5
13
R 0
0 7
4
3
A
0
4
7 Q 1
U
6
12 T 0
14
S 0
2
2
16 P 7
4
0
A
0
9
13
B
13
4 5
16
R 0
0 4
6
4
7 Q 1
U
6
12 T 0
Applications
An example where more than one source and more than one sink
is present
The ABC Petroleum Corporation has two oil fields, three refineries and two
distribution centers. Using units of thousands of barrels of crude oil (and its equivalent
in refined products), the following table shows the maximum number of units that
can be shipped per day from each oil field to each refinery and from each refinery to
each distribution center. Determine a plan for how many units to ship from each oil
field to each refinery and from each refinery to each distribution center that will
maximize the total number of units reaching the distribution centers.
Refineries
Oil
Fields
R1
R2
R3
O1
11
O2
Refineries
Distribution Centers
D1
D2
R1
R2
R3
5
9
R1
11
20
Source
Dummy
Source
17
O1
D1
2
5
17
8
R2
Sink
O2 4
8
D2
4
R3
22
Dummy
Sink
A directed and connected network with at least one of the nodes as supply node
and at least one of the nodes as demand node. All the remaining nodes are
transshipment nodes
The capacity of each arc and the cost per unit flow through each arc. The cost of
flow is proportional to the amount of flow
Capacities of the arcs are sufficient to carry total supply of the supply nodes to
demand nodes.
Objective
To minimize the total cost of sending the available supply through the network to
satisfy the given demand. (An alternative objective is to maximize the total profit
from doing this.)
Applications
Mainly, the types of problems that involve determining a plan for shipping
goods from their sources (factories, etc.) to intermediate storage facilities
(as needed) and then on to the customers at the least cost.
Model Formulation
cij
Model Formulation
Minimize Z =
=1 =1
Subject to
- = bi
=1
=1
Example
3
Formulation
Minimize Z = 200 X12 + 400 X13 + 900 X14 + 300 X23 + 100 X35 + 300 X45 + 200 X54
Subject to