Lecture Day 6: Networks Shortest-Route Problem Minimum Spanning Tree Problem Maximal Flow Problem
Lecture Day 6: Networks Shortest-Route Problem Minimum Spanning Tree Problem Maximal Flow Problem
Networks
Shortest-Route Problem
Networks
What is a
Network?
A network is a collection
of nodes or points
connected by arcs.
Why are
Networks
important?
Examples:
Physical distribution systems
Communication networks
Pipeline systems
City streets and traffic signals
Airline flight legs
Production assembly line systems
The
Shortest-Route
Problem
Example
2
5
10
1
15
12
3
8
4
6
20
1.
Steps Involved
40
nodes consist of an
ordered pair of
numbers, where the
first number indicates
the distance from the
first node, and the
second number
indicates the preceding
node on the route from
the first node.
2
5
10
1
15
12
3
8
4
6
20
2.
Steps Involved
(20, 1)
nodes consist of an
ordered pair of
numbers, where the
first number indicates
the distance from the
first node, and the
second number
indicates the preceding
node on the route from
the first node.
2
5
10
1
15
(15, 1)
12
8
4
(25, 1)
6
20
3.
Steps Involved
(20, 1)
40
2
5
10
1
15
(15, 1)
12
8
4
(25, 1)
6
20
4.
Steps Involved
(20, 1)
40
2
5
10
15
(15, 1)
12
(25, 1)
6
20
(20, 1)
40
2
5
10
15
(15, 1)
12
(23, 3)
6
20
(45, 3)
(60, 2)
(20, 1)
40
2
5
10
15
(15, 1)
(40, 2)
12
(23, 3)
6
20
(45, 3)
(60, 2)
(20, 1)
40
2
5
10
15
(15, 1)
(40, 2)
12
(23, 3)
6
20
(45, 3)
(60, 2)
(20, 1)
40
2
5
10
15
(15, 1)
(40, 2)
12
(23, 3)
6
20
(43, 4)
(60, 2)
(20, 1)
40
2
5
10
15
(15, 1)
(40, 2)
12
(23, 3)
6
20
(43, 4)
(49, 5)
(20, 1)
40
2
5
10
15
(15, 1)
(40, 2)
12
(23, 3)
6
20
(43, 4)
(49, 5)
(20, 1)
40
2
5
10
15
(15, 1)
(40, 2)
12
(23, 3)
6
20
(43, 4)
To determine the
shortest route from
node 1 to any other
node, say node j,
refer to the
predecessor label for
node j until you reach
back to node 1.
(49, 5)
(20, 1)
40
2
5
10
15
(15, 1)
(40, 2)
12
(23, 3)
6
20
(43, 4)
Shortest Route
Application
C12
C13
C23
C25
C34
C14
C35
C45
The
Minimum
Spanning Tree
Problem
The
Minimum
Spanning Tree
Problem
The
Minimum
Spanning Tree
Problem
The
Minimum
Spanning Tree
Problem
Example
80
120
90
200
Steps Involved:
1. Start with any node and select the shortest arc
leading to any other node. This forms a
connected segment of two nodes.
2. Select the shortest arc leading from the
connected segment to the unconnected segment
of arcs.
3. Add the unconnected node of the newly selected
arc to the list of connected nodes and delete it
from the list of unconnected nodes. If all nodes
are connected, stop; otherwise, go back to
Step 2.
80
120
90
200
80
120
90
200
80
120
90
200
80
120
90
200
80
120
90
200
80
120
90
200
80
120
90
200
The
Maximal Flow
Problem
The
Maximal Flow
Problem
Example
5
2
2
4
Steps Involved:
1. Find a path from source node to sink node with
positive flow capacity. If no paths with positive flow
capacity exist, stop, for the current flows are optimal.
2. Determine the arc in the path with minimum flow
capacity, Cmin. Increase the flow along the path by
Cmin.
5
2
2
4
Path
1-3-7
Cmin
5
2
2
4
Path
1-3-7
1-2-5-7
Cmin
4
2
5
2
2
4
Path
1-3-7
1-2-5-7
1-4-6-7
Cmin
4
2
2
5
2
2
4
Path
1
1
1
1
3
2
4
2
7
5-7
6-7
3-6-7
Cmin
4
2
2
1
5
2
2 0
6 4
2
4
Path
1
1
1
1
3
2
4
2
7
5-7
6-7
3-6-7
Cmin
4
2
2
1
6
Path
1-3-5-7
Cmin
5
2
2 0
6 4
2
4
Path
1
1
1
1
3
2
4
2
7
5-7
6-7
3-6-7
Cmin
4
2
2
1
6
Path
1-3-5-7
1-4-3-6-7
Cmin
2
2
5
2
2 0
6 4
2
4
Path
1
1
1
1
3
2
4
2
7
5-7
6-7
3-6-7
Cmin
4
2
2
1
6
Path
1-3-5-7
1-4-3-6-7
Cmin
2
2
13