Minimum spanning trees. Minimum Connector Algorithms Kruskals algorithm 1.Select the shortest edge in a network 2.Select the next shortest edge which.

Презентация:



Advertisements
Похожие презентации
DEPTH FIRST TRAVERSAL Lesson Plan -2. Evocation Traverse Graph All vertices in graph must to traverse A vertex in graph have multiple parents, traversal.
Advertisements

Taking out Money from a Cash Machine Authors: Aleksey Ermolaev, Daria Zaitseva, Maria Leontyeva, Anatoly Leshchev, Form 10 pupils Teacher: V. V. Sergoushina,
REFERENCE ELEMENTS 64. If your REFERENCE ELEMENTS toolbar is not in view and not hidden, you can retrieve it from the toolbars menu seen here. 65.
11 BASIC DRESS-UP FEATURES. LESSON II : DRESS UP FEATURES 12.
© 2005 Cisco Systems, Inc. All rights reserved. BGP v Route Selection Using Policy Controls Using Multihomed BGP Networks.
CONSTRAINTS 52. You do your CONSTRAINING in Sketcher mode to create your part to exacting dimensions. This is the opposite of free-form creating we have.
What to expect? How to prepare? What to do? How to win and find a good job? BUSINESS ENGLISH COURSE NOVA KAKHOVKA GUMNASUIM 2012.
INVOLUTES An involute is a curve that is traced by a point on a taut cord unwinding from a circle or regular polygon, which is called a base or (plane.
BREADTH FIRST TRAVERSAL Lesson Plan -3. Evocation.
© 2005 Cisco Systems, Inc. All rights reserved. BGP v Customer-to-Provider Connectivity with BGP Connecting a Multihomed Customer to Multiple Service.
1 Another useful model is autoregressive model. Frequently, we find that the values of a series of financial data at particular points in time are highly.
ADVANCED DRESS-UP FEATURES 39. Once OK has been selected, your part will appear with the filleted area highlighted by orange lines at the boundaries.
IS THERE ANY LIFE ON MARS? Do you believe that we will be in need of traditional education?
Broadsheets and tabloids.. Newspaper…What is it? The newspaper is a resource that contains some information. The content of the newspaper can be both.
5 STEPS TO MAKE YOUR FAMILY HAPPIER YOU NEED THIS!
Sequences Sequences are patterns. Each pattern or number in a sequence is called a term. The number at the start is called the first term. The term-to-term.
C CC CONFLICTS. What conflict is. Conflict is a quarrel between two or more people, when they are disagree with each other. Conflict is a quarrel between.
Evsukov Roman, the grade the 9 B. Теacher: Menshikova I.A.
Teens of nowadays Prepared by: Denis Agapov, form 10 G Checked by: E.S. Rubtsova.
What points should we consider when choosing a career ? The project was done by Tatyana Lutsenko Form 11 A.
Транксрипт:

Minimum spanning trees

Minimum Connector Algorithms Kruskals 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 Prims 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

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 Example

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

A F B C D E 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 Kruskals Algorithm

Select the shortest edge in the network ED 2 Kruskals Algorithm A F B C D E

Select the next shortest edge which does not create a cycle ED 2 AB 3 Kruskals Algorithm A F B C D E

Select the next shortest edge which does not create a cycle ED 2 AB 3 CD 4 (or AE 4) Kruskals Algorithm A F B C D E

Select the next shortest edge which does not create a cycle ED 2 AB 3 CD 4 AE 4 Kruskals Algorithm A F B C D E

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 Kruskals Algorithm A F B C D E

All vertices have been connected. The solution is ED 2 AB 3 CD 4 AE 4 EF 5 Total weight of tree: 18 Kruskals Algorithm A F B C D E

A F B C D E Select any vertex A Select the shortest edge connected to that vertex AB 3 Prims Algorithm

A F B C D E Select the shortest edge connected to any vertex already connected. AE 4 Prims Algorithm

Select the shortest edge connected to any vertex already connected. ED 2 Prims Algorithm A F B C D E

Select the shortest edge connected to any vertex already connected. DC 4 Prims Algorithm A F B C D E

Select the shortest edge connected to any vertex already connected. EF 5 Prims Algorithm A F B C D E

A F B C D E All vertices have been connected. The solution is AB 3 AE 4 ED 2 DC 4 EF 5 Total weight of tree: 18

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

Construction of Prism Algorithm Method II

Construction of Kruskal Algorithm Method II

Mind Map