Excursions in Modern Mathematics, 7e: 7.3 - 2Copyright © 2010 Pearson Education, Inc. 7 The Mathematics of Networks 7.1Trees 7.2Spanning Trees 7.3 Kruskal’s.

Slides:



Advertisements
Similar presentations
Decision Maths Networks Kruskals Algorithm Wiltshire Networks A Network is a weighted graph, which just means there is a number associated with each.
Advertisements

6.8 The Cheapest-Link Algorithm. The Cheapest-Link Algorithm Pick the edge with the smallest weight and mark it Pick the next edge with the smallest weight.
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley. All rights reserved.
Excursions in Modern Mathematics(Tannenbaum) and Thinking Mathematically (Blitzer)
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 7 The Mathematics of Networks 7.1Trees 7.2Spanning Trees 7.3 Kruskal’s.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 5 The Mathematics of Getting Around 5.1Euler Circuit Problems 5.2What.
7.3 Kruskal’s Algorithm. Kruskal’s Algorithm was developed by JOSEPH KRUSKAL.
A traveling salesman has customers in 5 cities which we will call A, B, C, D, and E. The salesman needs to travel to all 5 cities with his trip starting.
The Mathematics of Networks
Algorithms on graphs In Decision Mathematics, a graph consists of points (called vertices or nodes) which are connected by lines (edges or arcs). Eg in.
Chapter 2: Business Efficiency Lesson Plan Business Efficiency  Visiting Vertices-Graph Theory Problem Hamiltonian Circuits  Vacation Planning Problem.
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley. All rights reserved.
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley.
Slide 14-1 Copyright © 2005 Pearson Education, Inc. SEVENTH EDITION and EXPANDED SEVENTH EDITION.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 5 The Mathematics of Getting Around 5.1Euler Circuit Problems 5.2What.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 6 The Mathematics of Touring 6.1Hamilton Paths and Hamilton Circuits.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 5 The Mathematics of Getting Around 5.1Euler Circuit Problems 5.2What.
1 Excursions in Modern Mathematics Sixth Edition Peter Tannenbaum.
Spring 2015 Mathematics in Management Science Network Problems Networks & Trees Minimum Networks Spanning Trees Minimum Spanning Trees.
1 Excursions in Modern Mathematics Sixth Edition Peter Tannenbaum.
Module 5 – Networks and Decision Mathematics Chapter 23 – Undirected Graphs.
Aim: Graph Theory - Trees Course: Math Literacy Do Now: Aim: What’s a tree?
Spring 2015 Mathematics in Management Science Traveling Salesman Problem Approximate solutions for TSP NNA, RNN, SEA Greedy Heuristic Algorithms.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 5 The Mathematics of Getting Around 5.1Euler Circuit Problems 5.2What.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 6 The Mathematics of Touring 6.1Hamilton Paths and Hamilton Circuits.
Copyright 2013, 2010, 2007, Pearson, Education, Inc. Section 14.4 Trees.
An Illustration of Kruskal’s Algorithm Prepared Spring 2006 by Sean Szumlanski Computer Science II, University of Central Florida.
Chapter 2: Business Efficiency Lesson Plan Business Efficiency  Visiting Vertices-Graph Theory Problem Hamiltonian Circuits  Vacation Planning Problem.
Chapter 14 Section 4 - Slide 1 Copyright © 2009 Pearson Education, Inc. AND.
© 2010 Pearson Prentice Hall. All rights reserved. CHAPTER 15 Graph Theory.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 7 The Mathematics of Networks 7.1Trees 7.2Spanning Trees 7.3 Kruskal’s.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 5 The Mathematics of Getting Around 5.1Euler Circuit Problems 5.2What.
EXCURSIONS IN MODERN MATHEMATICS SIXTH EDITION Peter Tannenbaum 1.
Graphs A ‘Graph’ is a diagram that shows how things are connected together. It makes no attempt to draw actual paths or routes and scale is generally inconsequential.
Spring 2015 Mathematics in Management Science Network Problems Networks & Trees Minimum Networks Spanning Trees Minimum Spanning Trees.
EXCURSIONS IN MODERN MATHEMATICS SIXTH EDITION Peter Tannenbaum 1.
SPANNING TREES Lecture 20 CS2110 – Fall Spanning Trees  Definitions  Minimum spanning trees  3 greedy algorithms (incl. Kruskal’s & Prim’s)
AND.
SPANNING TREES Lecture 21 CS2110 – Fall Nate Foster is out of town. NO 3-4pm office hours today!
Graph Theory Trees. WHAT YOU WILL LEARN Trees, spanning trees, and minimum-cost spanning trees.
Trees Dr. Yasir Ali. A graph is called a tree if, and only if, it is circuit-free and connected. A graph is called a forest if, and only if, it is circuit-free.
Prims Algorithm for finding a minimum spanning tree
Tree Diagrams A tree is a connected graph in which every edge is a bridge. There can NEVER be a circuit in a tree diagram!
Graphs Definition: a graph is an abstract representation of a set of objects where some pairs of the objects are connected by links. The interconnected.
I can describe the differences between Hamilton and Euler circuits and find efficient Hamilton circuits in graphs. Hamilton Circuits I can compare and.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 6 The Mathematics of Touring 6.1Hamilton Paths and Hamilton Circuits.
Chapter 14 Section 3 - Slide 1 Copyright © 2009 Pearson Education, Inc. AND.
Midwestern State University Minimum Spanning Trees Definition of MST Generic MST algorithm Kruskal's algorithm Prim's algorithm 1.
Excursions in Modern Mathematics Sixth Edition
Excursions in Modern Mathematics Sixth Edition
Excursions in Modern Mathematics Sixth Edition
Minimum Spanning Trees
Minimum Spanning Tree Chapter 13.6.
Kruskal’s Algorithm Elaicca Ronna Ordoña. A cable company want to connect five villages to their network which currently extends to the market town of.
Minimum Spanning Trees and Shortest Paths
Chapter 2: Business Efficiency Lesson Plan
Chapter 2: Business Efficiency Lesson Plan
CSCE350 Algorithms and Data Structure
Minimum Spanning Trees
CSE373: Data Structures & Algorithms Lecture 12: Minimum Spanning Trees Catie Baker Spring 2015.
Section 14.4 Trees.
4-4 Graph Theory Trees.
Graphs.
Warm Up – Friday.
Example A cable company want to connect five villages to their network which currently extends to the market town of Avonford. What is the minimum.
Minimum spanning trees
Minimum spanning trees
Networks Kruskal’s Algorithm
Weighted Graphs & Shortest Paths
7 The Mathematics of Networks
Presentation transcript:

Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 7 The Mathematics of Networks 7.1Trees 7.2Spanning Trees 7.3 Kruskal’s Algorithm 7.4The Shortest Network Connecting Three Points 7.5 Shortest Networks for Four or More Points

Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. Kruskal’s algorithm is almost identical to the cheapest-link algorithm: We build the minimum spanning tree one edge at a time, choosing at each step the cheapest available edge. The only restriction to our choice of edges is that we should never choose an edge that creates a circuit. (Having three or more edges coming out of a vertex, however, is now OK.) What is truly remarkable about Kruskal’s algorithm is that–unlike the cheapest-link algorithm–it always gives an optimal solution. Kruskal’s Algorithm

Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. What is the optimal fiber-optic cable network connecting the seven towns shown? Example 7.7The Amazonian Cable Network: Part 2

Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. The weighted graph shows the costs (in millions of dollars) Example 7.7The Amazonian Cable Network: Part 2 of laying the cable lines along each of the potential links of the network.

Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. The answer, as we now know, is to find the MST of the graph. Example 7.7The Amazonian Cable Network: Part 2 We will use Kruskal’s algorithm to do it. Here are the details:

Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. Step 1. Among all the possible links, we choose the cheapest one, in this particular Example 7.7The Amazonian Cable Network: Part 2 case GF (at a cost of $42 million). This link is going to be part of the MST, and we mark it in red (or any other color) as shown

Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. Step 2. The next cheapest link available is BD at $45 million. We choose it for the MST and mark it in red. Example 7.7The Amazonian Cable Network: Part 2 Step 3. The next cheapest link available is AD at $49 million. Again, we choose it for the MST and mark it in red.

Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. Step 4. For the next cheapest link there is a tie between AB and DG, both at $51 million. But we can rule out AB–it would create a Example 7.7The Amazonian Cable Network: Part 2 circuit in the MST, and we can’t have that! The link DG, on the other hand, is just fine, so we mark it in red and make it part of the MST.

Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. Step 5. The next cheapest link available is CD at $53 million. No problems here,so again, we mark it in red and make it part of the MST. Example 7.7The Amazonian Cable Network: Part 2 Step 6. The next cheapest link available is BC at $55 million, but this link would create a circuit, so we cross it out. The next possible choice is CF at $56 million, but once again, this choice creates a circuit so we must cross it out. The next possible choice is CE at $59 million, and this is one we do choose. We mark it in red and make it part of the MST.

Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. Step... Wait a second–we are finished! Even without looking at a picture, we can tell we are done–six links is exactly what is Example 7.7The Amazonian Cable Network: Part 2 needed for an MST on seven vertices. The figure shows the MST in red. The total cost of the network is $299 million.

Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. Step 1Pick the cheapest link available. (In case of a tie, pick one at random.) Mark it (say in red). Step 2.Pick the next cheapest link available and mark it. Steps 3, 4,..., N – 1. Continue picking and marking the cheapest unmarked link available that does not create a circuit. KRUSKAL’S ALGORITHM

Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. As algorithms go, Kruskal’s algorithm is as good as it gets. First, it is easy to implement. Second, it is an efficient algorithm. As we increase the number of vertices and edges of the network, the amount of work grows more or less proportionally (roughly speaking, if finding the MST of a 30-city network takes you, say, 30 minutes, finding the MST of a 60- city network might take you 60 minutes). Kruskal’s Algorithm

Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. Last, but not least, Kruskal’s algorithm is an optimal algorithm–it will always find a minimum spanning tree. Thus, we have reached a surprisingly satisfying end to the MST story: No matter how complicated the network, we can find its minimum spanning tree by means of an algorithm that is easy to understand and implement, is efficient, and is also optimal. Kruskal’s Algorithm