Sie sind auf Seite 1von 29

NETWORK MODELS

Chapter Topics
Model Overview
Minimum Spanning Tree Problem
Shortest Route Problem
Maximum Flow Problem
Minimum Cost Flow Problem
Critical Path

2
Overview
A network or Graph is an arrangement of paths connected at
various points through which one or more items move from one
point to another.
The network is drawn as a diagram providing a picture of the
system thus enabling visual interpretation and enhanced
understanding.
A large number of real-life systems can be modeled as networks
which are relatively easy to conceive and construct.
Network diagrams consist of nodes and branches.
Nodes (circles) or vertices represent junction points, or locations.
Branches (lines) or arcs or edges, connect nodes and represent
flow.
Characteristics of Network Models
• A node is a specific location
• An arc connects 2 nodes
• Arcs can be 1-way (directed arcs) or 2-way
(undirected arcs)
Notation
G = (N, A)
Directed network defined by a set N of n nodes
and a set A of m directed arcs
Cost cij cost per unit flow on arc i to j
Application
Applications Nodes (vertices) Arcs (edges) Flow

Transportation Intersection, Roads, air lanes Vehicles,


systems Airports routes aircraft,
passengers
Integrated
computer circuits Switching points, Wires, Channels Messages,
gates, processors electrical current
Hydraulic systems Pumping Station, Pipelines Fluids
reservoirs, lakes

Manufacturing Work Centers Material-handling Jobs


routes
Communication
system Telephone Cables, fiber optics Voice messeges,
exchange, data
computers,
satellites
Example
Four nodes, four branches in figure.
“Atlanta”, node 1, termed origin, any of others destination.
Branches identified by beginning and ending node numbers.
Value assigned to each branch (distance, time, cost, etc.).

Figure 1
Network of Railroad Routes
7
Minimum Spanning Trees

8
Minimum Spanning Tree (MST)
A minimum spanning tree is a subgraph of an
undirected weighted graph G, such that

• it is a tree (i.e., it is acyclic)


• it covers all the vertices V
– contains |V| - 1 edges
• the total cost associated with tree edges is the
minimum among all possible spanning trees
• not necessarily unique

9
Concrete example

Imagine: You wish to connect telephone system in a town or


all the computers in an office building using
the least amount of cable

a weighted graph problem !!

- Each vertex in a graph G represents a home (computer)


- Each edge represents the amount of cable needed to
connect all computers

Minimum-Spanning Trees
Problem: Laying Telephone Wire

Central office

12
Wiring: Naïve Approach

Central office

Expensive!

13
Wiring: Better Approach

Central office

Minimize the total length of wire connecting the customers

14
How Can We Generate a MST?

9 b 9 b
a 2 6 a 2 6
d d
4 5 4 5
5 4 5 4

5 e 5 e
c c

15
Solving MST
Prim’s Algorithm
1. Select any node (conventionally node 1)
2. Connect this node to its nearest node
3. Find the nearest unconnected node and
connect it to the tree (if there is a tie, select
one arbitrarily)
4. Repeat step 3 until all nodes are connected
Solving MST
Kruskal’s Algorithm
1. Sort the arc cost in ascending order and form
LIST
2. Select the least cost arc from LIST
3. Select the next least cost arc from the LIST to
form a tree
4. Repeat step 3 until all nodes are connected
but avoiding cycle
Example Problem Data
Prim’s algorithm
Problem: Connect all nodes in a network so that the total branch lengths are
minimized.

Network of Possible Cable TV Paths

18
The Minimal Spanning Tree Problem
Solution Approach (1 of 6)
Start with any node in the network and select the closest node to join the
spanning tree.

Spanning Tree with Nodes 1 and 3

19
The Minimal Spanning Tree Problem
Solution Approach (2 of 6)
Select the closest node not presently in the spanning area.

Spanning Tree with Nodes 1, 3, and 4

20
The Minimal Spanning Tree Problem
Solution Approach (3 of 6)
Continue

Spanning Tree with Nodes 1, 2, 3, and 4

21
The Minimal Spanning Tree Problem
Solution Approach (4 of 6)
Continue

Spanning Tree with Nodes 1, 2, 3, 4, and 5

22
The Minimal Spanning Tree Problem
Solution Approach (5 of 6)
Continue

Spanning Tree with Nodes 1, 2, 3, 4, 5, and 7

23
The Minimal Spanning Tree Problem
Solution Approach (6 of 6)
Optimal Solution

Minimal Spanning Tree for Cable TV Network

24
The Minimal Spanning Tree Problem
Solution Method Summary
Select any starting node (conventionally, node 1).
Select the node closest to the starting node to join the
spanning tree.
Select the closest node not presently in the spanning tree
(if there is a tie, select one arbitrarily).
Repeat step 3 until all nodes have joined the spanning tree.

25
Lauderdale Construction Example
Building a network of water pipes to supply water to 8
houses (distance in hundreds of feet)
Steps 1 and 2
Starting arbitrarily with node (house) 1, the closest
node is node 3
Second and Third Iterations
Fourth and Fifth Iterations
Sixth and Seventh Iterations

After all nodes (homes) are connected the total distance


is 16 or 1,600 feet of water pipe

Das könnte Ihnen auch gefallen