MWA CA4 Networks
MWA CA4 Networks
1. The figure shows some places in the south of England. The numbers on the edges are the
distances in miles between them. A cable TV company based in Salisbury wishes to link all the
places using a minimum length of cable.
2. The road distances in kilometres between eight towns are shown in the table.
Boxes with borders are motorway routes, the others are A roads.
(a)
Matrix1 A B C D E F G H
A - 20 45 50 60 50 40 50
B 20 - 50 60 50 65 30 30
C 45 50 - 30 10 80 80 75
D 50 60 30 - 55 70 85 100
Total length=
E 60 50 10 55 - 85 75 55
F 50 60 80 70 85 - 70 100
(b)
G 40 30 80 85 75 70 - 45
H 50 30 75 100 55 100 45 -
(a) Use Matrix1 above to complete Prim’s algorithm (by matrix) starting at vertex A, to find the
minimum connector for the towns. Complete the diagram showing the minimum connector and
state the order of connection. Calculate the length of the minimum connector.
(b) The time for the journeys can be estimated by assuming an average speed of 100 kmh-1 for
the motorway and 60 kmh-1 for the other roads. Complete matrix2 showing times in minutes
between the towns. Find the minimum connector for the times and write down the total of all
the times on the minimum connector.
(c) Explain why the answer for part (b) is not the total time for the minimum connector found in
part (a). Give an example of a particular edge to illustrate your answer.
3. (a) A network has 20 vertices, how many edges will the minimum connector have?
(b) What order of complexity do the algorithms Kruskal’s and Prim’s have?
(c) Given that a computer implementation of Prim’s takes two seconds to solve a
problem with 10 vertices, find the approximate length of time that the computer will take to
solve a problem with: (i) 20 vertices (ii) 100 vertices
(a) (b)
(c)(i) (c)(ii)
4.
Total length=
(b)
Apply Dijkstra’s algorithm to the network (above) to find the shortest route from R to S.
Total length=
(a) What is the length of the shortest route from R to S?
(b) What is/are the shortest path(s) from R to S?
(c) What is the length of the shortest route from R to I?
(d) If you had to visit both D and G, what would be the shortest route starting at R and
finishing at S and what is its length?
(e) A new arc is made available between nodes G and E, of length 4. What is/are the shortest
route/s between R and S now and what is the length?
(a) (b)
(c)
(d) (e)