Minimum spanning tree

Size: px
Start display at page:

Download "Minimum spanning tree"

Transcription

1 Minimum spanning tree Jean Cousty MorphoGraph and Imagery 2011 J. Cousty : MorphoGraph and Imagery 1/17

2 Outline of the lecture 1 Minimum spanning tree 2 Cut theorem for MST 3 Kruskal algorithm J. Cousty : MorphoGraph and Imagery 2/17

3 Minimum spanning tree Edge weighted graph G denotes a connected undirected graph (E, Γ) J. Cousty : MorphoGraph and Imagery 3/17

4 Minimum spanning tree Edge weighted graph G denotes a connected undirected graph (E, Γ) W denotes a map from Γ into R W (u) is called the weight (or value) of u ( u Γ) J. Cousty : MorphoGraph and Imagery 3/17

5 Minimum spanning tree Edge weighted graph G denotes a connected undirected graph (E, Γ) W denotes a map from Γ into R W (u) is called the weight (or value) of u ( u Γ) The pair (G, W ) is called an (edge-) weighted graph J. Cousty : MorphoGraph and Imagery 3/17

6 Minimum spanning tree Spanning subgraph Definition A spanning subgraph of G is a graph (E, Γ ) such that Γ Γ J. Cousty : MorphoGraph and Imagery 4/17

7 Minimum spanning tree Weight of a subgraph Definition Let G = (E, Γ ) be a spanning subgraph of G The weight of G, denoted by W (G ), is the sum of the weights of the edges that belong to Γ W (G) = {W (u) u Γ } J. Cousty : MorphoGraph and Imagery 5/17

8 Minimum spanning tree Minimum spanning tree (MST) Definition A minimum spanning tree (for (G, W )) is a connected spanning subgraph G = (E, Γ ) of G whose weight is minimum: for any connected spanning subgraph G of G, if W (G ) W (G ) then W (G ) = W (G ) J. Cousty : MorphoGraph and Imagery 6/17

9 Minimum spanning tree Minimum spanning tree (MST) Definition A minimum spanning tree (for (G, W )) is a connected spanning subgraph G = (E, Γ ) of G whose weight is minimum: for any connected spanning subgraph G of G, if W (G ) W (G ) then W (G ) = W (G ) Property If G is an MST, then G is a tree J. Cousty : MorphoGraph and Imagery 6/17

10 Minimum spanning tree Illustration J. Cousty : MorphoGraph and Imagery 7/17

11 Minimum spanning tree Maximum spanning tree (MaxST) Definition A maximum spanning tree (for (G, W )) is a spanning tree (E, Γ ) of maximum weight: for any spanning tree G, if W (G ) W (G ) then W (G ) = W (G ) J. Cousty : MorphoGraph and Imagery 8/17

12 Minimum spanning tree Maximum spanning tree (MaxST) Definition A maximum spanning tree (for (G, W )) is a spanning tree (E, Γ ) of maximum weight: for any spanning tree G, if W (G ) W (G ) then W (G ) = W (G ) Property G is a MaxST of (G, W ) if and only if G is a MST of (G, W ) J. Cousty : MorphoGraph and Imagery 8/17

13 Minimum spanning tree MST algorithm and safe edges Generic MST Algorithm ( Data: (E, Γ, W ) ; Result: Γ such that (E, Γ ) is an MST) n := E ; Γ := ; k := 0 ; While k < n 1 do Find an edge u that is safe for Γ Γ := Γ {u} J. Cousty : MorphoGraph and Imagery 9/17

14 Minimum spanning tree MST algorithm and safe edges Generic MST Algorithm ( Data: (E, Γ, W ) ; Result: Γ such that (E, Γ ) is an MST) n := E ; Γ := ; k := 0 ; While k < n 1 do Find an edge u that is safe for Γ Γ := Γ {u} Definition Let (E, Γ ) be a subgraph of a MST Let u Γ \ Γ u is safe for Γ if (E, Γ {u}) is also a subgraph of an MST J. Cousty : MorphoGraph and Imagery 9/17

15 Cut theorem for MST Cut and MST Question How to efficiency detect an edge that is safe? J. Cousty : MorphoGraph and Imagery 10/17

16 Cut theorem for MST Cut Definition Let Γ Γ The cut induced by Γ is the subset of Γ that contains the edges that link two distinct connected components of the graph (E, Γ ) J. Cousty : MorphoGraph and Imagery 11/17

17 Cut theorem for MST Cut Definition Let Γ Γ The cut induced by Γ is the subset of Γ that contains the edges that link two distinct connected components of the graph (E, Γ ) A subset C of Γ is a cut if there exists Γ Γ such that C is the cut induced by Γ J. Cousty : MorphoGraph and Imagery 11/17

18 Cut theorem for MST Cut theorem for MST Theorem Let (E, Γ ) be a subgraph of an MST J. Cousty : MorphoGraph and Imagery 12/17

19 Cut theorem for MST Cut theorem for MST Theorem Let (E, Γ ) be a subgraph of an MST Let C be a cut that is a subset of the cut induced by Γ J. Cousty : MorphoGraph and Imagery 12/17

20 Cut theorem for MST Cut theorem for MST Theorem Let (E, Γ ) be a subgraph of an MST Let C be a cut that is a subset of the cut induced by Γ Let u C be an edge of minimum weight in C (i.e., v C, W (u) W (v)) J. Cousty : MorphoGraph and Imagery 12/17

21 Cut theorem for MST Cut theorem for MST Theorem Let (E, Γ ) be a subgraph of an MST Let C be a cut that is a subset of the cut induced by Γ Let u C be an edge of minimum weight in C (i.e., v C, W (u) W (v)) Then, u is safe for Γ J. Cousty : MorphoGraph and Imagery 12/17

