You are on page 1of 25

Network

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.

2. Draw a network that is not connected, which has


4 nodes and the order of each node is 1.

3. Draw a connected network that has 4 nodes and


the order of each node is 4.
Properties of Networks

A route (path) is an array of edges joined in


sequence by nodes

A circuit is a path which begins and ends at the


same node
Properties of Networks
A Hamiltonian cycle (or Euler circuit) passes through
every node (vertex) of the network and each edge only
ONCE and RETURNS to its starting vertex. (all nodes
must have an even order). A practical example is a mail
A route.
B
A,B,C,D,A
C
D

An Euler path includes every edge exactly once and


traverses the entire graph. Here we traversed each
edge Donce but in this network
C we ended on a different
node.
A,B,C,D,A,C
A B
Euler path or circuit?
Start/finis
h Euler circuit as you can
draw the graph by
traversing each edge
only once and ending
up where you started.
Weighted Networks
A
15 25

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.

2. Remove the longest edge in each polygon.

3. Repeat step 2 until all vertices are


connected.

It is useful to remember that, if there are n vertices in


the graph, then there will be n-1 edges in the minimum
spanning tree. There will often be more than one
possible minimum spanning tree.
Kruskals Algorithm -
What is the minimum spanning tree for this problem?
What is the minimum length of cabling required to connect
minimum spanning trees
all the farms? 18 km

Telconz is rolling out a fast broadband programme and has


to lay fibre cables to collect the isolated farms at the
vertices in the following graph.
The distance (weights) on the edges are the length of
cabling required to connect each town.

What is the minimum spanning tree for this problem?

What is the minimum length of cabling required to connect


all the farms?

Start at the shortest


edge.
Remove the longest edge
in the polygon attached
to this edge. Repeat until
MOE 2011
all polygons are removed.
Minimum spanning trees
For each of the following, draw a minimum spanning tree and
calculate its length.

A B

2 4
4

5
3 1
4

2 5

C
Minimum spanning trees
Draw a minimum spanning tree and calculate its length .

A new high school is being built with 9 new classroom


blocks (A to I). Contractors need to pave footpaths
between these new blocks. The nodes of the
network represent the new blocks and the weights of the
paths represent the length of the pavement between the
new blocks. What is the minimum length of
footpath required
B to 38
connect each
C 35 ofDthe blocks?
m m
22 24 43
A
m 50 Im 30 58 m E
m 34 m m
32 m 32 45
m m
H 24 G 26 F m
m m
Minimum spanning trees
Draw a minimum spanning tree and calculate its length .

What is the minimum length of footpath required


to connect each of the blocks?

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

Cheapest cost = $6k


A new airline is setting up a network of flights between New
Zealand towns and cities. This matrix shows the towns and cities,
and the distances
Aucklaof possible
Tauran flights.
Whakata Hamilto Rotoru Wellingt
nd ga ne n a on
Auckland 150 160

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

You might also like