Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the...

66

Transcript of Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the...

Page 1: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle
Page 2: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

Graphs and

Networks

Page 3: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

Königsberg bridges The Königsberg bridges is a

famous mathematics problem

inspired by an actual place and

situation.

The city of Königsberg on the

River Pregel in Prussia includes

two large islands which were connected to each other and

the mainland by seven bridges. The citizens of Königsberg

allegedly walked about on Sundays trying to find a route

that crossed each bridge exactly once, and returned to the

starting point.

Page 4: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

Model it as a graph

where the edges

represent the bridges

and the vertices

represent the

islands.

Königsberg bridges Simplify the problem

Image from wiki commons

Page 5: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

Königsberg bridges

Page 6: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

Königsberg bridges

Page 7: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

Königsberg bridges

Page 8: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

Königsberg bridges In 1736 Leonhard Euler proved that it was not

possible because all the vertices of the

graph are odd.

Page 9: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

Update: Kaliningrad

Two of the seven original bridges were destroyed during World War II. Two others were later demolished and replaced by a modern motorway.

The three other bridges remain, although only two

of them are from Euler's time (one was rebuilt in

1935).

Hence there are now only 5 bridges in Konigsberg.

Page 10: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

Activity: The Icosian Game (a.k.a. A Voyage Round the World)

Find a closed cycle that visits every vertex exactly once.

D C

A

E B F H

J I

G

O

N

M L

K T

S R

Q P

Page 11: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

Understand notation and terminology.

• Nodes/vertices; arcs/edges; node order;

• simple, complete, connected and bipartite graphs;

• walks, trails, paths, cycles and Hamilton cycles;

• trees; digraphs; planarity.

Be able to model appropriate problems by using graphs.

• e.g. Königsberg bridges;

• various river crossing problems;

• the tower of cubes problem;

• filing systems.

Graphs

Page 12: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

MEI D1 January 2010 question 3

Link to the examination paper

Link to FMSP revision recordings for MEI D1

Page 13: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

Graph Theory

Definitions Puzzle

Page 14: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

Minimum Spanning

Tree

Page 15: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

Networks

Be able to model and solve problems using networks

Minimum Connector (minimum spanning tree)

• Kruskal’s algorithm (on a network)

• Prim’s algorithm (on a network and on a table)

Page 17: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

A problem A cable TV company based in Plymouth

wants to link all the towns on the map. To

keep costs to a minimum they want to

use as little cable as possible.

What strategy should they use to solve

the problem?

Spanning tree

of minimum

length

Minimum

connector

Page 18: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

Kruskal’s algorithm

1. Select the shortest edge

in a network

2. Select the next shortest

edge which does not

create a cycle

3. Repeat step 2 until all

vertices have been

connected

Prim’s algorithm

1. Select any vertex

2. Select the shortest edge

connected to that vertex

3. Select the shortest edge

connected to any vertex

already connected

4. Repeat step 3 until all

vertices have been

connected

minimum connector algorithms

Page 19: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

A cable company want to connect five villages to their network

which currently extends to the market town of Avonford. What is

the minimum length of cable needed?

Avonford Fingley

Brinleigh Cornwell

Donster

Edan

2

7

4 5

8 6 4

5

3

8

Page 20: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

We model the situation as a network, then the

problem is to find the minimum connector for the

network

A F

B C

D

E

2

7

4 5

8 6 4

5

3

8

Page 21: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

A F

B C

D

E

2

7

4 5

8 6 4

5

3

8

List the edges in

order of size:

ED 2

AB 3

AE 4

CD 4

BC 5

EF 5

CF 6

AF 7

BF 8

CF 8

Kruskal’s Algorithm

Page 22: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

Select the shortest

edge in the network

ED 2

A F

B C

D

E

2

7

4 5

8 6 4

5

3

8

Kruskal’s Algorithm

Page 23: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

Select the next shortest

edge which does not

create a cycle

ED 2

AB 3

A

F

B C

D

E

2

7

4 5

8 6 4

5

3

8

Kruskal’s Algorithm

Page 24: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

Select the next shortest

edge which does not

create a cycle

ED 2

AB 3

CD 4 (or AE 4)

A F

B C

D

E

2

7

4 5

8 6 4

5

3

8

Kruskal’s Algorithm

Page 25: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

Select the next shortest

edge which does not

create a cycle

ED 2

AB 3

CD 4

AE 4

A F

B C

D

E

2

7

4 5

8 6 4

5

3

8

Kruskal’s Algorithm

Page 26: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

Select the next shortest

edge which does not

create a cycle

ED 2

AB 3

CD 4

AE 4

BC 5 – forms a cycle

EF 5

A F

B C

D

E

2

7

4 5

8 6 4

5

3

8

Kruskal’s Algorithm

Page 27: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

All vertices have been

connected.

The solution is

ED 2

AB 3

CD 4

AE 4

EF 5

Total weight of tree: 18

A F

B C

D

E

2

7

4 5

8 6 4

5

3

8

Kruskal’s Algorithm

Page 28: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

A F

B C

D

E

2

7

4 5

8 6 4

5

3

8

Select any vertex

A