22 Kruskal algorithm MST computation KRUSKAL Algorithm ( Data: a connected graph (E, Γ, W ) ; Result: Γ such that (E, Γ ) is an MST) n := E ; Γ := ; k := 0 ; i := 1; Sort the edges in Γ in increasing order of weight: Find the sequence (u 1,..., u m ) such that Γ = {u 1,..., u m } and W (u i 1 ) W (u i ), i {2,..., m} While k < n 1 Do {x i, y i } := u i ; If x i / the connected component containing y i in (E, Γ ) Then Γ := Γ {u i }; k := k + 1; i := i + 1; J. Cousty : MorphoGraph and Imagery 13/17

23 Kruskal algorithm Execution example J. Cousty : MorphoGraph and Imagery 14/17

24 Kruskal algorithm Proof of the algorithm When the test If is positive, the edge u is safe for Γ This can be proved by the cut theorem applied to the cut induced by Γ J. Cousty : MorphoGraph and Imagery 15/17

25 Kruskal algorithm Complexity of Kruskal Algorithm Complexity Complexity of a sort (O(m log(m)) for quick sort) J. Cousty : MorphoGraph and Imagery 16/17

26 Kruskal algorithm Complexity of Kruskal Algorithm Complexity Complexity of a sort (O(m log(m)) for quick sort) Complexity of the While loop: O(m) J. Cousty : MorphoGraph and Imagery 16/17

27 Kruskal algorithm Complexity of Kruskal Algorithm Complexity Complexity of a sort (O(m log(m)) for quick sort) Complexity of the While loop: O(m) Complexity of the If test: O(m n) (connected component algorithm seen in the course) J. Cousty : MorphoGraph and Imagery 16/17

28 Kruskal algorithm Complexity of Kruskal Algorithm Complexity Complexity of a sort (O(m log(m)) for quick sort) Complexity of the While loop: O(m) Complexity of the If test: O(m n) (connected component algorithm seen in the course) Overall complexity: O(m n + m log(m)) J. Cousty : MorphoGraph and Imagery 16/17

29 Kruskal algorithm Complexity of Kruskal Algorithm Complexity Complexity of a sort (O(m log(m)) for quick sort) Complexity of the While loop: O(m) Complexity of the If test: O(m n) (connected component algorithm seen in the course) Overall complexity: O(m n + m log(m)) The complexity of the If test can be reduced to quasi linear time using Tarjan s union of disjoint set algorithm J. Cousty : MorphoGraph and Imagery 16/17

30 Kruskal algorithm Prim and Boruvka Algorithm These are other algorithms for computing an MST Also a version of the generic algorithm Their invariants also rely on the cut theorem Read eppstein/161/ html J. Cousty : MorphoGraph and Imagery 17/17

1 Some loose ends from last time

1 Some loose ends from last time Cornell University, Fall 2010 CS 6820: Algorithms Lecture notes: Kruskal s and Borůvka s MST algorithms September 20, 2010 1 Some loose ends from last time 1.1 A lemma concerning greedy algorithms and

More information

Discrete Wiskunde II. Lecture 5: Shortest Paths & Spanning Trees

Discrete Wiskunde II. Lecture 5: Shortest Paths & Spanning Trees , 2009 Lecture 5: Shortest Paths & Spanning Trees University of Twente m.uetz@utwente.nl wwwhome.math.utwente.nl/~uetzm/dw/ Shortest Path Problem "#$%&'%()*%"()$#+,&- Given directed "#$%&'()*+,%+('-*.#/'01234564'.*,'7+"-%/8',&'5"4'84%#3

More information

Contents Lecture 4. Greedy graph algorithms Dijkstra s algorithm Prim s algorithm Kruskal s algorithm Union-find data structure with path compression

Contents Lecture 4. Greedy graph algorithms Dijkstra s algorithm Prim s algorithm Kruskal s algorithm Union-find data structure with path compression Contents Lecture 4 Greedy graph algorithms Dijkstra s algorithm Prim s algorithm Kruskal s algorithm Union-find data structure with path compression Jonas Skeppstedt (jonasskeppstedt.net) Lecture 4 2018

More information

CMPSCI611: The Matroid Theorem Lecture 5

CMPSCI611: The Matroid Theorem Lecture 5 CMPSCI611: The Matroid Theorem Lecture 5 We first review our definitions: A subset system is a set E together with a set of subsets of E, called I, such that I is closed under inclusion. This means that

More information

Homework Assignment 1 Solutions

Homework Assignment 1 Solutions MTAT.03.286: Advanced Methods in Algorithms Homework Assignment 1 Solutions University of Tartu 1 Big-O notation For each of the following, indicate whether f(n) = O(g(n)), f(n) = Ω(g(n)), or f(n) = Θ(g(n)).

More information

Greedy Algorithms My T. UF

Greedy Algorithms My T. UF Introduction to Algorithms Greedy Algorithms @ UF Overview A greedy algorithm always makes the choice that looks best at the moment Make a locally optimal choice in hope of getting a globally optimal solution

More information

/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: Matroids and Greedy Algorithms Date: 10/31/16

/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: Matroids and Greedy Algorithms Date: 10/31/16 60.433/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: Matroids and Greedy Algorithms Date: 0/3/6 6. Introduction We talked a lot the last lecture about greedy algorithms. While both Prim

More information

Connected Component Tree

Connected Component Tree onnected omponent Tree Jean ousty OUR-DAY OURSE on Mathematical Morphology in image analysis Bangalore 19- October 010 Motivation onnectivity plays important role for image processing Morphological connected

More information

