0% found this document useful (0 votes)
12 views

Section Check in Modelling With Algorithms Networks

The document contains examples and questions relating to modelling networks and algorithms. It includes questions on activity networks, Dijkstra's algorithm, Kruskal's algorithm, float calculations, incidence matrices, minimum spanning trees using Prim's algorithm, and directed networks.

Uploaded by

nnadozievi
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Section Check in Modelling With Algorithms Networks

The document contains examples and questions relating to modelling networks and algorithms. It includes questions on activity networks, Dijkstra's algorithm, Kruskal's algorithm, float calculations, incidence matrices, minimum spanning trees using Prim's algorithm, and directed networks.

Uploaded by

nnadozievi
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 12

Section Check In – Modelling with Algorithms

Networks
Questions
1. Represent this project using an activity network.

Activity Immediate predecessors


A -
B -
C A
D A, B
E B, C

2. Use Dijkstra’s algorithm to find the shortest path from A to G on this weighted network. You
should state your route and the total weight.

DISCLAIMER
This resource was designed using the most up to date information from the specification at the time it was published.
Specifications are updated over time, which means there may be contradictions between the resource and the
specification, therefore please use the information on the latest specification at all times. If you do notice a discrepancy
please contact us on the following email address: [email protected]

Version 1 1 © OCR 2020


3. Use Kruskal’s algorithm to find a minimum spanning tree for this network. Is your solution
unique? If not, state the number of different possible minimum spanning trees.

4. An activity has duration 8 hours. The earliest start and finish times for the activity are 23
and 35 hours. The latest start and finish times for the activity are 46 and 48 hours.

Determine the interfering float for this activity.

5. A graph is represented by this incidence matrix.

A B C D E F
A 0 0 0 1 0 1
B 0 0 1 0 1 0
C 0 1 0 1 0 1
D 1 0 1 0 1 0
E 0 1 0 1 0 0
F 1 0 1 0 0 0

Prove that the graph is bipartite and identify the two sets of vertices X and Y.

Version 1 2 © OCR 2020


6. The network shows distances in km between seven towns that are to be linked by a cable
TV company. The cost of the cable is £1000 per km to connect over the land and £1500 per
km to connect across the river which runs between D and F. The company wants to know
whether it is cheaper to connect the towns using the river crossing, or avoid this and stick to
land cabling only. By choosing an appropriate algorithm, compare the connection cost with
and without using the river crossing.

7. A 6 B
9 8
6
F 8 G
5
C
5 9
7 6

E 7 D

This network models the area covered by a council. The vertices represent towns and the
edges represent roads. The lengths of the roads are given in km. Following heavy snowfall,
the council wants to clear as few roads as possible so that it will still be possible to travel
from any town to any other town.

(a) Find the shortest total length of road that must be cleared and show which roads
should be cleared.

(b) Which pair of towns will have the longest journey between them on cleared roads?

Version 1 3 © OCR 2020


8. The distances to drive between county towns in the south east of England are shown in the
table.

Chichester Lewes Guildford Maidstone Readin Winchester


g
Chichester - 38 43 83 78 45
Lewes 38 - 63 44 96 80
Guildford 43 63 - 57 34 37
Maidstone 83 44 57 - 89 98
Reading 78 96 34 89 - 36
Winchester 45 80 37 98 36 -

Use Prim’s algorithm, starting at Chichester to find a minimum spanning tree for the six
cities. Show which entries in the table are chosen and indicate the order in which they are
selected. State the total distance.

9. Draw the directed network given by the distance matrix below, where the distances are given
in kilometres.

To
A B C D E F
A 20 25 30
B 10
C 14
From
D
E 30
F 16 18 12

Version 1 4 © OCR 2020


10. The directed bipartite graph represents links between chairlifts and ski runs in one part of a
ski resort.
Chairlifts are represented by capital letters, and ski runs are represented by numbers. For
example, chairlift A takes skiers to the tops of ski runs 1 and 2, whereas ski run 2 takes
skiers to the bottom of chairlift B.

Angus wants to ski all 5 ski runs, starting and finishing at the bottom of chairlift A.

(a) Which chairlifts does Angus have to repeat, and why?

(b) Which ski runs does Angus have to repeat, and why?

The chairlifts and ski runs shown above form only part of the resort. In fact, chairlift C also
takes skiers to the bottom of chairlift D.

(c) Why can this information not be represented in a bipartite graph?

(OCR (MEI) D1 June 2015)

Version 1 5 © OCR 2020


Extension

A radio company wants to broadcast to a group of small rural villages. They need to locate
radio transmitters in some of these villages so that they can broadcast programmes to all of
the villages. Each transmitter has a limited broadcasting range of 50 miles, so the radio
company needs to position more than one transmitter to reach all the villages. The relative
locations of the ten villages are shown in the distance matrix below. Shortest distances
between the villages are given in miles in the table below.

Villages P Q R S T U V W X Y
P 40 45 40 65
Q 40 40 30 30
R 45 40 40 50
S 40 40 60
T 30 30
U 30 30 45 45
V 60 45 45
W 45 45 50 50
X 65 50 50 50
Y 70 50 50

