Академический Документы
Профессиональный Документы
Культура Документы
Terms
This is a network
This
A is a graph
15 25
Even
B 12 vertices
C , here
they
D15
are all
20 order 2
E 10
8 F
G
Vertices (Nodes) are A, B, C, D, E
Odd vertices, B has
order 1 and A has Edges are AB, AC, AD, DE, DF, EG
order 3 etc.
Terms
If an edge has a directional
arrow it is called an arc.
This arc is called BA. A
15 25
B 52
C
12
D
This is a
15 20
E loop
10
F
8
G
Adjacent 8
vertices
Connected Networks
A network is connected if all the nodes can
be reached by travelling along the edges.
A
15 25 A
connected
B network
C with a
12 D unique
path and
10 E without 20
loops is
called aF
tree
These are NOT
connected
Spanning Trees
Which line or loop would you remove from
the Afollowing networks to form a tree?.
H I
E
G J
B C
D F K
N
L
Networks
1. 3. A
A
1 2 3 4
B
Nu
C
mbe
B r of 6 4 5 5
C nod
es
D
D Nu E
E mbe
r of 5networks
Which 2 8 are5 4.
edg
connected? 1, 3 and A
F 2. es 4 B
A
B C
D
C E
D
Sketching Networks
1. Draw a connected network which has 4 nodes
and 6 edges.
B 12
C
D15 20
10
8 E
8 F
G
Calculate the total weight of the route
BACFDEG.
15 + 25 + 20 + 15 + 10 + 8 = 93
Weighted Networks
A network is drawn below.
a. Draw the route ABFCDE and find its 3+8+6+4+2=23
weight.
It is a unique
b. Explain why this route forms a treeroute
. which is
connected
Kruskals Algorithm -
minimum spanning trees
1. Choose the edge with the smallest weight.
A B
2 4
4
5
3 1
4
2 5
C
Minimum spanning trees
Draw a minimum spanning tree and calculate its length .
22 + 32 + 24 + 26 + 30 + 24 + 35 +
43 = 236m
B C 35 D
22 m 43
24
A
m Im 30 m
E
m
32
m H F
24 G 26
m m
Shortest Paths
Dijkstras Algorithm
In a network, there are often many possible paths. It is often
What is the shortest path from A to F in this
desirable (for reasons of cost, time, etc.) to find the shortest path.
In anetwork?
simple network the shortestAB path 1+3=
may be found by trial
and error. D 4
1. Label the starting point ACB
0 2+1+
AB 1
2. Find all paths/routes fromDthe start
3=6 node to the finish
node. AC 2+1
ACD 2+1=
B =3
3. Calculate the sum of the weights3 of eachACDF 2+1+3=
path/route.
6
ABC 1+1+
Star D 1=3 ABCD 1+1+1+
t F 3=6
ABEF 1+2+3=
ABE 1+2= 6
AC 2
3
ABC 1+1
ACB 2+1+2
=2
E =5
ACE 2+2=4
Practice
The diagram below is a floor plan of a house.
Draw a network of the floor plan and use it to
determine if the owner can pass through each
door of their house exactly once.
C D
A B
F E
I H G
Entr
y
Practise
There are 4 odd nodes (A, F, G and H) so the
network is not traversable. The owner cannot
pass through each door of their house exactly
once.
A B C D
G
I H F E
Practise
The owners have decided to put an air vent
system in the roof. Calculate the minimum cost
for installation if it costs $95 a metre.
A B C D
1
A
2
C D
A B B
C 7
F E
I H G
D
Entr E
y
F
G
Practise
12+12+8+8+6+6+12+7 = 71m
Therefore 71 x $95 = $6745 to install the
venting system.
A 12 B C D
7
12 12
G
I 8 H 8 6 F 6 E
Practise
Tauranga 70 120 90
Whakata
65
ne
Hamilton 80 350
Minimum
spanning
Rotorua 400
a) At the start of the operation the airline wants to ensure all
tree
towns and cities are connected, with a minimum total
Wellingto
n
distance for the flight paths.
b) How would the tree be adjusted if it is essential that there
are flights between Auckland and Hamilton and between
Auckland and Tauranga?
c) What is the shortest distance that a customer can fly to
get from Auckland to Wellington?
d) A flight inspector is based in Wellington. He wants to fly on
all the routes to inspect the flight services. Investigate this
A new theme park is planned to be constructed. Initially there will
be five attractions and they will be linked by pathways. The
attractions are:
Archer (A), Bowman (B), Crossbow (C), Dart (D) and Experience
(E). A B C D E a) Draw a network for this
The time to walk along these paths (in seconds)
theme park.is shown in the
table. 48 28 47
A 540 b) Security needs to patrol
0 0 0
every path every hour. The
48 38 70 round needs to start and
B - 460
0 0 0 end at the Archer. Find the
54 46 56 40 minimum time this can be
C -
0 0 0 0 done without repeating a
c) The builders
28 38 have been asked
60 path. Give a possible route.
to Dput in0 moving
0
560 - along
pathways 0 A B C D E
some paths so disabled visitors
47 70 60 A 48 54 28 47
canE move easily between
400 -
0 0 0
attractions. This table gives the B 48 - 46 38 70
expected cost in $1000 for
C 54 46 - 56 40
building these pathways. Suggest
a set of pathways that should be D 28 38 56 - -
developed to include moving E 47 70 40 - -
pathways so that every attraction