© M. Winter COSC/MATH 4P61 - Theory of Computation 11. 1 Minimum-weight Spanning Tree 1 4 2 3 15 12 10 20 18 1 4 2 3 15 12 10 20 18 Weighted Graph Spanning.

Slides:



Advertisements
Similar presentations
Lecture 15. Graph Algorithms
Advertisements

O(N 1.5 ) divide-and-conquer technique for Minimum Spanning Tree problem Step 1: Divide the graph into  N sub-graph by clustering. Step 2: Solve each.
Design and Analysis of Algorithms Approximation algorithms for NP-complete problems Haidong Xue Summer 2012, at GSU.
Minimum Spanning Trees Definition Two properties of MST’s Prim and Kruskal’s Algorithm –Proofs of correctness Boruvka’s algorithm Verifying an MST Randomized.
Discussion #36 Spanning Trees
Graph Algorithms: Minimum Spanning Tree We are given a weighted, undirected graph G = (V, E), with weight function w:
Spanning Trees.
Spanning Trees. 2 Spanning trees Suppose you have a connected undirected graph Connected: every node is reachable from every other node Undirected: edges.
Minimum Spanning Trees CIS 606 Spring Problem A town has a set of houses and a set of roads. A road connects 2 and only 2 houses. A road connecting.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 10 Instructor: Paul Beame.
T,  e  T c(e) = 50 G = (V, E), c(e) Minimum Spanning Tree.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 11 Instructor: Paul Beame.
Spanning Trees. Spanning trees Suppose you have a connected undirected graph –Connected: every node is reachable from every other node –Undirected: edges.
Dynamic Sets and Data Structures Over the course of an algorithm’s execution, an algorithm may maintain a dynamic set of objects The algorithm will perform.
Minimum Spanning Trees. Subgraph A graph G is a subgraph of graph H if –The vertices of G are a subset of the vertices of H, and –The edges of G are a.
Minimum spanning tree Prof Amir Geva Eitan Netzer.
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley. All rights reserved.
Theory of Computing Lecture 10 MAS 714 Hartmut Klauck.
SPANNING TREES Lecture 21 CS2110 – Spring
Minimum Spanning Trees
Spanning Trees Introduction to Spanning Trees AQR MRS. BANKS Original Source: Prof. Roger Crawfis from Ohio State University.
Spanning Trees Introduction to Spanning Trees AQR MRS. BANKS Original Source: Prof. Roger Crawfis from Ohio State University.
Module 5 – Networks and Decision Mathematics Chapter 23 – Undirected Graphs.
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-Cost Spanning Tree CS 110: Data Structures and Algorithms First Semester,
Prim's Algorithm This algorithm starts with one node. It then, one by one, adds a node that is unconnected to the new graph to the new graph, each time.
Lecture 19 Greedy Algorithms Minimum Spanning Tree Problem.
Union-find Algorithm Presented by Michael Cassarino.
Lecture 6 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
Minimum Spanning Trees CS 146 Prof. Sin-Min Lee Regina Wang.
Lecture19: Graph III Bohyung Han CSE, POSTECH CSED233: Data Structures (2014F)
Chapter 14 Section 4 - Slide 1 Copyright © 2009 Pearson Education, Inc. AND.
Union-Find  Application in Kruskal’s Algorithm  Optimizing Union and Find Methods.
SPANNING TREES Lecture 20 CS2110 – Fall Spanning Trees  Definitions  Minimum spanning trees  3 greedy algorithms (incl. Kruskal’s & Prim’s)
Graph Theory Trees. WHAT YOU WILL LEARN Trees, spanning trees, and minimum-cost spanning trees.
Graph Theory. undirected graph node: a, b, c, d, e, f edge: (a, b), (a, c), (b, c), (b, e), (c, d), (c, f), (d, e), (d, f), (e, f) subgraph.
Lecture 25 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
1 Chapter 10 Intractable Problems Switzerland Lion Monument in Lucerne.
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!
Kruskal’s Algorithm for Computing MSTs Section 9.2.
Graph Search Applications, Minimum Spanning Tree
Minimum-cost spanning tree
Minimum-Cost Spanning Tree and Kruskal’s Algorithm
Chapter 9 : Graphs Part II (Minimum Spanning Trees)
Lecture 2-2 NP Class.
Minimum Spanning Tree Chapter 13.6.
Richard Anderson Lecture 26 NP-Completeness
Spanning Trees.
Lecture 22 Minimum Spanning Tree
Short paths and spanning trees
Minimum Spanning Tree.
EMIS 8373: Integer Programming
Connected Components Minimum Spanning Tree
Minimum Spanning Tree.
Minimum Spanning Tree.
Graphs & Graph Algorithms 2
Minimum Spanning Trees
Spanning Trees.
4-4 Graph Theory Trees.
Kruskal’s Algorithm for finding a minimum spanning tree
CLASSES P AND NP.
Minimum Spanning Tree Neil Tang 4/3/2008
Minimum Spanning Trees
CSC 380: Design and Analysis of Algorithms
Minimum Spanning Trees
Minimum Spanning Trees (MSTs)
Spanning Trees Lecture 20 CS2110 – Spring 2015.
Prim’s algorithm for minimum spanning trees
Minimum Spanning Trees
Presentation transcript:

© M. Winter COSC/MATH 4P61 - Theory of Computation Minimum-weight Spanning Tree Weighted Graph Spanning Tree with weight: =48

© M. Winter COSC/MATH 4P61 - Theory of Computation Minimum-weight Spanning Tree Weighted Graph Spanning Tree with minimum weight: =40

© M. Winter COSC/MATH 4P61 - Theory of Computation Maintain for each node the connected component in which the node appears, using the edge selected so far. Initially every node is in a component by itself. 2.Consider the edge with the lowest weight that has not been considered yet. a)If this edge connects two node from currently different components, then add the edge to the result and merge the two components. b)If this edge connects two node from the same component, then do not add the edge to the result. 3.Continue until all edges have been considered. Complexity: O(e(e + m)) where m is the number of nodes and e is the number of edges. Kruskal’s Algorithm

© M. Winter COSC/MATH 4P61 - Theory of Computation Kruskal’s Algorithm

© M. Winter COSC/MATH 4P61 - Theory of Computation Travelling Salesman Problem (TSP) Hamilton (only one): (1,2,4,3,1) Find all cycles and choose the one with minimum weight. Complexity: O(m!)

© M. Winter COSC/MATH 4P61 - Theory of Computation SAT CSAT 3SAT Independent Set Problem (IS) Node-Cover Problem (NC) Directed Hamilton-Circuit Problem (DHC) Undirected Hamilton-Circuit Problem (HC) TSP NP Complete Problems

© M. Winter COSC/MATH 4P61 - Theory of Computation Reductions