DAST 2005 Tirgul 14 (and more) sample questions. DAST 2005 (reminder?) Kruskal’s MST Algorithm.

Slides:



Advertisements
Similar presentations
Minimum Spanning Trees Definition Two properties of MST’s Prim and Kruskal’s Algorithm –Proofs of correctness Boruvka’s algorithm Verifying an MST Randomized.
Advertisements

Minimum Spanning Tree (MST) form a tree that connects all the vertices (spanning tree). minimize the total edge weight of the spanning tree. Problem Select.
Discussion #36 Spanning Trees
Data Structures, Spring 2004 © L. Joskowicz 1 Data Structures – LECTURE 13 Minumum spanning trees Motivation Properties of minimum spanning trees Kruskal’s.
Graph Algorithms: Minimum Spanning Tree We are given a weighted, undirected graph G = (V, E), with weight function w:
Minimum Spanning Trees Definition Algorithms –Prim –Kruskal Proofs of correctness.
CSE 421 Algorithms Richard Anderson Dijkstra’s algorithm.
1 7-MST Minimal Spanning Trees Fonts: MTExtra:  (comment) Symbol:  Wingdings: Fonts: MTExtra:  (comment) Symbol:  Wingdings:
Tree tree = connected graph with no cycle tree = connected graph with |V|-1 edges tree = graph with |V|-1 edges and no cycles.
DAST 2005 Tirgul 11 (and more) sample questions. DAST 2005 Q.Let G = (V,E) be an undirected, connected graph with an edge weight function w : E→R. Let.
Minimum-Cost Spanning Tree weighted connected undirected graph spanning tree cost of spanning tree is sum of edge costs find spanning tree that has minimum.
Greedy Algorithms Reading Material: Chapter 8 (Except Section 8.5)
Lecture 12 Minimum Spanning Tree. Motivating Example: Point to Multipoint Communication Single source, Multiple Destinations Broadcast – All nodes in.
Is the following graph Hamiltonian- connected from vertex v? a). Yes b). No c). I have absolutely no idea v.
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.
DAST 2005 Tirgul 12 (and more) sample questions. DAST 2005 Q.We’ve seen that solving the shortest paths problem requires O(VE) time using the Belman-Ford.
Greedy Algorithms Like dynamic programming algorithms, greedy algorithms are usually designed to solve optimization problems Unlike dynamic programming.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 11 Instructor: Paul Beame.
Minimum Spanning Trees
Tirgul 13 Today we’ll solve two questions from last year’s exams.
Lecture 27 CSE 331 Nov 6, Homework related stuff Solutions to HW 7 and HW 8 at the END of the lecture Turn in HW 7.
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.
Minimal Spanning Trees What is a minimal spanning tree (MST) and how to find one.
Design and Analysis of Computer Algorithm September 10, Design and Analysis of Computer Algorithm Lecture 5-2 Pradondet Nilagupta Department of Computer.
MST Many of the slides are from Prof. Plaisted’s resources at University of North Carolina at Chapel Hill.
CS 3343: Analysis of Algorithms Lecture 21: Introduction to Graphs.
2IL05 Data Structures Fall 2007 Lecture 13: Minimum Spanning Trees.
Spring 2015 Lecture 11: Minimum Spanning Trees
0 Course Outline n Introduction and Algorithm Analysis (Ch. 2) n Hash Tables: dictionary data structure (Ch. 5) n Heaps: priority queue data structures.
UNC Chapel Hill Lin/Foskey/Manocha Minimum Spanning Trees Problem: Connect a set of nodes by a network of minimal total length Some applications: –Communication.
Minimum Spanning Trees and Kruskal’s Algorithm CLRS 23.
 2004 SDU Lecture 7- Minimum Spanning Tree-- Extension 1.Properties of Minimum Spanning Tree 2.Secondary Minimum Spanning Tree 3.Bottleneck.