What is the fewest number of transmitters required?


Suggest which villages they should be located in.

Version 1 6 © OCR 2020


Worked solutions

1.

2.

Shortest route ACEG

Total weight 18

Note that the order of labelling for C and D can be interchanged.

Version 1 7 © OCR 2020


3. AB 2
AD 2
BC 3
CD 3
AE 4
ED 4
BD 4

There are 4 possible spanning trees with weight 11

4. Total float = (latest finish – earliest start) - duration = (48 – 23) – 8 = 17 hours
Independent float = max{(earliest finish – latest start) – duration, 0}
= max{(46 – 35) – 8, 0} = max{3, 0} = 3 hours
Interfering float = total float – independent float = 17 – 3 = 14 hours

5.
A C E The graph is bipartite as it can be split into
two distinct sets of vertices X = {A,C and E}
and Y = {D, F and B} where edges only exist
between vertices in different sets, not
between those in the same set.

D F B

Version 1 8 © OCR 2020


6. E.g. Prims starting at D, land only

Weight is 98

98 x 1000 = £98,000 by land

With the river crossing

Land 78 x1000 = £78,000

River 12 x 1500 = £18,000

Total £96,000

Two thousand cheaper than using the


land crossing

7. (a)

A 6 B

6
F G
5
C
5
7 6

E D
The roads to be cleared are shown in the diagram above. The total length is 35 km.

(b) The journey between A and F is the longest; a distance of 29 km.

Version 1 9 © OCR 2020


8.

Order of arcs CL,GC,GR,RW,LM total = 195

9.

B 10 C
20

A 25 14
E 30
12 D
30 18

F 16

10. (a) Angus has to repeat all of the chairlifts.)


He has to repeat A either because two ski runs deliver skiers to it, or because it
serves two ski runs.
He has to repeat B and C …
… either because two ski runs deliver skiers to them, or because they serve two ski
runs or because of ski run 4.

(b) Angus has to repeat ski run 3 because he has to repeat chairlifts B and/or C
(or runs 4 and 5).

(c) This would have to be represented by an arc from chairlift C to chairlift D, but in a
bipartite graph an arc can only connect two elements which are not in the same set.
In this case the sets are chairlifts and ski runs.

Version 1 10 © OCR 2020


Extension

It will help to represent the information as a network, where vertices are villages and the
edges indicate the distances. As transmitters have a range of 50 miles, towns more than 50
miles apart will not be joined by an edge (crossed out in table).

T2 Y2
Q4 30

40 30 30
40 50
45 U4
P3 R4 45
40 45 W4
40 45
50 50
2
V 50
S2

X3

Villages P Q R S T U V W X Y
P 40 45 40 65
Q 40 40 3 30
R 45 40 40 0 50
S 40 40 60
T 30 30
U 30 3 45 45
V 60 0 45 45
W 45 45 50 50
X 65 50 50 50
Y 7 50 50
0

We want as few transmitters as possible, so we might start by considering the vertices with
the highest order (that is, the towns within range of the most other towns). The order of
each vertex is shown and we can see that the highest are at Q, R, U and W, each with
order 4.

If we put a transmitter at Q, the villages Q, T,U,R and P are covered. We could put a
second transmitter at W, covering W, V, X and Y. This only leaves village S, where we put
a third transmitter. This solution gives transmitters at Q, W and S.

Alternatively, if we start with a transmitter at R (covering P, Q, R, S and X) and another at U


(covering, T, U, V and W), then again we need a third transmitter at Y. This solution gives
transmitters at R, U and Y.

Other solutions are transmitters at W, U and R, or at Q, R and W.

Version 1 11 © OCR 2020


We’d like to know your view on the resources we produce. By clicking on ‘Like’ or ‘Dislike’ you can help us to ensure that our resources
work for you. When the email template pops up please add additional comments if you wish and then just click ‘Send’. Thank you.
If you do not currently offer this OCR qualification but would like to do so, please complete the Expression of Interest Form which can be
found here: www.ocr.org.uk/expression-of-interest

OCR Resources: the small print


OCR’s resources are provided to support the delivery of OCR qualifications, but in no way constitute an endorsed teaching method that is required by the Board, and the
decision to use them lies with the individual teacher. Whilst every effort is made to ensure the accuracy of the content, OCR cannot be held responsible for any errors or
omissions within these resources.

Our documents are updated over time. Whilst every effort is made to check all documents, there may be contradictions between published support and the specification,
therefore please use the information on the latest specification at all times. Where changes are made to specifications these will be indicated within the document, there will be
a new version number indicated, and a summary of the changes. If you do notice a discrepancy between the specification and a resource please contact us at:
[email protected].

© OCR 2020 - This resource may be freely copied and distributed, as long as the OCR logo and this message remain intact and OCR is acknowledged as the originator of this
work. OCR acknowledges the use of the following content: n/a
Please get in touch if you want to discuss the accessibility of resources we offer to support delivery of our qualifications: [email protected]

Version 1 12 © OCR 2020

You might also like