Top Banner
15

Minimum spanning trees Aims: To know the terms: tree, spanning tree, minimum spanning tree. To understand that a minimum spanning tree connects a network.

Jan 03, 2016

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Minimum spanning trees Aims: To know the terms: tree, spanning tree, minimum spanning tree. To understand that a minimum spanning tree connects a network.
Page 2: Minimum spanning trees Aims: To know the terms: tree, spanning tree, minimum spanning tree. To understand that a minimum spanning tree connects a network.

Minimum spanning trees

Page 3: Minimum spanning trees Aims: To know the terms: tree, spanning tree, minimum spanning tree. To understand that a minimum spanning tree connects a network.

Aims:

To know the terms: tree, spanning tree, minimum spanning tree.

To understand that a minimum spanning tree connects a network using the lowest possible

total weight of arcs.

To apply Prim’s Algorithm and Kruskal’s Algorithm to finding minimum connectors.

Page 4: Minimum spanning trees Aims: To know the terms: tree, spanning tree, minimum spanning tree. To understand that a minimum spanning tree connects a network.

Minimum Connector Algorithms

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

Page 5: Minimum spanning trees Aims: To know the terms: tree, spanning tree, minimum spanning tree. To understand that a minimum spanning tree connects a network.
Page 6: Minimum spanning trees Aims: To know the terms: tree, spanning tree, minimum spanning tree. To understand that a minimum spanning tree connects a network.
Page 7: Minimum spanning trees Aims: To know the terms: tree, spanning tree, minimum spanning tree. To understand that a minimum spanning tree connects a network.
Page 8: Minimum spanning trees Aims: To know the terms: tree, spanning tree, minimum spanning tree. To understand that a minimum spanning tree connects a network.
Page 9: Minimum spanning trees Aims: To know the terms: tree, spanning tree, minimum spanning tree. To understand that a minimum spanning tree connects a network.

Plenary

Finding the minimum Spanning Tree Example.

Work through together

Use mini whiteboards

Page 10: Minimum spanning trees Aims: To know the terms: tree, spanning tree, minimum spanning tree. To understand that a minimum spanning tree connects a network.
Page 11: Minimum spanning trees Aims: To know the terms: tree, spanning tree, minimum spanning tree. To understand that a minimum spanning tree connects a network.
Page 12: Minimum spanning trees Aims: To know the terms: tree, spanning tree, minimum spanning tree. To understand that a minimum spanning tree connects a network.

• 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 13: Minimum spanning trees Aims: To know the terms: tree, spanning tree, minimum spanning tree. To understand that a minimum spanning tree connects a network.

Aims:

To know the terms: tree, spanning tree, minimum spanning tree.

To understand that a minimum spanning tree connects a network using the lowest possible

total weight of arcs.

To apply Prim’s Algorithm and Kruskal’s Algorithm to finding minimum connectors.

Page 14: Minimum spanning trees Aims: To know the terms: tree, spanning tree, minimum spanning tree. To understand that a minimum spanning tree connects a network.

Minimum Connector Algorithms

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

Page 15: Minimum spanning trees Aims: To know the terms: tree, spanning tree, minimum spanning tree. To understand that a minimum spanning tree connects a network.

For next lesson

2 videos on Edpuzzle

with quiz

Independent study:

Excel worksheet to practise method on moodle.