Lecture 19 Greedy Algorithms Minimum Spanning Tree Problem.
Minimum spanning trees (MST) Def: A spanning tree of a graph G is an acyclic subset of edges of G connecting all vertices in G. A sub-forest of G is an.
CSCI 3160 Design and Analysis of Algorithms Tutorial 3 Chengyu Lin.
Nattee Niparnan. Greedy If solving problem is a series of steps Simply pick the one that “maximize” the immediate outcome Instead of looking for the long.
Chapter 23: Minimum Spanning Trees: A graph optimization problem Given undirected graph G(V,E) and a weight function w(u,v) defined on all edges (u,v)
Nattee Niparnan. Greedy If solving problem is a series of steps Simply pick the one that “maximize” the immediate outcome Instead of looking for the long.
Union-Find  Application in Kruskal’s Algorithm  Optimizing Union and Find Methods.
Spanning Tree Algorithms William T. Trotter and Mitchel T. Keller Math 3012 – Applied Combinatorics Spring 2009.
MST Lemma Let G = (V, E) be a connected, undirected graph with real-value weights on the edges. Let A be a viable subset of E (i.e. a subset of some MST),
Lecture 12 Algorithm Analysis Arne Kutzner Hanyang University / Seoul Korea.
Algorithm Design and Analysis June 11, Algorithm Design and Analysis Pradondet Nilagupta Department of Computer Engineering This lecture note.
Kruskal’s Algorithm for Computing MSTs Section 9.2.
Minimum Spanning Tree Graph Theory Basics - Anil Kishore.
Minimum Spanning Tree Chapter 13.6.
Lecture 12 Algorithm Analysis
Greedy Algorithms / Minimum Spanning Tree Yin Tat Lee
Autumn 2016 Lecture 11 Minimum Spanning Trees (Part II)
Minimum Spanning Tree.
Connected Components Minimum Spanning Tree
Minimum Spanning Tree.
Autumn 2015 Lecture 11 Minimum Spanning Trees (Part II)
Kruskal’s Algorithm for finding a minimum spanning tree
Chapter 23 Minimum Spanning Tree
Autumn 2015 Lecture 10 Minimum Spanning Trees
Lecture 12 Algorithm Analysis
Minimum Spanning Tree Algorithms
Richard Anderson Lecture 10 Minimum Spanning Trees
Lecture 14 Shortest Path (cont’d) Minimum Spanning Tree
Autumn 2016 Lecture 10 Minimum Spanning Trees
Minimum Spanning Trees (MSTs)
Lecture 12 Algorithm Analysis
Winter 2019 Lecture 11 Minimum Spanning Trees (Part II)
Analysis of Algorithms
Winter 2019 Lecture 10 Minimum Spanning Trees
Minimum Spanning Trees
Lecture 13 Shortest Path (cont’d) Minimum Spanning Tree
Minimum Spanning Trees
Autumn 2019 Lecture 11 Minimum Spanning Trees (Part II)
Presentation transcript:

DAST 2005 Tirgul 14 (and more) sample questions

DAST 2005 (reminder?) Kruskal’s MST Algorithm

DAST 2005 Q.Suppose that all edges weights in a graph are integers in the range of 1 to |V|. How fast can you make Kruskal’s algorithm run? A.Sorting |E| elements with values in the range of 1 to |V| takes O(V+E) (counting sort), find-set using an efficient union-find takes log*(E) (very fast) – total complexity of O(E log*(E)). (another reminder)

DAST 2005 Q.Let G be a connected undirected graph with the property that every edge has a different weight. Prove that there is only one minimum spanning tree for G. A.We assume there are two such trees and show there is a contradiction: exchange lemma: Let T and T’ be spanning trees in G(V,E). Given any there exists an edge such that is also a spanning tree proof (outline): adding e ’ to T results in a cycle. Removing an edge e along this cycle restores the spanning tree Now suppose there are two MSTs to G, let e ’ be the lightest edge in T’ - T, we will add e ’ to T, but get a contradiction when trying to remove an edge from the resulting cycle.