Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.

Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.

Like this presentation? Why not share!

- Minimum Spanning Tree by zhaokatherine 4931 views
- Minimum spanning Tree by Narendra Singh Patel 2408 views
- Prim's Algorithm on minimum spannin... by oneous 34534 views
- Simulation by SUDARSHAN KUMAR P... 4038 views
- Spanning trees & applications by Tech_MX 10738 views
- Greedy Algorithms by Cagatay Yuksel 4741 views

8,198 views

7,858 views

7,858 views

Published on

Networking models for quantitative methods of research

No Downloads

Total views

8,198

On SlideShare

0

From Embeds

0

Number of Embeds

6

Shares

0

Downloads

284

Comments

0

Likes

2

No embeds

No notes for slide

- 1. MINIMUM SPANNING<br />A Networking Model Report for<br />DPA 702 <br />QUANTITATIVE METHODS OF RESEARCH<br />By:<br />ALONA M. SALVACebu Technological University<br />
- 2. Topics<br /><ul><li>Definitions & Networking Basics
- 3. MST Algorithms
- 4. Kruskal
- 5. Reverse Delete
- 6. Prim
- 7. Brief History
- 8. Importance</li></li></ul><li>Definitions & Networking Basics<br />Network models are created from two major building blocks: <br />arcs (sometimes called edges), which are connecting lines, and <br />nodes, which are the connecting points for the arcs. <br />A graph is a structure that is built by interconnecting nodes and arcs. <br />A directed graph (often called a digraph) is a graph in which the arcs have specified directions, as shown by arrowheads. <br />Finally, a network is a graph (or more commonly a digraph) in which the arcs have an associated flow. <br />Practical Optimization: A Gentle Introduction, John W. Chinneck, 2010<br />http://www.sce.carleton.ca/faculty/chinneck/po.html <br />
- 9. Networking Basics<br />A network is an arrangement of paths connected at various points, through which items move.<br />Introduction to Management Science, 9thed, Bernard W. Taylor III, 2006<br />Practical Optimization: A Gentle Introduction, John W. Chinneck, 2010<br />http://www.sce.carleton.ca/faculty/chinneck/po.html <br />
- 10. Definitions & Networking Basics<br />Some further definitions associated with graphs and networks: <br />chain: a sequence of arcs connecting two nodes i and j. For example, in Figure 8.1(a), we might connect nodes A and E via the chains ABCE or ADCE. <br />path: a sequence of directed arcs connecting two nodes. In this case, you must respect the arc directions. For example, in Figure 8.1(b), a path from A to E might be ABDE, but the chain ABCE is not a path because it traverses arc BC in the wrong direction. <br />cycle: a chain that connects a node to itself without any retracing. <br />Practical Optimization: A Gentle Introduction, John W. Chinneck, 2010<br />http://www.sce.carleton.ca/faculty/chinneck/po.html <br />
- 11. Definitions & Networking Basics<br />connected graph (or connected network): has just one part. In other words you can reach any node in the graph or network via a chain from any other node. <br />Practical Optimization: A Gentle Introduction, John W. Chinneck, 2010<br />http://www.sce.carleton.ca/faculty/chinneck/po.html <br />
- 12. tree: a connected graph having no cycles. Some examples are shown in Figure 8.2(a).<br />Practical Optimization: A Gentle Introduction, John W. Chinneck, 2010<br />http://www.sce.carleton.ca/faculty/chinneck/po.html <br />
- 13. Definitions<br />spanning tree: normally a tree selected from among the arcs in a graph or network so that all of the nodes in the tree are connected. <br />Practical Optimization: A Gentle Introduction, John W. Chinneck, 2010<br />http://www.sce.carleton.ca/faculty/chinneck/po.html <br />
- 14. Definitions<br />flow capacity: an upper (and sometimes lower) limit on the amount of flow in an arc in a network. For example, the maximum flow rate of water in a pipe, or the maximum simultaneous number of calls on a telephone connection. <br />source (or source node): a node which introduces flow into a network. This happens at the boundary between the network under study and the external world. <br />sink (or sink node): a node which removes flow from a network. This happens at the boundary between the network under study and the external world. <br />Practical Optimization: A Gentle Introduction, John W. Chinneck, 2010<br />http://www.sce.carleton.ca/faculty/chinneck/po.html <br />
- 15. The Minimum Spanning Tree Problem <br />Given a graph in which the arcs are labeled with the distances between the nodes that they connect, find a spanning tree which has the minimum total length. <br />NO CYCLES ALLOWED!!<br />ALGORITHMS – a problem solving procedure following a set of rules<br />Cycle- the nodes are connected by more than one edge.<br />Practical Optimization: A Gentle Introduction, John W. Chinneck, 2010<br />http://www.sce.carleton.ca/faculty/chinneck/po.html <br />
- 16. Steps of the minimal spanning tree solution method:<br />Select any starting node (conventionally, node 1 is selected).<br />Select the node closest to the starting node to join the spanning tree.<br />Select the closest node not presently in the spanning tree.<br />Repeat step 3 until all nodes have joined the spanning tree.<br />Introduction to Management Science, 9thed, Bernard W. Taylor III, 2006<br />
- 17. Practical Optimization: A Gentle Introduction, John W. Chinneck, 2010<br />http://www.sce.carleton.ca/faculty/chinneck/po.html <br />
- 18. What is an MST Algorithm<br />An MST algorithm is a way to show the shortest distance<br />There are many different algorithms:<br /><ul><li>Kruskal
- 19. Reverse Delete
- 20. Prim</li></ul>Introduction to Management Science, 9thed, Bernard W. Taylor III, 2006<br />
- 21. KRUSKAL’S ALGORITHM<br />Pick out the smallest edges<br />Repeat Step 1 as long as the edges selected does not create a cycle<br />When all nodes have been connected, you are done<br />http://www.slideshare.net/zhaokatherine/minimum-spanning-tree<br />
- 22. REVERSE-DELETE ALGORITHM<br />This is the opposite of Kruskal’s algorithm<br />Start with all edges<br />Delete the longest edge<br />Continue deleting longest edges as long as all nodes are connected and no cycles are formed<br />http://www.slideshare.net/zhaokatherine/minimum-spanning-tree<br />
- 23. PRIM’S ALGORITHM<br />Pick out a nod<br />Pick out the shortest edge that is connected to your tree so far, as long as it doesn’t create a cycle<br />Continue this until all nodes are covered<br />http://www.slideshare.net/zhaokatherine/minimum-spanning-tree<br />
- 24. 17<br />i<br />a<br />b<br />h<br />c<br />d<br />e<br />f<br />g<br />8<br />7<br />9<br />4<br />2<br />11<br />14<br />4<br />6<br />7<br />10<br />8<br />2<br />1<br />The execution of Kruskal's algorithm (Moderate part)<br /><ul><li>The edges are considered by the algorithm in sorted order by weight.
- 25. The edge under consideration at each step is shown with a red weight number.</li></li></ul><li>18<br />i<br />i<br />a<br />b<br />h<br />c<br />d<br />e<br />f<br />g<br />a<br />b<br />h<br />c<br />d<br />e<br />f<br />g<br />8<br />7<br />8<br />7<br />9<br />9<br />4<br />4<br />2<br />2<br />11<br />11<br />14<br />14<br />4<br />4<br />6<br />7<br />6<br />7<br />10<br />10<br />8<br />8<br />2<br />1<br />2<br />1<br />
- 26. 19<br />i<br />i<br />a<br />b<br />h<br />c<br />d<br />e<br />f<br />g<br />a<br />b<br />h<br />c<br />d<br />e<br />f<br />g<br />8<br />7<br />8<br />7<br />9<br />9<br />4<br />4<br />2<br />2<br />11<br />11<br />14<br />14<br />4<br />4<br />6<br />7<br />6<br />7<br />10<br />10<br />8<br />8<br />2<br />1<br />2<br />1<br />
- 27. 20<br />i<br />i<br />a<br />b<br />h<br />c<br />d<br />e<br />f<br />g<br />a<br />b<br />h<br />c<br />d<br />e<br />f<br />g<br />8<br />7<br />8<br />7<br />9<br />9<br />4<br />4<br />2<br />2<br />11<br />11<br />14<br />14<br />4<br />4<br />6<br />7<br />6<br />7<br />10<br />10<br />8<br />8<br />2<br />1<br />2<br />1<br />
- 28. 21<br />i<br />i<br />a<br />b<br />h<br />c<br />d<br />e<br />f<br />g<br />a<br />b<br />h<br />c<br />d<br />e<br />f<br />g<br />8<br />7<br />8<br />7<br />9<br />9<br />4<br />4<br />2<br />2<br />11<br />11<br />14<br />14<br />4<br />4<br />6<br />7<br />6<br />7<br />10<br />10<br />8<br />8<br />2<br />1<br />2<br />1<br />
- 29. 22<br />i<br />i<br />a<br />b<br />h<br />c<br />d<br />e<br />f<br />g<br />a<br />b<br />h<br />c<br />d<br />e<br />f<br />g<br />8<br />7<br />8<br />7<br />9<br />9<br />4<br />4<br />2<br />2<br />11<br />11<br />14<br />14<br />4<br />4<br />6<br />7<br />6<br />7<br />10<br />10<br />8<br />8<br />2<br />1<br />2<br />1<br />
- 30. 23<br />Prim's algorithm(basic part)<br />MST_PRIM(G,w,r)<br />A={}<br />S:={r} (r is an arbitrary node in V)<br />3. Q=V-{r}; <br />4. while Q is not empty do {<br />5 take an edge (u, v) such that (1) u S and v Q (v S ) and<br /> (u, v) is the shortest edge satisfying (1)<br />6 add (u, v) to A, add v to S and delete v from Q<br /> }<br />
- 31. 24<br />Prim's algorithm<br />MST_PRIM(G,w,r)<br />1 for each u in Q do<br />key[u]:=∞<br />parent[u]:=NIL<br />4 key[r]:=0; parent[r]=NIL;<br />5 QV[Q]<br />6 while Q!={} do<br />7 u:=EXTRACT_MIN(Q); if parent[u]Nil print (u, parent[u])<br />8 for each v in Adj[u] do<br />9 if v in Q and w(u,v)<key[v]<br />10 then parent[v]:=u<br />11 key[v]:=w(u,v)<br />
- 32. 25<br /><ul><li>Grow the minimum spanning tree from the root vertex r.
- 33. Q is a priority queue, holding all vertices that are not in the tree now.
- 34. key[v] is the minimum weight of any edge connecting v to a vertex in the tree.
- 35. parent[v] names the parent of v in the tree.
- 36. When the algorithm terminates, Q is empty; the minimum spanning tree A for G is thus A={(v,parent[v]):v∈V-{r}}.
- 37. Running time: O(||E||lg |V|). </li></li></ul><li>26<br />i<br />i<br />a<br />b<br />h<br />c<br />d<br />e<br />f<br />g<br />a<br />b<br />h<br />c<br />d<br />e<br />f<br />g<br />8<br />7<br />8<br />7<br />9<br />9<br />4<br />4<br />2<br />2<br />11<br />11<br />14<br />14<br />4<br />4<br />6<br />7<br />6<br />7<br />10<br />10<br />8<br />8<br />2<br />1<br />2<br />1<br />The execution of Prim's algorithm(moderate part)<br />the root vertex<br />
- 38. 27<br />i<br />i<br />a<br />b<br />h<br />c<br />d<br />e<br />f<br />g<br />a<br />b<br />h<br />c<br />d<br />e<br />f<br />g<br />8<br />7<br />8<br />7<br />9<br />9<br />4<br />4<br />2<br />2<br />11<br />11<br />14<br />14<br />4<br />4<br />6<br />7<br />6<br />7<br />10<br />10<br />8<br />8<br />2<br />1<br />2<br />1<br />
- 39. 28<br />i<br />i<br />a<br />b<br />h<br />c<br />d<br />e<br />f<br />g<br />a<br />b<br />h<br />c<br />d<br />e<br />f<br />g<br />8<br />7<br />8<br />7<br />9<br />9<br />4<br />4<br />2<br />2<br />11<br />11<br />14<br />14<br />4<br />4<br />6<br />7<br />6<br />7<br />10<br />10<br />8<br />8<br />2<br />1<br />2<br />1<br />
- 40. 29<br />i<br />i<br />a<br />b<br />h<br />c<br />d<br />e<br />f<br />g<br />a<br />b<br />h<br />c<br />d<br />e<br />f<br />g<br />8<br />7<br />8<br />7<br />9<br />9<br />4<br />4<br />2<br />2<br />11<br />11<br />14<br />14<br />4<br />4<br />6<br />7<br />6<br />7<br />10<br />10<br />8<br />8<br />2<br />1<br />2<br />1<br />
- 41. 30<br />i<br />a<br />b<br />h<br />c<br />d<br />e<br />f<br />g<br />8<br />7<br />9<br />4<br />2<br />11<br />14<br />4<br />6<br />7<br />10<br />8<br />2<br />1<br />Bottleneck spanning tree: A spanning tree of G whose largest edge weight is minimum over all spanning trees of G. The value of the bottleneck spanning tree is the weight of the maximum-weight edge in T.<br />Theorem:A minimum spanning tree is also a bottleneck spanning tree. (Challenge problem)<br />
- 42. MST’s<br />Kruskal (1956) and Prim (1957) <br /><ul><li>MST’s makes our life easier and we save money by using short paths
- 43. MST’s was first seen in Poland, France, the Czech Republic Slovakia, and Czechoslovakia</li></li></ul><li>IMPORTANCE OF MST’S<br />We need it in computer science because it prevent loops in a switched network with redundant paths<br />It is one of the oldest and most basic graphs in theoritical computer science<br />http://www.slideshare.net/zhaokatherine/minimum-spanning-tree<br />
- 44. Why we like MST’s<br />MST’s are fun to work with <br />It helps us find the shortest route<br />“The shortest distance between two people is a sMILE.”<br />

No public clipboards found for this slide

×
### Save the most important slides with Clipping

Clipping is a handy way to collect and organize the most important slides from a presentation. You can keep your great finds in clipboards organized around topics.

Be the first to comment