Select the shortest

edge connected to

that vertex

AB 3

Prim’s Algorithm

Page 29: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

A F

B C

D

E

2

7

4 5

8 6 4

5

3

8

Select the shortest

edge connected to

any vertex already

connected.

AE 4

Prim’s Algorithm

Page 30: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

Select the shortest

edge connected to

any vertex already

connected.

ED 2

A

F

B C

D

E

2

7

4 5

8 6 4

5

3

8

Prim’s Algorithm

Page 31: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

Select the shortest

edge connected to

any vertex already

connected.

DC 4

A

F

B C

D

E

2

7

4 5

8 6 4

5

3

8

Prim’s Algorithm

Page 32: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

Select the shortest

edge connected to

any vertex already

connected.

CB 5 – forms a cycle

EF 5

A F

B C

D

E

2

7

4 5

8 6 4

5

3

8

Prim’s Algorithm

Page 33: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

A F

B C

D

E

2

7

4 5

8 6 4

5

3

8

All vertices have been

connected.

The solution is

AB 3

AE 4

ED 2

CD 4

EF 5

Total weight of tree: 18

Prim’s Algorithm

Page 34: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

Kruskal’s

ED 2

AB 3

CD 4

AE 4

EF 5

Total weight of tree: 18

A F

B C

D

E

2

7

4 5

8 6 4

5

3

8

Prim’s

AB 3

AE 4

ED 2

CD 4

EF 5

Minimum Spanning Tree

Page 35: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

A B C D E F

A - 3 - - 4 7

B 3 - 5 - - 8

C - 5 - 4 - 6

D - - 4 - 2 8

E 4 - - 2 - 5

F 7 8 6 8 5 -

First put the information from the network into a

distance matrix

Prim’s Algorithm on a Table

Page 36: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

A B C D E F

A - 3 - - 4 7

B 3 - 5 - - 8

C - 5 - 4 - 6

D - - 4 - 2 8

E 4 - - 2 - 5

F 7 8 6 8 5 -

•Start at vertex A. Label column A “1” .

•Delete row A

•Select the smallest entry in column A (AB,

length 3)

1

Avenford

Brinleigh

3

Page 37: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

A B C D E F

A - 3 - - 4 7

B 3 - 5 - - 8

C - 5 - 4 - 6

D - - 4 - 2 8

E 4 - - 2 - 5

F 7 8 6 8 5 -

1 •Label column B “2”

•Delete row B

•Select the smallest uncovered entry

in either column A or column B (AE,

length 4)

2

Avenford

Brinleigh

3

Edan

4

Page 38: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

A B C D E F

A - 3 - - 4 7

B 3 - 5 - - 8

C - 5 - 4 - 6

D - - 4 - 2 8

E 4 - - 2 - 5

F 7 8 6 8 5 -

1 2 •Label column E “3”

•Delete row E

•Select the smallest uncovered

entry in either column A, B or E

(ED, length 2)

3

Avenford

Brinleigh

3

Edan

4

Donster

2

Page 39: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

A B C D E F

A - 3 - - 4 7

B 3 - 5 - - 8

C - 5 - 4 - 6

D - - 4 - 2 8

E 4 - - 2 - 5

F 7 8 6 8 5 -

1 2 3 •Label column D “4”

•Delete row D

•Select the smallest uncovered

entry in either column A, B, D or E

(DC, length 4)

4

Avenford

Brinleigh

3

Edan

4

Donster

2

Cornwell

4

Page 40: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

A B C D E F

A - 3 - - 4 7

B 3 - 5 - - 8

C - 5 - 4 - 6

D - - 4 - 2 8

E 4 - - 2 - 5

F 7 8 6 8 5 -

1 2 3 •Label column C “5”

•Delete row C

•Select the smallest uncovered

entry in either column A, B, D, E or

C (EF, length 5)

4 5

Avenford

Brinleigh

3

Edan

4

Donster

2

Cornwell

4 Fingley

5

Page 41: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

A B C D E F

A - 3 - - 4 7

B 3 - 5 - - 8

C - 5 - 4 - 6

D - - 4 - 2 8

E 4 - - 2 - 5

F 7 8 6 8 5 -

1 2 3 4 5 FINALLY

•Label column F “6”

•Delete row F

6

Avenford

Brinleigh

3

Edan

4

Donster

2

Cornwell

4 Fingley

5 The spanning tree is shown

in the diagram

Length

3 + 4 + 4 + 2 + 5 = 18Km

Page 42: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

•Both algorithms will always give solutions with the same

length.

•They will usually select edges in a different order – you

must show this in your workings.

•Occasionally they will use different edges – this may

happen when you have to choose between edges with the

same length. In this case there is more than one minimum

connector for the network.

Some points to note

Page 43: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

Shortest Path

Problems

Page 44: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

Networks Be able to model and solve problems using networks

Shortest Path – Dijkstra’s algorithm

Page 45: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

Dijkstra’s Algorithm

4

3

7

1

4

2 4

7

2 5

3 2

A

C

D

B F

E

G

finds the shortest path from the start vertex to every other vertex

in the network. Find the shortest path from A to G