Practice Final Solutions. 1. Consider the following algorithm. Assume that n 1. line code 1 alg(n) { 2 j = 0 3 if (n = 0) { 4 return j

Practice Final Solutions. 1. Consider the following algorithm. Assume that n 1. line code 1 alg(n) { 2 j = 0 3 if (n = 0) { 4 return j Practice Final Solutions 1. Consider the following algorithm. Assume that n 1. line code 1 alg(n) 2 j = 0 3 if (n = 0) 4 return j } 5 else 6 j = 2n+ alg(n 1) 7 return j } } Set up a recurrence relation

More information

Determine the size of an instance of the minimum spanning tree problem.

Determine the size of an instance of the minimum spanning tree problem. 3.1 Algorithm complexity Consider two alternative algorithms A and B for solving a given problem. Suppose A is O(n 2 ) and B is O(2 n ), where n is the size of the instance. Let n A 0 be the size of the

More information

Discrete Optimization 2010 Lecture 2 Matroids & Shortest Paths

Discrete Optimization 2010 Lecture 2 Matroids & Shortest Paths Matroids Shortest Paths Discrete Optimization 2010 Lecture 2 Matroids & Shortest Paths Marc Uetz University of Twente m.uetz@utwente.nl Lecture 2: sheet 1 / 25 Marc Uetz Discrete Optimization Matroids

More information

CSE 332. Data Abstractions

CSE 332. Data Abstractions Adam Blank Lecture 23 Autumn 2015 CSE 332 Data Abstractions CSE 332: Data Abstractions Graphs 4: Minimum Spanning Trees Final Dijkstra s Algorithm 1 1 dijkstra(g, source) { 2 dist = new Dictionary(); 3

More information

Algorithm Design and Analysis

Algorithm Design and Analysis Algorithm Design and Analysis LECTURE 7 Greedy Graph Algorithms Shortest paths Minimum Spanning Tree Sofya Raskhodnikova 9/14/016 S. Raskhodnikova; based on slides by E. Demaine, C. Leiserson, A. Smith,

More information

Lecture 1 : Probabilistic Method

Lecture 1 : Probabilistic Method IITM-CS6845: Theory Jan 04, 01 Lecturer: N.S.Narayanaswamy Lecture 1 : Probabilistic Method Scribe: R.Krithika The probabilistic method is a technique to deal with combinatorial problems by introducing

More information

CS599: Convex and Combinatorial Optimization Fall 2013 Lecture 17: Combinatorial Problems as Linear Programs III. Instructor: Shaddin Dughmi

CS599: Convex and Combinatorial Optimization Fall 2013 Lecture 17: Combinatorial Problems as Linear Programs III. Instructor: Shaddin Dughmi CS599: Convex and Combinatorial Optimization Fall 2013 Lecture 17: Combinatorial Problems as Linear Programs III Instructor: Shaddin Dughmi Announcements Today: Spanning Trees and Flows Flexibility awarded

More information

General Methods for Algorithm Design

General Methods for Algorithm Design General Methods for Algorithm Design 1. Dynamic Programming Multiplication of matrices Elements of the dynamic programming Optimal triangulation of polygons Longest common subsequence 2. Greedy Methods

More information

15.1 Matching, Components, and Edge cover (Collaborate with Xin Yu)

15.1 Matching, Components, and Edge cover (Collaborate with Xin Yu) 15.1 Matching, Components, and Edge cover (Collaborate with Xin Yu) First show l = c by proving l c and c l. For a maximum matching M in G, let V be the set of vertices covered by M. Since any vertex in

More information

Sublinear Algorithms Lecture 3. Sofya Raskhodnikova Penn State University

Sublinear Algorithms Lecture 3. Sofya Raskhodnikova Penn State University Sublinear Algorithms Lecture 3 Sofya Raskhodnikova Penn State University 1 Graph Properties Testing if a Graph is Connected [Goldreich Ron] Input: a graph G = (V, E) on n vertices in adjacency lists representation

More information

Algorithm Design and Analysis (NTU CSIE, Fall 2017) Homework #3. Homework #3. Due Time: 2017/12/14 (Thu.) 17:20 Contact TAs:

Algorithm Design and Analysis (NTU CSIE, Fall 2017) Homework #3. Homework #3. Due Time: 2017/12/14 (Thu.) 17:20 Contact TAs: Instructions and Announcements Homework #3 ue Time: 017/1/14 (Thu.) 17:0 Contact TAs: ada-ta@csie.ntu.edu.tw There are four programming problems and two handwritten problems. Programming. The judge system

More information

IS 709/809: Computational Methods in IS Research Fall Exam Review

IS 709/809: Computational Methods in IS Research Fall Exam Review IS 709/809: Computational Methods in IS Research Fall 2017 Exam Review Nirmalya Roy Department of Information Systems University of Maryland Baltimore County www.umbc.edu Exam When: Tuesday (11/28) 7:10pm

More information

Minimum Spanning Trees

Minimum Spanning Trees Minimum Spanning Trees We now know how to compute the minimum cost path from a start node to every other node in a graph. What other interesting problems can we solve using graphs? onstructing a Network

More information

CS 580: Algorithm Design and Analysis

CS 580: Algorithm Design and Analysis CS 580: Algorithm Design and Analysis Jeremiah Blocki Purdue University Spring 2018 Reminder: Homework 1 due tonight at 11:59PM! Recap: Greedy Algorithms Interval Scheduling Goal: Maximize number of meeting

More information

Lecture 4. 1 Estimating the number of connected components and minimum spanning tree

Lecture 4. 1 Estimating the number of connected components and minimum spanning tree CS 59000 CTT Current Topics in Theoretical CS Aug 30, 2012 Lecturer: Elena Grigorescu Lecture 4 Scribe: Pinar Yanardag Delul 1 Estimating the number of connected components and minimum spanning tree In

More information

25. Minimum Spanning Trees

25. Minimum Spanning Trees 695 25. Minimum Spanning Trees Motivation, Greedy, Algorithm Kruskal, General Rules, ADT Union-Find, Algorithm Jarnik, Prim, Dijkstra, Fibonacci Heaps [Ottman/Widmayer, Kap. 9.6, 6.2, 6.1, Cormen et al,

More information

25. Minimum Spanning Trees

25. Minimum Spanning Trees Problem Given: Undirected, weighted, connected graph G = (V, E, c). 5. Minimum Spanning Trees Motivation, Greedy, Algorithm Kruskal, General Rules, ADT Union-Find, Algorithm Jarnik, Prim, Dijkstra, Fibonacci

More information

Notes on MapReduce Algorithms

Notes on MapReduce Algorithms Notes on MapReduce Algorithms Barna Saha 1 Finding Minimum Spanning Tree of a Dense Graph in MapReduce We are given a graph G = (V, E) on V = N vertices and E = m N 1+c edges for some constant c > 0. Our

More information

ICS 252 Introduction to Computer Design

ICS 252 Introduction to Computer Design ICS 252 fall 2006 Eli Bozorgzadeh Computer Science Department-UCI References and Copyright Textbooks referred [Mic94] G. De Micheli Synthesis and Optimization of Digital Circuits McGraw-Hill, 1994. [CLR90]

More information

Counting and Constructing Minimal Spanning Trees. Perrin Wright. Department of Mathematics. Florida State University. Tallahassee, FL

Counting and Constructing Minimal Spanning Trees. Perrin Wright. Department of Mathematics. Florida State University. Tallahassee, FL Counting and Constructing Minimal Spanning Trees Perrin Wright Department of Mathematics Florida State University Tallahassee, FL 32306-3027 Abstract. We revisit the minimal spanning tree problem in order

More information

Greedy Algorithms and Data Compression. Curs 2018

Greedy Algorithms and Data Compression. Curs 2018 Greedy Algorithms and Data Compression. Curs 2018 Greedy Algorithms A greedy algorithm, is a technique that always makes a locally optimal choice in the myopic hope that this choice will lead to a globally

More information

CS325: Analysis of Algorithms, Fall Final Exam

CS325: Analysis of Algorithms, Fall Final Exam CS: Analysis of Algorithms, Fall 0 Final Exam I don t know policy: you may write I don t know and nothing else to answer a question and receive percent of the total points for that problem whereas a completely

More information

Kruskal s Theorem Rebecca Robinson May 29, 2007

Kruskal s Theorem Rebecca Robinson May 29, 2007 Kruskal s Theorem Rebecca Robinson May 29, 2007 Kruskal s Theorem Rebecca Robinson 1 Quasi-ordered set A set Q together with a relation is quasi-ordered if is: reflexive (a a); and transitive (a b c a

More information

University of New Mexico Department of Computer Science. Final Examination. CS 362 Data Structures and Algorithms Spring, 2007

University of New Mexico Department of Computer Science. Final Examination. CS 362 Data Structures and Algorithms Spring, 2007 University of New Mexico Department of Computer Science Final Examination CS 362 Data Structures and Algorithms Spring, 2007 Name: Email: Print your name and email, neatly in the space provided above;

More information

and e 2 ~ e 2 iff e 1

and e 2 ~ e 2 iff e 1 Section 4. Equivalence Relations A binary relation is an equivalence relation if it has the three properties reflexive, symmetric, and transitive (RST). Examples. a. Equality on any set. b. x ~ y iff x

More information

Undirected Graphs. V = { 1, 2, 3, 4, 5, 6, 7, 8 } E = { 1-2, 1-3, 2-3, 2-4, 2-5, 3-5, 3-7, 3-8, 4-5, 5-6 } n = 8 m = 11

Undirected Graphs. V = { 1, 2, 3, 4, 5, 6, 7, 8 } E = { 1-2, 1-3, 2-3, 2-4, 2-5, 3-5, 3-7, 3-8, 4-5, 5-6 } n = 8 m = 11 Undirected Graphs Undirected graph. G = (V, E) V = nodes. E = edges between pairs of nodes. Captures pairwise relationship between objects. Graph size parameters: n = V, m = E. V = {, 2, 3,,,, 7, 8 } E

More information

The algorithm of adaptive random search for discrete-continuous optimization 1

The algorithm of adaptive random search for discrete-continuous optimization 1 Abstract The algorithm of adaptive random search for discrete-continuous optimization 1 A. Sh. Abakarov, 2 Yu. A. Sushkov 3 St. Petersburg State University Some optimization approach for solving the mixed

More information

NATIONAL UNIVERSITY OF SINGAPORE CS3230 DESIGN AND ANALYSIS OF ALGORITHMS SEMESTER II: Time Allowed 2 Hours

NATIONAL UNIVERSITY OF SINGAPORE CS3230 DESIGN AND ANALYSIS OF ALGORITHMS SEMESTER II: Time Allowed 2 Hours NATIONAL UNIVERSITY OF SINGAPORE CS3230 DESIGN AND ANALYSIS OF ALGORITHMS SEMESTER II: 2017 2018 Time Allowed 2 Hours INSTRUCTIONS TO STUDENTS 1. This assessment consists of Eight (8) questions and comprises

More information

Graph-theoretic Problems

Graph-theoretic Problems Graph-theoretic Problems Parallel algorithms for fundamental graph-theoretic problems: We already used a parallelization of dynamic programming to solve the all-pairs-shortest-path problem. Here we are

More information

Segmentation by discrete watersheds Part 1: Watershed cuts

Segmentation by discrete watersheds Part 1: Watershed cuts Segmentation by discrete watersheds Part 1: Watershed cuts Jean Cousty Four-Day Course on Mathematical Morphology in image analysis Bangalore 19- October 010 J. Serra, J. Cousty, B.S. Daya Sagar : Course

More information

Matroids and submodular optimization

Matroids and submodular optimization Matroids and submodular optimization Attila Bernáth Research fellow, Institute of Informatics, Warsaw University 23 May 2012 Attila Bernáth () Matroids and submodular optimization 23 May 2012 1 / 10 About

More information

Geometric Steiner Trees

Geometric Steiner Trees Geometric Steiner Trees From the book: Optimal Interconnection Trees in the Plane By Marcus Brazil and Martin Zachariasen Part 3: Computational Complexity and the Steiner Tree Problem Marcus Brazil 2015

More information

Uniqueness of the maximal entropy measure on essential spanning forests. A One-Act Proof by Scott Sheffield

Uniqueness of the maximal entropy measure on essential spanning forests. A One-Act Proof by Scott Sheffield Uniqueness of the maximal entropy measure on essential spanning forests A One-Act Proof by Scott Sheffield First, we introduce some notation... An essential spanning forest of an infinite graph G is a

More information

Disjoint-Set Forests

Disjoint-Set Forests Disjoint-Set Forests Thanks for Showing Up! Outline for Today Incremental Connectivity Maintaining connectivity as edges are added to a graph. Disjoint-Set Forests A simple data structure for incremental

More information

Chapter 8 The Disjoint Sets Class

Chapter 8 The Disjoint Sets Class Chapter 8 The Disjoint Sets Class 2 Introduction equivalence problem can be solved fairly simply simple data structure each function requires only a few lines of code two operations: and can be implemented

More information

Sublinear-Time Algorithms

Sublinear-Time Algorithms Lecture 20 Sublinear-Time Algorithms Supplemental reading in CLRS: None If we settle for approximations, we can sometimes get much more efficient algorithms In Lecture 8, we saw polynomial-time approximations

More information

FINAL EXAM PRACTICE PROBLEMS CMSC 451 (Spring 2016)

FINAL EXAM PRACTICE PROBLEMS CMSC 451 (Spring 2016) FINAL EXAM PRACTICE PROBLEMS CMSC 451 (Spring 2016) The final exam will be on Thursday, May 12, from 8:00 10:00 am, at our regular class location (CSI 2117). It will be closed-book and closed-notes, except

More information

Data Structures and Algorithms

Data Structures and Algorithms Data Structures and Algorithms Session 21. April 13, 2009 Instructor: Bert Huang http://www.cs.columbia.edu/~bert/courses/3137 Announcements Homework 5 due next Monday I m out of town Wed to Sun for conference

More information

GENERALIZED INDEPENDENCE IN GRAPHS HAVING CUT-VERTICES

GENERALIZED INDEPENDENCE IN GRAPHS HAVING CUT-VERTICES GENERALIZED INDEPENDENCE IN GRAPHS HAVING CUT-VERTICES Vladimir D. Samodivkin 7th January 2008 (Dedicated to Mihail Konstantinov on his 60th birthday) Abstract For a graphical property P and a graph G,

More information

CS 161: Design and Analysis of Algorithms

CS 161: Design and Analysis of Algorithms CS 161: Design and Analysis of Algorithms Greedy Algorithms 3: Minimum Spanning Trees/Scheduling Disjoint Sets, continued Analysis of Kruskal s Algorithm Interval Scheduling Disjoint Sets, Continued Each

More information

Minimal Spanning Tree

Minimal Spanning Tree 1 Minimal Spanning Tree CS60002: Distributed Systems Pallab Dasgupta Professor, Dept. of Computer Sc. & Engg., Indian Institute of Technology Kharagpur 2 Leader Election versus Spanning Tree Let C E be

More information

Minimal Spanning Tree From a Minimum Dominating Set

Minimal Spanning Tree From a Minimum Dominating Set Minimal Spanning Tree From a Minimum Dominating Set M. YAMUNA VIT University School of advanced sciences Vellore, Tamilnadu INDIA myamuna@vit.ac.in K. KARTHIKA VIT University School of advanced sciences

More information

Discrete Optimization 2010 Lecture 1 Introduction / Algorithms & Spanning Trees

Discrete Optimization 2010 Lecture 1 Introduction / Algorithms & Spanning Trees Discrete Optimization 2010 Lecture 1 Introduction / Algorithms & Spanning Trees Marc Uetz University of Twente m.uetz@utwente.nl Lecture 1: sheet 1 / 43 Marc Uetz Discrete Optimization Outline 1 Introduction

More information

Tree-width and algorithms

Tree-width and algorithms Tree-width and algorithms Zdeněk Dvořák September 14, 2015 1 Algorithmic applications of tree-width Many problems that are hard in general become easy on trees. For example, consider the problem of finding

More information

Preliminaries. Graphs. E : set of edges (arcs) (Undirected) Graph : (i, j) = (j, i) (edges) V = {1, 2, 3, 4, 5}, E = {(1, 3), (3, 2), (2, 4)}

Preliminaries. Graphs. E : set of edges (arcs) (Undirected) Graph : (i, j) = (j, i) (edges) V = {1, 2, 3, 4, 5}, E = {(1, 3), (3, 2), (2, 4)} Preliminaries Graphs G = (V, E), V : set of vertices E : set of edges (arcs) (Undirected) Graph : (i, j) = (j, i) (edges) 1 2 3 5 4 V = {1, 2, 3, 4, 5}, E = {(1, 3), (3, 2), (2, 4)} 1 Directed Graph (Digraph)

More information

Combinatorial Optimization

Combinatorial Optimization Combinatorial Optimization Problem set 8: solutions 1. Fix constants a R and b > 1. For n N, let f(n) = n a and g(n) = b n. Prove that f(n) = o ( g(n) ). Solution. First we observe that g(n) 0 for all

More information

Algorithm Design and Analysis

Algorithm Design and Analysis Algorithm Design and Analysis LECTURE 8 Greedy Algorithms V Huffman Codes Adam Smith Review Questions Let G be a connected undirected graph with distinct edge weights. Answer true or false: Let e be the

More information

18.312: Algebraic Combinatorics Lionel Levine. Lecture 19

18.312: Algebraic Combinatorics Lionel Levine. Lecture 19 832: Algebraic Combinatorics Lionel Levine Lecture date: April 2, 20 Lecture 9 Notes by: David Witmer Matrix-Tree Theorem Undirected Graphs Let G = (V, E) be a connected, undirected graph with n vertices,

More information

UNIVERSITY OF CALIFORNIA, RIVERSIDE

UNIVERSITY OF CALIFORNIA, RIVERSIDE UNIVERSITY OF CALIFORNIA, RIVERSIDE DEPARTMENT OF COMPUTER SCIENCE 2006 DEPTH EXAMINATION IN THEORY OF OF COMPUTATION AND ALGORITHMS There are 10 problems on the test. Each problem is worth 10 points.

More information

1.3 Vertex Degrees. Vertex Degree for Undirected Graphs: Let G be an undirected. Vertex Degree for Digraphs: Let D be a digraph and y V (D).

1.3 Vertex Degrees. Vertex Degree for Undirected Graphs: Let G be an undirected. Vertex Degree for Digraphs: Let D be a digraph and y V (D). 1.3. VERTEX DEGREES 11 1.3 Vertex Degrees Vertex Degree for Undirected Graphs: Let G be an undirected graph and x V (G). The degree d G (x) of x in G: the number of edges incident with x, each loop counting

More information

ON THE NP-COMPLETENESS OF SOME GRAPH CLUSTER MEASURES

ON THE NP-COMPLETENESS OF SOME GRAPH CLUSTER MEASURES ON THE NP-COMPLETENESS OF SOME GRAPH CLUSTER MEASURES JIŘÍ ŠÍMA AND SATU ELISA SCHAEFFER Academy of Sciences of the Czech Republic Helsinki University of Technology, Finland elisa.schaeffer@tkk.fi SOFSEM

More information

Algorithms and Theory of Computation. Lecture 11: Network Flow

Algorithms and Theory of Computation. Lecture 11: Network Flow Algorithms and Theory of Computation Lecture 11: Network Flow Xiaohui Bei MAS 714 September 18, 2018 Nanyang Technological University MAS 714 September 18, 2018 1 / 26 Flow Network A flow network is a

More information

Lecture 12: May 09, Decomposable Graphs (continues from last time)

Lecture 12: May 09, Decomposable Graphs (continues from last time) 596 Pat. Recog. II: Introduction to Graphical Models University of Washington Spring 00 Dept. of lectrical ngineering Lecture : May 09, 00 Lecturer: Jeff Bilmes Scribe: Hansang ho, Izhak Shafran(000).

More information

ALL GRAPHS WITH PAIRED-DOMINATION NUMBER TWO LESS THAN THEIR ORDER. Włodzimierz Ulatowski

ALL GRAPHS WITH PAIRED-DOMINATION NUMBER TWO LESS THAN THEIR ORDER. Włodzimierz Ulatowski Opuscula Math. 33, no. 4 (2013), 763 783 http://dx.doi.org/10.7494/opmath.2013.33.4.763 Opuscula Mathematica ALL GRAPHS WITH PAIRED-DOMINATION NUMBER TWO LESS THAN THEIR ORDER Włodzimierz Ulatowski Communicated

More information

Maximum Flow Problem (Ford and Fulkerson, 1956)

Maximum Flow Problem (Ford and Fulkerson, 1956) Maximum Flow Problem (Ford and Fulkerson, 196) In this problem we find the maximum flow possible in a directed connected network with arc capacities. There is unlimited quantity available in the given

More information

Graph Theory. Lecture Notes Winter 2014/2015. Christian Schindelhauer

Graph Theory. Lecture Notes Winter 2014/2015. Christian Schindelhauer Graph Theory Lecture Notes Winter 04/05 Christian Schindelhauer Computer Networks and Telematics Faculty of Engineering University of Freiburg, Germany March 30, 05 Chapter Organization and Introduction

More information

VIII. NP-completeness

VIII. NP-completeness VIII. NP-completeness 1 / 15 NP-Completeness Overview 1. Introduction 2. P and NP 3. NP-complete (NPC): formal definition 4. How to prove a problem is NPC 5. How to solve a NPC problem: approximate algorithms

More information

CS675: Convex and Combinatorial Optimization Fall 2014 Combinatorial Problems as Linear Programs. Instructor: Shaddin Dughmi

CS675: Convex and Combinatorial Optimization Fall 2014 Combinatorial Problems as Linear Programs. Instructor: Shaddin Dughmi CS675: Convex and Combinatorial Optimization Fall 2014 Combinatorial Problems as Linear Programs Instructor: Shaddin Dughmi Outline 1 Introduction 2 Shortest Path 3 Algorithms for Single-Source Shortest

More information

Discrete Mathematics & Mathematical Reasoning Course Overview

Discrete Mathematics & Mathematical Reasoning Course Overview Discrete Mathematics & Mathematical Reasoning Course Overview Colin Stirling Informatics Colin Stirling (Informatics) Discrete Mathematics Today 1 / 19 Teaching staff Lecturers: Colin Stirling, first half

More information

Algorithm Design Strategies V

Algorithm Design Strategies V Algorithm Design Strategies V Joaquim Madeira Version 0.0 October 2016 U. Aveiro, October 2016 1 Overview The 0-1 Knapsack Problem Revisited The Fractional Knapsack Problem Greedy Algorithms Example Coin

More information

Contents. 1 Introduction & Median Finding 1.1 The Course 1.2 Algorithms 1.3 Order Statistics ( Median Finding )

Contents. 1 Introduction & Median Finding 1.1 The Course 1.2 Algorithms 1.3 Order Statistics ( Median Finding ) Contents 1 Introduction & Median Finding 1.1 The Course 1.2 Algorithms 1.3 Order Statistics ( Median Finding ) 2 Recap & Interval Scheduling 2.1 Recap of Median Finding 2.2 Interval Scheduling 3 Minimum

More information

Packing of Rigid Spanning Subgraphs and Spanning Trees

Packing of Rigid Spanning Subgraphs and Spanning Trees Packing of Rigid Spanning Subgraphs and Spanning Trees Joseph Cheriyan Olivier Durand de Gevigney Zoltán Szigeti December 14, 2011 Abstract We prove that every 6k + 2l, 2k-connected simple graph contains

More information

Greedy Algorithms and Data Compression. Curs 2017

Greedy Algorithms and Data Compression. Curs 2017 Greedy Algorithms and Data Compression. Curs 2017 Greedy Algorithms An optimization problem: Given of (S, f ), where S is a set of feasible elements and f : S R is the objective function, find a u S, which

More information

(c) Give a proof of or a counterexample to the following statement: (3n 2)= n(3n 1) 2

(c) Give a proof of or a counterexample to the following statement: (3n 2)= n(3n 1) 2 Question 1 (a) Suppose A is the set of distinct letters in the word elephant, B is the set of distinct letters in the word sycophant, C is the set of distinct letters in the word fantastic, and D is the

More information

Linear-Time Algorithms for Finding Tucker Submatrices and Lekkerkerker-Boland Subgraphs

Linear-Time Algorithms for Finding Tucker Submatrices and Lekkerkerker-Boland Subgraphs Linear-Time Algorithms for Finding Tucker Submatrices and Lekkerkerker-Boland Subgraphs Nathan Lindzey, Ross M. McConnell Colorado State University, Fort Collins CO 80521, USA Abstract. Tucker characterized

More information

Algorithm Design and Analysis

Algorithm Design and Analysis Algorithm Design and Analysis LECTURE 5 Greedy Algorithms Interval Scheduling Interval Partitioning Guest lecturer: Martin Furer Review In a DFS tree of an undirected graph, can there be an edge (u,v)

More information

ORBITAL DIGRAPHS OF INFINITE PRIMITIVE PERMUTATION GROUPS

ORBITAL DIGRAPHS OF INFINITE PRIMITIVE PERMUTATION GROUPS ORBITAL DIGRAPHS OF INFINITE PRIMITIVE PERMUTATION GROUPS SIMON M. SMITH Abstract. If G is a group acting on a set Ω and α, β Ω, the digraph whose vertex set is Ω and whose arc set is the orbit (α, β)

More information

Data Structures in Java

Data Structures in Java Data Structures in Java Lecture 21: Introduction to NP-Completeness 12/9/2015 Daniel Bauer Algorithms and Problem Solving Purpose of algorithms: find solutions to problems. Data Structures provide ways

More information

Nowhere zero flow. Definition: A flow on a graph G = (V, E) is a pair (D, f) such that. 1. D is an orientation of G. 2. f is a function on E.

Nowhere zero flow. Definition: A flow on a graph G = (V, E) is a pair (D, f) such that. 1. D is an orientation of G. 2. f is a function on E. Nowhere zero flow Definition: A flow on a graph G = (V, E) is a pair (D, f) such that 1. D is an orientation of G. 2. f is a function on E. 3. u N + D (v) f(uv) = w ND f(vw) for every (v) v V. Example:

More information

DECOMPOSITIONS OF MULTIGRAPHS INTO PARTS WITH THE SAME SIZE

DECOMPOSITIONS OF MULTIGRAPHS INTO PARTS WITH THE SAME SIZE Discussiones Mathematicae Graph Theory 30 (2010 ) 335 347 DECOMPOSITIONS OF MULTIGRAPHS INTO PARTS WITH THE SAME SIZE Jaroslav Ivančo Institute of Mathematics P.J. Šafári University, Jesenná 5 SK-041 54

More information

CS781 Lecture 3 January 27, 2011

CS781 Lecture 3 January 27, 2011 CS781 Lecture 3 January 7, 011 Greedy Algorithms Topics: Interval Scheduling and Partitioning Dijkstra s Shortest Path Algorithm Minimum Spanning Trees Single-Link k-clustering Interval Scheduling Interval

More information

Lecture 10 February 4, 2013

Lecture 10 February 4, 2013 UBC CPSC 536N: Sparse Approximations Winter 2013 Prof Nick Harvey Lecture 10 February 4, 2013 Scribe: Alexandre Fréchette This lecture is about spanning trees and their polyhedral representation Throughout

More information

Exact Inference I. Mark Peot. In this lecture we will look at issues associated with exact inference. = =

Exact Inference I. Mark Peot. In this lecture we will look at issues associated with exact inference. = = Exact Inference I Mark Peot In this lecture we will look at issues associated with exact inference 10 Queries The objective of probabilistic inference is to compute a joint distribution of a set of query

More information

CSE 202: Design and Analysis of Algorithms Lecture 3

CSE 202: Design and Analysis of Algorithms Lecture 3 CSE 202: Design and Analysis of Algorithms Lecture 3 Instructor: Kamalika Chaudhuri Announcement Homework 1 out Due on Tue Jan 24 in class No late homeworks will be accepted Greedy Algorithms Direct argument

More information

Part V. Matchings. Matching. 19 Augmenting Paths for Matchings. 18 Bipartite Matching via Flows

Part V. Matchings. Matching. 19 Augmenting Paths for Matchings. 18 Bipartite Matching via Flows Matching Input: undirected graph G = (V, E). M E is a matching if each node appears in at most one Part V edge in M. Maximum Matching: find a matching of maximum cardinality Matchings Ernst Mayr, Harald

More information

Optimization of Max-Norm Objective Functions in Image Processing and Computer Vision

Optimization of Max-Norm Objective Functions in Image Processing and Computer Vision Optimization of Max-Norm Objective Functions in Image Processing and Computer Vision Filip Malmberg 1, Krzysztof Chris Ciesielski 2,3, and Robin Strand 1 1 Centre for Image Analysis, Department of Information

More information

A class of heuristics for the constrained forest problem

A class of heuristics for the constrained forest problem Discrete Applied Mathematics 154 (2006) 6 14 www.elsevier.com/locate/dam Communication A class of heuristics for the constrained forest problem Michael Laszlo, Sumitra Mukherjee Nova Southeastern University,

More information

Lecture 18: P & NP. Revised, May 1, CLRS, pp

Lecture 18: P & NP. Revised, May 1, CLRS, pp Lecture 18: P & NP Revised, May 1, 2003 CLRS, pp.966-982 The course so far: techniques for designing efficient algorithms, e.g., divide-and-conquer, dynamic-programming, greedy-algorithms. What happens

More information

Bounded Treewidth Graphs A Survey German Russian Winter School St. Petersburg, Russia

Bounded Treewidth Graphs A Survey German Russian Winter School St. Petersburg, Russia Bounded Treewidth Graphs A Survey German Russian Winter School St. Petersburg, Russia Andreas Krause krausea@cs.tum.edu Technical University of Munich February 12, 2003 This survey gives an introduction

More information

The Number of Spanning Trees in a Graph

The Number of Spanning Trees in a Graph Course Trees The Ubiquitous Structure in Computer Science and Mathematics, JASS 08 The Number of Spanning Trees in a Graph Konstantin Pieper Fakultät für Mathematik TU München April 28, 2008 Konstantin

More information

Minimum Spanning Trees

Minimum Spanning Trees Lecture 6 Minimum Spanning Trees In this lecture, we study another classic graph problem from the distributed point of view: minimum spanning tree construction. Definition 6.1 (Minimum Spanning Tree (MST)).

More information

Outline. 1 NP-Completeness Theory. 2 Limitation of Computation. 3 Examples. 4 Decision Problems. 5 Verification Algorithm

Outline. 1 NP-Completeness Theory. 2 Limitation of Computation. 3 Examples. 4 Decision Problems. 5 Verification Algorithm Outline 1 NP-Completeness Theory 2 Limitation of Computation 3 Examples 4 Decision Problems 5 Verification Algorithm 6 Non-Deterministic Algorithm 7 NP-Complete Problems c Hu Ding (Michigan State University)

More information

A MODIFIED ALGORITHM FOR RANKING PLAYERS OF A ROUND-ROBIN TOURNAMENT

A MODIFIED ALGORITHM FOR RANKING PLAYERS OF A ROUND-ROBIN TOURNAMENT A MODIFIED ALGORITHM FOR RANKING PLAYERS OF A ROUND-ROBIN TOURNAMENT AVIJIT DATTA, MOAZZEM HOSSAIN AND M. KAYKOBAD Department of Computer Science and Engineering Bangladesh University of Engineering and

More information

Lecture notes for Advanced Graph Algorithms : Verification of Minimum Spanning Trees

Lecture notes for Advanced Graph Algorithms : Verification of Minimum Spanning Trees Lecture notes for Advanced Graph Algorithms : Verification of Minimum Spanning Trees Lecturer: Uri Zwick November 18, 2009 Abstract We present a deterministic linear time algorithm for the Tree Path Maxima

More information

ABHELSINKI UNIVERSITY OF TECHNOLOGY

ABHELSINKI UNIVERSITY OF TECHNOLOGY Approximation Algorithms Seminar 1 Set Cover, Steiner Tree and TSP Siert Wieringa siert.wieringa@tkk.fi Approximation Algorithms Seminar 1 1/27 Contents Approximation algorithms for: Set Cover Steiner

More information

Mathematics for Computer Science MATH 1206C [P.T.O] Page 1 of 5

Mathematics for Computer Science MATH 1206C [P.T.O] Page 1 of 5 x Page 1 of 5 Question 1: (25 Marks) ANSWER ALL QUESTIONS (a) Prove by mathematical induction that for n 1, n r=1 (b) State and prove the Well-Ordering Principle. r 3 = n2 4 (n + 1)2. (c) Using proof by

More information

Graduate Algorithms CS F-21 NP & Approximation Algorithms

Graduate Algorithms CS F-21 NP & Approximation Algorithms Graduate Algorithms CS673-2016F-21 NP & Approximation Algorithms David Galles Department of Computer Science University of San Francisco 21-0: Classes of Problems Consider three problem classes: Polynomial

More information

Salembier s Min-tree algorithm turned into breadth first search

Salembier s Min-tree algorithm turned into breadth first search Information Processing Letters 88 (2003) 225 229 www.elsevier.com/locate/ipl Salembier s Min-tree algorithm turned into breadth first search Wim H. Hesselink Department of Mathematics and Computing Science,

More information

Note on the structure of Kruskal s Algorithm

Note on the structure of Kruskal s Algorithm Note on the structure of Kruskal s Algorithm Nicolas Broutin Luc Devroye Erin McLeish November 15, 2007 Abstract We study the merging process when Kruskal s algorithm is run with random graphs as inputs.

More information

More on NP and Reductions

More on NP and Reductions Indian Institute of Information Technology Design and Manufacturing, Kancheepuram Chennai 600 127, India An Autonomous Institute under MHRD, Govt of India http://www.iiitdm.ac.in COM 501 Advanced Data

More information

3.4 Relaxations and bounds

3.4 Relaxations and bounds 3.4 Relaxations and bounds Consider a generic Discrete Optimization problem z = min{c(x) : x X} with an optimal solution x X. In general, the algorithms generate not only a decreasing sequence of upper

More information

Fractal Geometry of Minimal Spanning Trees

Fractal Geometry of Minimal Spanning Trees Fractal Geometry of Minimal Spanning Trees T. S. Jackson and N. Read Part I: arxiv:0902.3651 Part II: arxiv:0909.5343 Accepted by Phys. Rev. E Problem Definition Given a graph with costs on the edges,

More information