The Minimum Connector Problem: Finding the shortest way to link all the vertices in a graph. Method:...

6
nimum Connector Problem: g the shortest way to link all the vertices : Find a minimum spanning tree mple would be joining up several towns with pipeline. own does not have to be joined to every oth ey all have to be joined into the pipe line

Transcript of The Minimum Connector Problem: Finding the shortest way to link all the vertices in a graph. Method:...

Page 1: The Minimum Connector Problem: Finding the shortest way to link all the vertices in a graph. Method: Find a minimum spanning tree An example would be joining.

The Minimum Connector Problem: Finding the shortest way to link all the vertices in a graph.

Method: Find a minimum spanning tree

An example would be joining up several towns with an oil pipeline.

Each town does not have to be joined to every other but they all have to be joined into the pipe line.

Page 2: The Minimum Connector Problem: Finding the shortest way to link all the vertices in a graph. Method: Find a minimum spanning tree An example would be joining.

Norwich Yarmouth Lowestoft Beccles

Norwich - 20 25 15

Yarmouth 20 - 8 17

Lowestoft 25 8 - 10

Beccles 15 17 10 -

Using Prim`s Algorithm if the data is in a chart/matrix

Find the minimum length of telephone cable required to join up the exchanges in the towns.

Page 3: The Minimum Connector Problem: Finding the shortest way to link all the vertices in a graph. Method: Find a minimum spanning tree An example would be joining.

Choose any column vertex and delete the row corresponding to this vertexCircle the chosen vertexi.e. choose Yarmouth column - delete Yarmouth row

Norwich Yarmouth Lowestoft Beccles

Norwich - 20 25 15

Yarmouth 20 - 8 17

Lowestoft 25 8 - 10

Beccles 15 17 10 -

Page 4: The Minimum Connector Problem: Finding the shortest way to link all the vertices in a graph. Method: Find a minimum spanning tree An example would be joining.

Ring the smallest entry in the column corresponding to this vertexi.e. 8 mls to Lowestoft in the Yarmouth column. Ring it.Delete the Lowestoft row and circle the Lowestoft column.

Norwich Yarmouth Lowestoft Beccles

Norwich - 20 25 15

Yarmouth 20 - 8 17

Lowestoft 25 8 - 10

Beccles 15 17 10 -

Y8

L

Page 5: The Minimum Connector Problem: Finding the shortest way to link all the vertices in a graph. Method: Find a minimum spanning tree An example would be joining.

Look for the smallest entry in the columns corresponding to these 2 vertices i.e. the Yarmouth and Lowestoft column

10 is the smallest in the Beccles row. Ring it.Delete the Beccles row and circle the Beccles column.

Norwich Yarmouth Lowestoft Beccles

Norwich - 20 25 15

Yarmouth 20 - 8 17

Lowestoft 25 8 - 10

Beccles 15 17 10 -

Y

B 10

8

L

Y8

L

Page 6: The Minimum Connector Problem: Finding the shortest way to link all the vertices in a graph. Method: Find a minimum spanning tree An example would be joining.

Look for the smallest entry in the columns corresponding to these 3 verticesi.e. the Yarmouth, Lowestoft and Beccles column .

15 is the smallest in the Norwich row. Ring it

Norwich Yarmouth Lowestoft Beccles

Norwich - 20 25 15

Yarmouth 20 - 8 17

Lowestoft 25 8 - 10

Beccles 15 17 10 -

Y

B 10

8

L

Y

15

B 10

8

L

NThe minimum length of cable = 33mls