Page 46: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

Order in which vertices are labelled.

Distance from A to vertex

Working

A

C

D

B F

E

G

4

3

7

1

4

2 4

7

2 5

3 2

1 0

Label vertex A

1 as it is the first

vertex labelled

Dijkstra’s Algorithm

Page 47: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

A

C

D

B F

E

G

4

3

7

1

4

2 4

7

2 5

3 2

4

3

7

Update each vertex adjacent to A with a

‘working value’ for its distance from A.

1 0

Dijkstra’s Algorithm

Page 48: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

A

C

D

B F

E

G

4

3

7

1

4

2 4

7

2 5

3 2

4

3

7

2 3

Vertex C is closest

to A so we give it a

permanent label 3.

C is the 2nd vertex

to be permanently

labelled.

1 0

Dijkstra’s Algorithm

Page 49: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

6

8

1 0

4

7

2 3

3

A

C

D

B F

E

G

4

3

7

1

4

2 4

7

2 5

3 2

6 < 7 so

replace the

t-label here

Dijkstra’s Algorithm

Page 50: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

6

8

1 0

4

7

2 3

3

A

C

D

B F

E

G

4

3

7

1

4

2 4

7

2 5

3 2

The vertex with the smallest temporary label is B,

so make this label permanent. B is the 3rd vertex

to be permanently labelled. 3 4

Page 51: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

6

8

1 0

4

7

2 3

3

A

C

D

B F

E

G

4

3

7

1

4

2 4

7

2 5

3 2

3 4

5

8 5 < 6 so

replace the

t-label here

Dijkstra’s Algorithm

Page 52: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

6

8

1 0

4

7

2 3

3

A

C

D

B F

E

G

4

3

7

1

4

2 4

7

2 5

3 2

3 4

5

8

4 5

Dijkstra’s Algorithm

Page 53: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

6

8

1 0

4

7

2 3

3

A

C

D

B F

E

G

4

3

7

1

4

2 4

7

2 5

3 2

3 4

5

8

4 5 7 < 8 so

replace the

t-label here

12

7 7 < 8 so

replace

the t-label

here

7

Dijkstra’s Algorithm

Page 54: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

6

8

1 0

4

7

2 3

3

A

C

D

B F

E

G

4

3

7

1

4

2 4

7

2 5

3 2

3 4

5

8

4 5

12

7

7

5 7

Dijkstra’s Algorithm

Page 55: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

6

8

1 0

4

7

2 3

3

A

C

D

B F

E

G

4

3

7

1

4

2 4

7

2 5

3 2

3 4

5

8

4 5

12

7

7

5 7

9 < 12 so

replace the

t-label here

9

Dijkstra’s Algorithm

Page 56: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

6

8

1 0

4

7

2 3

3

A

C

D

B F

E

G

4

3

7

1

4

2 4

7

2 5

3 2

3 4

5

8

4 5

12

7

7

5 7 9

6 7

Dijkstra’s Algorithm

Page 57: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

6

8

1 0

4

7

2 3

3

A

C

D

B F

E

G

4

3

7

1

4

2 4

7

2 5

3 2

3 4

5

8

4 5

12

7

7

5 7 9

6 7

11 > 9 so do

not replace

the t-label

here

Dijkstra’s Algorithm

Page 58: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

6

8

1 0

4

7

2 3

3

A

C

D

B F

E

G

4

3

7

1

4

2 4

7

2 5

3 2

3 4

5

8

4 5

12

7

7

5 7 9

6 7

7 9

Dijkstra’s Algorithm

Page 59: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

6

8

1 0

4

7

2 3

3

A

C

D

B F

E

G

4

3

7

1

4

2 4

7

2 5

3 2

3 4

5

8

4 5

12

7

7

5 7 9

6 7

7 9

The shortest path is ABDEG, with length 9.

Dijkstra’s Algorithm

Page 60: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

1. Understand that a network is a graph with weighted arcs

2. Be able to model appropriate problems by using

networks

• Use in modelling ‘geographical’ problems and other problems

• e.g. translating a book, e.g. the knapsack problem.

3. The minimum connector problem

• Know and be able to use Kruskal's and Prim's algorithms

• Kruskal’s algorithm in graphical form only

• Prim’s algorithm in graphical or tabular form.

4. The shortest path from a given node to other nodes.

• Know and be able to apply Dijkstra's algorithm

Networks

Page 61: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

MEI D1 January 2010 question 5

Link to the examination paper

Link to FMSP revision recording

Page 62: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

MEI D1 January 2010 question 5

Page 63: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

MEI D1 January 2010 question 5

12

10

22

11

6 26

5

13

Page 64: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

MEI D1 January 2010 question 5

12

10

22

11

6 26

5

13

Page 65: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

MEI D1 January 2010 question 5

12

10

22

11

6 26

5

13

Page 66: Graphs and Networks - D1-Graphs-and... · 2019-06-06 · Kruskal’s algorithm 1. Select the shortest edge in a network 2. Select the next shortest edge which does not create a cycle

Jeff Trim

[email protected]

Central Coordinator

& Area Coordinator, SE Region

Further Mathematics Support Programme