Graph Algorithms Matching

Size: px
Start display at page:

Download "Graph Algorithms Matching"

Transcription

1 Chapter 5 Graph Algorithms Matching Algorithm Theory WS 2012/13 Fabian Kuhn

2 Circulation: Demands and Lower Bounds Given: Directed network, with Edge capacities 0and lower bounds l for Node demands for all 0: node needs flow and therefore is a sink 0: node has a supply of and is therefore a source 0: node is neither a source nor a sink Flow: Function : satisfying Capacity Conditions: : l Demand Conditions: : Objective: Does a flow satisfying all conditions exist? If yes, find such a flow. Algorithm Theory, WS 2012/13 Fabian Kuhn 2

3 Integrality Theorem: Consider a circulation problem with integral capacities, flow lower bounds, and node demands. If the problem is feasible, then it also has an integral solution. Proof: Graph has only integral capacities and demands Thus, the flow network used in the reduction to solve circulation with demands and no lower bounds has only integral capacities The theorem now follows because a max flow problem with integral capacities also has an optimal integral solution It also follows that with the max flow algorithms we studied, we get an integral feasible circulation solution. Algorithm Theory, WS 2012/13 Fabian Kuhn 3

4 Matrix Rounding Given: matrix, of real numbers row sum:,, column sum:, Goal: Round each,, as well as and up or down to the next integer so that the sum of rounded elements in each row (column) equals the rounded row (column) sum Original application: publishing census data Example: original data possible rounding Algorithm Theory, WS 2012/13 Fabian Kuhn 4

5 Matrix Rounding Theorem: For any matrix, there exists a feasible rounding. Remark: Just rounding to the nearest integer doesn t work original data rounding to nearest integer feasible rounding Algorithm Theory, WS 2012/13 Fabian Kuhn 5

6 Reduction to Circulation Matrix elements and row/column sums give a feasible circulation that satisfies all lower bound, capacity, and demand constraints rows: 3,4 columns: 12,13 2,3 10,11 all demands 0 Algorithm Theory, WS 2012/13 Fabian Kuhn 6

7 Matrix Rounding Theorem: For any matrix, there exists a feasible rounding. Proof: The matrix entries, and the row and column sums and give a feasible circulation for the constructed network Every feasible circulation gives matrix entries with corresponding row and column sums (follows from demand constraints) Because all demands, capacities, and flow lower bounds are integral, there is an integral solution to the circulation problem gives a feasible rounding! Algorithm Theory, WS 2012/13 Fabian Kuhn 7

8 Matching Algorithm Theory, WS 2012/13 Fabian Kuhn 8

9 Gifts Children Graph Which child likes which gift can be represented by a graph Algorithm Theory, WS 2012/13 Fabian Kuhn 9

10 Matching Matching: Set of pairwise non incident edges Maximal Matching: A matching s.t. no more edges can be added Maximum Matching: A matching of maximum possible size Perfect Matching: Matching of size (every node is matched) Algorithm Theory, WS 2012/13 Fabian Kuhn 10

11 Bipartite Graph Definition: A graph, is called bipartite iff its node set can be partitioned into two parts such that for each edge u, v,, 1. Thus, edges are only between the two parts Algorithm Theory, WS 2012/13 Fabian Kuhn 11

12 Santa s Problem Maximum Matching in Bipartite Graphs: Every child can get a gift iff there is a matching of size #children Clearly, every matching is at most as big If #children #gifts, there is a solution iff there is a perfect matching Algorithm Theory, WS 2012/13 Fabian Kuhn 12

13 Reducing to Maximum Flow Like edge disjoint paths all capacities are Algorithm Theory, WS 2012/13 Fabian Kuhn 13

14 Reducing to Maximum Flow Theorem: Every integer solution to the max flow problem on the constructed graph induces a maximum bipartite matching of. Proof: 1. An integer flow of value induces a matching of size Left nodes (gifts) have incoming capacity 1 Right nodes (children) have outgoing capacity 1 Left and right nodes are incident to 1edge of with 1 2. A matching of size implies a flow of value For each edge, of the matching:,,, 1 All other flow values are 0 Algorithm Theory, WS 2012/13 Fabian Kuhn 14

15 Running Time of Max. Bipartite Matching Theorem: A maximum matching of a bipartite graph can be computed in time Algorithm Theory, WS 2012/13 Fabian Kuhn 15

16 Perfect Matching? There can only be a perfect matching if both sides of the partition have size. There is no perfect matching, iff there is an cut of size in the flow network. 2 2 Algorithm Theory, WS 2012/13 Fabian Kuhn 16

17 Cuts Partition, of node set such that and If : edge,is in cut, If : edge, is in cut, Otherwise (if, ), all edges from to some are in cut, Algorithm Theory, WS 2012/13 Fabian Kuhn 17

18 Hall s Marriage Theorem Theorem: A bipartite graph,for which has a perfect matching if and only if :, where is the set of neighbors of nodes in. Proof: No perfect matching some cut has capacity 1. Assume there is for which U : Algorithm Theory, WS 2012/13 Fabian Kuhn 18

19 Hall s Marriage Theorem Theorem: A bipartite graph,for which has a perfect matching if and only if :, where is the set of neighbors of nodes in. Proof: No perfect matching some cut has capacity 2. Assume that there is a cut, of capacity Algorithm Theory, WS 2012/13 Fabian Kuhn 19

20 Hall s Marriage Theorem Theorem: A bipartite graph,for which has a perfect matching if and only if :, where is the set of neighbors of nodes in. Proof: No perfect matching some cut has capacity 2. Assume that there is a cut, of capacity Algorithm Theory, WS 2012/13 Fabian Kuhn 20

21 What About General Graphs Can we efficiently compute a maximum matching if is not bipartitie? How good is a maximal matching? A matching that cannot be extended Vertex Cover: set of nodes such that,,,. A vertex cover covers all edges by incident nodes Algorithm Theory, WS 2012/13 Fabian Kuhn 21

22 Vertex Cover vs Matching Consider a matching and a vertex cover Claim: Proof: At least one node of every edge, is in Needs to be a different node for different edges from Algorithm Theory, WS 2012/13 Fabian Kuhn 22

23 Vertex Cover vs Matching Consider a matching and a vertex cover Claim: If is maximal and is minimum, 2 Proof: is maximal: for every edge,, either or (or both) are matched Every edge is covered by at least one matching edge Thus, the set of the nodes of all matching edges gives a vertex cover of size 2. Algorithm Theory, WS 2012/13 Fabian Kuhn 23

24 Maximal Matching Approximation Theorem: For any maximal matching and any maximum matching, it holds that Proof: 2. Theorem: The set of all matched nodes of a maximal matching is a vertex cover of size at most twice the size of a min. vertex cover. Algorithm Theory, WS 2012/13 Fabian Kuhn 24

25 Augmenting Paths Consider a matching of a graph,: A node is called free iff it is not matched Augmenting Path: A (odd length) path that starts and ends at a free node and visits edges in and edges in alternatingly. free nodes alternating path Matching can be improved using an augmenting path by switching the role of each edge along the path Algorithm Theory, WS 2012/13 Fabian Kuhn 25

26 Augmenting Paths Theorem: A matching of,is maximum if and only if there is no augmenting path. Proof: Consider non max. matching and max. matching and define, Note that and Each node is incident to at most one edge in both and induces even cycles and paths Algorithm Theory, WS 2012/13 Fabian Kuhn 26

27 Finding Augmenting Paths free nodes augmenting path odd cycle Algorithm Theory, WS 2012/13 Fabian Kuhn 27

28 Blossoms If we find an odd cycle free node Graph Matching stem root contract blossom contracted blossom Graph blossom Matching, is a matching of. Algorithm Theory, WS 2012/13 Fabian Kuhn 28

29 Contracting Blossoms Lemma: Graph has an augmenting path w.r.t. matching iff has an augmenting path w.r.t. matching Note: If stem has length 0, root of blossom if free and thus also the node is free in. Also: The matching can be computed efficiently from. Algorithm Theory, WS 2012/13 Fabian Kuhn 29

30 Edmond s Blossom Algorithm Algorithm Sketch: 1. Build a tree for each free node 2. Starting from an explored node at even distance from a free node in the tree of, explore some unexplored edge, : 1. If is an unexplored node, is matched to some neighbor : add to the tree ( is now explored) 2. If is explored and in the same tree: at odd distance from root ignore and move on at even distance from root blossom found 3. If is explored and in another tree at odd distance from root ignore and move on at even distance from root augmenting path found Algorithm Theory, WS 2012/13 Fabian Kuhn 30

31 Running Time Finding a Blossom: Repeat on smaller graph Finding an Augmenting Path: Improve matching Theorem: The algorithm can be implemented in time. Algorithm Theory, WS 2012/13 Fabian Kuhn 31

32 Matching Algorithms We have seen: time alg. to compute a max. matching in bipartite graphs time alg. to compute a max. matching in general graphs Better algorithms: Best known running time (bipartite and general gr.): Weighted matching: Edges have weight, find a matching of maximum total weight Bipartite graphs: flow reduction works in the same way General graphs: can also be solved in polynomial time (Edmond s algorithms is used as blackbox) Algorithm Theory, WS 2012/13 Fabian Kuhn 32

33 Happy Holidays! Algorithm Theory, WS 2012/13 Fabian Kuhn 33

Chapter 5 Graph Algorithms Algorithm Theory WS 2012/13 Fabian Kuhn

Chapter 5 Graph Algorithms Algorithm Theory WS 2012/13 Fabian Kuhn Chapter 5 Graph Algorithms Algorithm Theory WS 2012/13 Fabian Kuhn Graphs Extremely important concept in computer science Graph, : node (or vertex) set : edge set Simple graph: no self loops, no multiple

More information

Graph Algorithms Maximum Flow Applications

Graph Algorithms Maximum Flow Applications Chapter 5 Graph Algorithms Maximum Flow Applications Algorithm Theory WS 202/3 Fabian Kuhn Maximum Flow Applications Maximum flow has many applications Reducing a problem to a max flow problem can even

More information

Approximation Algorithms

Approximation Algorithms Chapter 8 Approximation Algorithms Algorithm Theory WS 2016/17 Fabian Kuhn Approximation Algorithms Optimization appears everywhere in computer science We have seen many examples, e.g.: scheduling jobs

More information

Matching Algorithms. Proof. If a bipartite graph has a perfect matching, then it is easy to see that the right hand side is a necessary condition.

Matching Algorithms. Proof. If a bipartite graph has a perfect matching, then it is easy to see that the right hand side is a necessary condition. 18.433 Combinatorial Optimization Matching Algorithms September 9,14,16 Lecturer: Santosh Vempala Given a graph G = (V, E), a matching M is a set of edges with the property that no two of the edges have

More information

Graph Theory: Matchings and Factors

Graph Theory: Matchings and Factors Graph Theory: Matchings and Factors Pallab Dasgupta, Professor, Dept. of Computer Sc. and Engineering, IIT Kharagpur pallab@cse.iitkgp.ernet.in Matchings A matching of size k in a graph G is a set of k

More information

Lecture 11: Maximum flow and minimum cut

Lecture 11: Maximum flow and minimum cut Optimisation Part IB - Easter 2018 Lecture 11: Maximum flow and minimum cut Lecturer: Quentin Berthet 4.4. The maximum flow problem. We consider in this lecture a particular kind of flow problem, with

More information

1 Matching in Non-Bipartite Graphs

1 Matching in Non-Bipartite Graphs CS 369P: Polyhedral techniques in combinatorial optimization Instructor: Jan Vondrák Lecture date: September 30, 2010 Scribe: David Tobin 1 Matching in Non-Bipartite Graphs There are several differences

More information

Ma/CS 6b Class 4: Matchings in General Graphs

Ma/CS 6b Class 4: Matchings in General Graphs Ma/CS 6b Class 4: Matchings in General Graphs By Adam Sheffer Reminder: Hall's Marriage Theorem Theorem. Let G = V 1 V 2, E be a bipartite graph. There exists a matching of size V 1 in G if and only if

More information

Matching and Covering

Matching and Covering Matching and Covering Matchings A matching of size k in a graph G is a set of k pairwise disjoint edges The vertices belonging to the edges of a matching are saturated by the matching; the others are unsaturated

More information

Paths, Trees, and Flowers by Jack Edmonds

Paths, Trees, and Flowers by Jack Edmonds Paths, Trees, and Flowers by Jack Edmonds Xiang Gao ETH Zurich Distributed Computing Group www.disco.ethz.ch Introduction and background Edmonds maximum matching algorithm Matching-duality theorem Matching

More information

Paths, Flowers and Vertex Cover

Paths, Flowers and Vertex Cover Paths, Flowers and Vertex Cover Venkatesh Raman, M.S. Ramanujan, and Saket Saurabh Presenting: Hen Sender 1 Introduction 2 Abstract. It is well known that in a bipartite (and more generally in a Konig)

More information

Maximum flows & Maximum Matchings

Maximum flows & Maximum Matchings Chapter 9 Maximum flows & Maximum Matchings This chapter analyzes flows and matchings. We will define flows and maximum flows and present an algorithm that solves the maximum flow problem. Then matchings

More information

Jessica Su (some parts copied from CLRS / last quarter s notes)

Jessica Su (some parts copied from CLRS / last quarter s notes) 1 Max flow Consider a directed graph G with positive edge weights c that define the capacity of each edge. We can identify two special nodes in G: the source node s and the sink node t. We want to find

More information

Graphs and Network Flows IE411. Lecture 13. Dr. Ted Ralphs

Graphs and Network Flows IE411. Lecture 13. Dr. Ted Ralphs Graphs and Network Flows IE411 Lecture 13 Dr. Ted Ralphs IE411 Lecture 13 1 References for Today s Lecture IE411 Lecture 13 2 References for Today s Lecture Required reading Sections 21.1 21.2 References

More information

Bipartite Matching & the Hungarian Method

Bipartite Matching & the Hungarian Method Bipartite Matching & the Hungarian Method Last Revised: 15/9/7 These notes follow formulation originally developed by Subhash Suri in http://www.cs.ucsb.edu/ suri/cs/matching.pdf We previously saw how

More information

Lecture 3: Graphs and flows

Lecture 3: Graphs and flows Chapter 3 Lecture 3: Graphs and flows Graphs: a useful combinatorial structure. Definitions: graph, directed and undirected graph, edge as ordered pair, path, cycle, connected graph, strongly connected

More information

MTL 776: Graph Algorithms Lecture : Matching in Graphs

MTL 776: Graph Algorithms Lecture : Matching in Graphs MTL 776: Graph Algorithms Lecture : Matching in Graphs Course Coordinator: Prof. B. S. Panda Note: The note is based on the lectures taken in the class. It is a draft version and may contain errors. It

More information

Sources for this lecture. 3. Matching in bipartite and general graphs. Symmetric difference

Sources for this lecture. 3. Matching in bipartite and general graphs. Symmetric difference S-72.2420 / T-79.5203 Matching in bipartite and general graphs 1 3. Matching in bipartite and general graphs Let G be a graph. A matching M in G is a set of nonloop edges with no shared endpoints. Let

More information

Ma/CS 6b Class 2: Matchings

Ma/CS 6b Class 2: Matchings Ma/CS 6b Class 2: Matchings By Adam Sheffer Send anonymous suggestions and complaints from here. Email: adamcandobetter@gmail.com Password: anonymous2 There aren t enough crocodiles in the presentations

More information

Matching Theory. Figure 1: Is this graph bipartite?

Matching Theory. Figure 1: Is this graph bipartite? Matching Theory 1 Introduction A matching M of a graph is a subset of E such that no two edges in M share a vertex; edges which have this property are called independent edges. A matching M is said to

More information

Notes for Lecture 20

Notes for Lecture 20 U.C. Berkeley CS170: Intro to CS Theory Handout N20 Professor Luca Trevisan November 13, 2001 Notes for Lecture 20 1 Duality As it turns out, the max-flow min-cut theorem is a special case of a more general

More information

Lecture 8: Non-bipartite Matching. Non-partite matching

Lecture 8: Non-bipartite Matching. Non-partite matching Lecture 8: Non-bipartite Matching Non-partite matching Is it easy? Max Cardinality Matching =? Introduction The theory and algorithmic techniques of the bipartite matching have been generalized by Edmonds

More information

GRAPH DECOMPOSITION BASED ON DEGREE CONSTRAINTS. March 3, 2016

GRAPH DECOMPOSITION BASED ON DEGREE CONSTRAINTS. March 3, 2016 GRAPH DECOMPOSITION BASED ON DEGREE CONSTRAINTS ZOÉ HAMEL March 3, 2016 1. Introduction Let G = (V (G), E(G)) be a graph G (loops and multiple edges not allowed) on the set of vertices V (G) and the set

More information

PERFECT MATCHING THE CENTRALIZED DEPLOYMENT MOBILE SENSORS THE PROBLEM SECOND PART: WIRELESS NETWORKS 2.B. SENSOR NETWORKS OF MOBILE SENSORS

PERFECT MATCHING THE CENTRALIZED DEPLOYMENT MOBILE SENSORS THE PROBLEM SECOND PART: WIRELESS NETWORKS 2.B. SENSOR NETWORKS OF MOBILE SENSORS SECOND PART: WIRELESS NETWORKS 2.B. SENSOR NETWORKS THE CENTRALIZED DEPLOYMENT OF MOBILE SENSORS I.E. THE MINIMUM WEIGHT PERFECT MATCHING 1 2 ON BIPARTITE GRAPHS Prof. Tiziana Calamoneri Network Algorithms

More information

Graph Theory S 1 I 2 I 1 S 2 I 1 I 2

Graph Theory S 1 I 2 I 1 S 2 I 1 I 2 Graph Theory S I I S S I I S Graphs Definition A graph G is a pair consisting of a vertex set V (G), and an edge set E(G) ( ) V (G). x and y are the endpoints of edge e = {x, y}. They are called adjacent

More information

Matchings. Examples. K n,m, K n, Petersen graph, Q k ; graphs without perfect matching. A maximal matching cannot be enlarged by adding another edge.

Matchings. Examples. K n,m, K n, Petersen graph, Q k ; graphs without perfect matching. A maximal matching cannot be enlarged by adding another edge. Matchings A matching is a set of (non-loop) edges with no shared endpoints. The vertices incident to an edge of a matching M are saturated by M, the others are unsaturated. A perfect matching of G is a

More information

Algorithm and Complexity of Disjointed Connected Dominating Set Problem on Trees

Algorithm and Complexity of Disjointed Connected Dominating Set Problem on Trees Algorithm and Complexity of Disjointed Connected Dominating Set Problem on Trees Wei Wang joint with Zishen Yang, Xianliang Liu School of Mathematics and Statistics, Xi an Jiaotong University Dec 20, 2016

More information

Lecture 10,11: General Matching Polytope, Maximum Flow. 1 Perfect Matching and Matching Polytope on General Graphs

Lecture 10,11: General Matching Polytope, Maximum Flow. 1 Perfect Matching and Matching Polytope on General Graphs CMPUT 675: Topics in Algorithms and Combinatorial Optimization (Fall 2009) Lecture 10,11: General Matching Polytope, Maximum Flow Lecturer: Mohammad R Salavatipour Date: Oct 6 and 8, 2009 Scriber: Mohammad

More information

Approximation Algorithms

Approximation Algorithms Approximation Algorithms Given an NP-hard problem, what should be done? Theory says you're unlikely to find a poly-time algorithm. Must sacrifice one of three desired features. Solve problem to optimality.

More information

GRAPH THEORY and APPLICATIONS. Matchings

GRAPH THEORY and APPLICATIONS. Matchings GRAPH THEORY and APPLICATIONS Matchings Definition Matching of a graph G: Any subset of edges M E such that no two elements of M are adjacent. Example: {e} {e,e5,e0} {e2,e7,e0} {e4,e6,e8} e4 e7 e8 e e2

More information

LECTURES 3 and 4: Flows and Matchings

LECTURES 3 and 4: Flows and Matchings LECTURES 3 and 4: Flows and Matchings 1 Max Flow MAX FLOW (SP). Instance: Directed graph N = (V,A), two nodes s,t V, and capacities on the arcs c : A R +. A flow is a set of numbers on the arcs such that

More information

2. Lecture notes on non-bipartite matching

2. Lecture notes on non-bipartite matching Massachusetts Institute of Technology 18.433: Combinatorial Optimization Michel X. Goemans February 15th, 013. Lecture notes on non-bipartite matching Given a graph G = (V, E), we are interested in finding

More information

AMS /672: Graph Theory Homework Problems - Week V. Problems to be handed in on Wednesday, March 2: 6, 8, 9, 11, 12.

AMS /672: Graph Theory Homework Problems - Week V. Problems to be handed in on Wednesday, March 2: 6, 8, 9, 11, 12. AMS 550.47/67: Graph Theory Homework Problems - Week V Problems to be handed in on Wednesday, March : 6, 8, 9,,.. Assignment Problem. Suppose we have a set {J, J,..., J r } of r jobs to be filled by a

More information

Paths, Flowers and Vertex Cover

Paths, Flowers and Vertex Cover Paths, Flowers and Vertex Cover Venkatesh Raman M. S. Ramanujan Saket Saurabh Abstract It is well known that in a bipartite (and more generally in a König) graph, the size of the minimum vertex cover is

More information

Maximum Matching Algorithm

Maximum Matching Algorithm Maximum Matching Algorithm Thm: M is maximum no M-augmenting path How to find efficiently? 1 Edmonds Blossom Algorithm In bipartite graphs, we can search quickly for augmenting paths because we explore

More information

Module 7. Independent sets, coverings. and matchings. Contents

Module 7. Independent sets, coverings. and matchings. Contents Module 7 Independent sets, coverings Contents and matchings 7.1 Introduction.......................... 152 7.2 Independent sets and coverings: basic equations..... 152 7.3 Matchings in bipartite graphs................

More information

Tutorial for Algorithm s Theory Problem Set 5. January 17, 2013

Tutorial for Algorithm s Theory Problem Set 5. January 17, 2013 Tutorial for Algorithm s Theory Problem Set 5 January 17, 2013 Exercise 1: Maximum Flow Algorithms Consider the following flow network: a) Solve the maximum flow problem on the above network by using the

More information

Assignment 1 Introduction to Graph Theory CO342

Assignment 1 Introduction to Graph Theory CO342 Assignment 1 Introduction to Graph Theory CO342 This assignment will be marked out of a total of thirty points, and is due on Thursday 18th May at 10am in class. Throughout the assignment, the graphs are

More information

and 6.855J March 6, Maximum Flows 2

and 6.855J March 6, Maximum Flows 2 5.08 and.855j March, 00 Maximum Flows Network Reliability Communication Network What is the maximum number of arc disjoint paths from s to t? How can we determine this number? Theorem. Let G = (N,A) be

More information

Design And Analysis of Algorithms Lecture 6: Combinatorial Matching Algorithms.

Design And Analysis of Algorithms Lecture 6: Combinatorial Matching Algorithms. Design And Analysis of Algorithms Lecture 6: Combinatorial Matching Algorithms. February 14, 2018 In this lecture, we will study algorithms for constructing matchings on graphs. A matching M E has maximum

More information

CS 580: Algorithm Design and Analysis. Jeremiah Blocki Purdue University Spring 2018

CS 580: Algorithm Design and Analysis. Jeremiah Blocki Purdue University Spring 2018 CS 580: Algorithm Design and Analysis Jeremiah Blocki Purdue University Spring 2018 Chapter 11 Approximation Algorithms Slides by Kevin Wayne. Copyright @ 2005 Pearson-Addison Wesley. All rights reserved.

More information

Network flows and Menger s theorem

Network flows and Menger s theorem Network flows and Menger s theorem Recall... Theorem (max flow, min cut strong duality). Let G be a network. The maximum value of a flow equals the minimum capacity of a cut. We prove this strong duality

More information

implementing the breadth-first search algorithm implementing the depth-first search algorithm

implementing the breadth-first search algorithm implementing the depth-first search algorithm Graph Traversals 1 Graph Traversals representing graphs adjacency matrices and adjacency lists 2 Implementing the Breadth-First and Depth-First Search Algorithms implementing the breadth-first search algorithm

More information

1 Undirected Vertex Geography UVG

1 Undirected Vertex Geography UVG Geography Start with a chip sitting on a vertex v of a graph or digraph G. A move consists of moving the chip to a neighbouring vertex. In edge geography, moving the chip from x to y deletes the edge (x,

More information

Lecture notes on: Maximum matching in bipartite and non-bipartite graphs (Draft)

Lecture notes on: Maximum matching in bipartite and non-bipartite graphs (Draft) Lecture notes on: Maximum matching in bipartite and non-bipartite graphs (Draft) Lecturer: Uri Zwick June 5, 2013 1 The maximum matching problem Let G = (V, E) be an undirected graph. A set M E is a matching

More information

CSE 417 Network Flows (pt 4) Min Cost Flows

CSE 417 Network Flows (pt 4) Min Cost Flows CSE 417 Network Flows (pt 4) Min Cost Flows Reminders > HW6 is due Monday Review of last three lectures > Defined the maximum flow problem find the feasible flow of maximum value flow is feasible if it

More information

ACO Comprehensive Exam October 12 and 13, Computability, Complexity and Algorithms

ACO Comprehensive Exam October 12 and 13, Computability, Complexity and Algorithms 1. Computability, Complexity and Algorithms Given a simple directed graph G = (V, E), a cycle cover is a set of vertex-disjoint directed cycles that cover all vertices of the graph. 1. Show that there

More information

CSE 417 Network Flows (pt 3) Modeling with Min Cuts

CSE 417 Network Flows (pt 3) Modeling with Min Cuts CSE 417 Network Flows (pt 3) Modeling with Min Cuts Reminders > HW6 is due on Friday start early bug fixed on line 33 of OptimalLineup.java: > change true to false Review of last two lectures > Defined

More information

COMP260 Spring 2014 Notes: February 4th

COMP260 Spring 2014 Notes: February 4th COMP260 Spring 2014 Notes: February 4th Andrew Winslow In these notes, all graphs are undirected. We consider matching, covering, and packing in bipartite graphs, general graphs, and hypergraphs. We also

More information

Number Theory and Graph Theory

Number Theory and Graph Theory 1 Number Theory and Graph Theory Chapter 6 Basic concepts and definitions of graph theory By A. Satyanarayana Reddy Department of Mathematics Shiv Nadar University Uttar Pradesh, India E-mail: satya8118@gmail.com

More information

Matching. Algorithms and Networks

Matching. Algorithms and Networks Matching Algorithms and Networks This lecture Matching: problem statement and applications Bipartite matching (recap) Matching in arbitrary undirected graphs: Edmonds algorithm Diversion: generalized tic-tac-toe

More information

In this lecture, we ll look at applications of duality to three problems:

In this lecture, we ll look at applications of duality to three problems: Lecture 7 Duality Applications (Part II) In this lecture, we ll look at applications of duality to three problems: 1. Finding maximum spanning trees (MST). We know that Kruskal s algorithm finds this,

More information

Theorem 2.9: nearest addition algorithm

Theorem 2.9: nearest addition algorithm There are severe limits on our ability to compute near-optimal tours It is NP-complete to decide whether a given undirected =(,)has a Hamiltonian cycle An approximation algorithm for the TSP can be used

More information

CPSC 536N: Randomized Algorithms Term 2. Lecture 10

CPSC 536N: Randomized Algorithms Term 2. Lecture 10 CPSC 536N: Randomized Algorithms 011-1 Term Prof. Nick Harvey Lecture 10 University of British Columbia In the first lecture we discussed the Max Cut problem, which is NP-complete, and we presented a very

More information

Lecture 5: July 7,2013. Minimum Cost perfect matching in general graphs

Lecture 5: July 7,2013. Minimum Cost perfect matching in general graphs CSL 865: Algorithmic Graph Theory Semester-I 2013-14 Lecture 5: July 7,2013 Lecturer: Naveen Garg Scribes: Ankit Anand Note: LaTeX template courtesy of UC Berkeley EECS dept. Disclaimer: These notes have

More information

Matchings. Saad Mneimneh

Matchings. Saad Mneimneh Matchings Saad Mneimneh 1 Stable matching Consider n men and n women. A matching is a one to one correspondence between the men and the women. In finding a matching, however, we would like to respect the

More information

Assignment and Matching

Assignment and Matching Assignment and Matching By Geetika Rana IE 680 Dept of Industrial Engineering 1 Contents Introduction Bipartite Cardinality Matching Problem Bipartite Weighted Matching Problem Stable Marriage Problem

More information

Solution for Homework set 3

Solution for Homework set 3 TTIC 300 and CMSC 37000 Algorithms Winter 07 Solution for Homework set 3 Question (0 points) We are given a directed graph G = (V, E), with two special vertices s and t, and non-negative integral capacities

More information

Treewidth and graph minors

Treewidth and graph minors Treewidth and graph minors Lectures 9 and 10, December 29, 2011, January 5, 2012 We shall touch upon the theory of Graph Minors by Robertson and Seymour. This theory gives a very general condition under

More information

Matching Theory. Amitava Bhattacharya

Matching Theory. Amitava Bhattacharya Matching Theory Amitava Bhattacharya amitava@math.tifr.res.in Definition: A simple graph is a triple G = (V, E, φ), where V is a finite set of vertices, E is a finite set of edges, and φ is a function

More information

Solving problems on graph algorithms

Solving problems on graph algorithms Solving problems on graph algorithms Workshop Organized by: ACM Unit, Indian Statistical Institute, Kolkata. Tutorial-3 Date: 06.07.2017 Let G = (V, E) be an undirected graph. For a vertex v V, G {v} is

More information

Copyright 2007 Pearson Addison-Wesley. All rights reserved. A. Levitin Introduction to the Design & Analysis of Algorithms, 2 nd ed., Ch.

Copyright 2007 Pearson Addison-Wesley. All rights reserved. A. Levitin Introduction to the Design & Analysis of Algorithms, 2 nd ed., Ch. Iterative Improvement Algorithm design technique for solving optimization problems Start with a feasible solution Repeat the following step until no improvement can be found: change the current feasible

More information

Advanced Combinatorial Optimization September 17, Lecture 3. Sketch some results regarding ear-decompositions and factor-critical graphs.

Advanced Combinatorial Optimization September 17, Lecture 3. Sketch some results regarding ear-decompositions and factor-critical graphs. 18.438 Advanced Combinatorial Optimization September 17, 2009 Lecturer: Michel X. Goemans Lecture 3 Scribe: Aleksander Madry ( Based on notes by Robert Kleinberg and Dan Stratila.) In this lecture, we

More information

Induction Review. Graphs. EECS 310: Discrete Math Lecture 5 Graph Theory, Matching. Common Graphs. a set of edges or collection of two-elt subsets

Induction Review. Graphs. EECS 310: Discrete Math Lecture 5 Graph Theory, Matching. Common Graphs. a set of edges or collection of two-elt subsets EECS 310: Discrete Math Lecture 5 Graph Theory, Matching Reading: MIT OpenCourseWare 6.042 Chapter 5.1-5.2 Induction Review Basic Induction: Want to prove P (n). Prove base case P (1). Prove P (n) P (n+1)

More information

Math 776 Graph Theory Lecture Note 1 Basic concepts

Math 776 Graph Theory Lecture Note 1 Basic concepts Math 776 Graph Theory Lecture Note 1 Basic concepts Lectured by Lincoln Lu Transcribed by Lincoln Lu Graph theory was founded by the great Swiss mathematician Leonhard Euler (1707-178) after he solved

More information

Definition For vertices u, v V (G), the distance from u to v, denoted d(u, v), in G is the length of a shortest u, v-path. 1

Definition For vertices u, v V (G), the distance from u to v, denoted d(u, v), in G is the length of a shortest u, v-path. 1 Graph fundamentals Bipartite graph characterization Lemma. If a graph contains an odd closed walk, then it contains an odd cycle. Proof strategy: Consider a shortest closed odd walk W. If W is not a cycle,

More information

Matching 4/21/2016. Bipartite Matching. 3330: Algorithms. First Try. Maximum Matching. Key Questions. Existence of Perfect Matching

Matching 4/21/2016. Bipartite Matching. 3330: Algorithms. First Try. Maximum Matching. Key Questions. Existence of Perfect Matching Bipartite Matching Matching 3330: Algorithms A graph is bipartite if its vertex set can be partitioned into two subsets A and B so that each edge has one endpoint in A and the other endpoint in B. A B

More information

Outline. 1 The matching problem. 2 The Chinese Postman Problem

Outline. 1 The matching problem. 2 The Chinese Postman Problem Outline The matching problem Maximum-cardinality matchings in bipartite graphs Maximum-cardinality matchings in bipartite graphs: The augmenting path algorithm 2 Let G = (V, E) be an undirected graph.

More information

The Encoding Complexity of Network Coding

The Encoding Complexity of Network Coding The Encoding Complexity of Network Coding Michael Langberg Alexander Sprintson Jehoshua Bruck California Institute of Technology Email: mikel,spalex,bruck @caltech.edu Abstract In the multicast network

More information

PERFECT MATCHING THE CENTRALIZED DEPLOYMENT MOBILE SENSORS THE PROBLEM SECOND PART: WIRELESS NETWORKS 2.B. SENSOR NETWORKS OF MOBILE SENSORS

PERFECT MATCHING THE CENTRALIZED DEPLOYMENT MOBILE SENSORS THE PROBLEM SECOND PART: WIRELESS NETWORKS 2.B. SENSOR NETWORKS OF MOBILE SENSORS SECOND PART: WIRELESS NETWORKS.B. SENSOR NETWORKS THE CENTRALIZED DEPLOYMENT OF MOBILE SENSORS I.E. THE MINIMUM WEIGHT PERFECT MATCHING ON BIPARTITE GRAPHS Prof. Tiziana Calamoneri Network Algorithms A.y.

More information

Graph Theory and Optimization Approximation Algorithms

Graph Theory and Optimization Approximation Algorithms Graph Theory and Optimization Approximation Algorithms Nicolas Nisse Université Côte d Azur, Inria, CNRS, I3S, France October 2018 Thank you to F. Giroire for some of the slides N. Nisse Graph Theory and

More information

Math 778S Spectral Graph Theory Handout #2: Basic graph theory

Math 778S Spectral Graph Theory Handout #2: Basic graph theory Math 778S Spectral Graph Theory Handout #: Basic graph theory Graph theory was founded by the great Swiss mathematician Leonhard Euler (1707-178) after he solved the Königsberg Bridge problem: Is it possible

More information

11. APPROXIMATION ALGORITHMS

11. APPROXIMATION ALGORITHMS 11. APPROXIMATION ALGORITHMS load balancing center selection pricing method: vertex cover LP rounding: vertex cover generalized load balancing knapsack problem Lecture slides by Kevin Wayne Copyright 2005

More information

by conservation of flow, hence the cancelation. Similarly, we have

by conservation of flow, hence the cancelation. Similarly, we have Chapter 13: Network Flows and Applications Network: directed graph with source S and target T. Non-negative edge weights represent capacities. Assume no edges into S or out of T. (If necessary, we can

More information

Datenstrukturen & Algorithmen Solution of Sheet 11 FS 14

Datenstrukturen & Algorithmen Solution of Sheet 11 FS 14 Eidgenössische Technische Hochschule Zürich Ecole polytechnique fédérale de Zurich Politecnico federale di Zurigo Federal Institute of Technology at Zurich Institut für Theoretische Informatik 14th May

More information

Perfect Matchings in Claw-free Cubic Graphs

Perfect Matchings in Claw-free Cubic Graphs Perfect Matchings in Claw-free Cubic Graphs Sang-il Oum Department of Mathematical Sciences KAIST, Daejeon, 305-701, Republic of Korea sangil@kaist.edu Submitted: Nov 9, 2009; Accepted: Mar 7, 2011; Published:

More information

Adjacent: Two distinct vertices u, v are adjacent if there is an edge with ends u, v. In this case we let uv denote such an edge.

Adjacent: Two distinct vertices u, v are adjacent if there is an edge with ends u, v. In this case we let uv denote such an edge. 1 Graph Basics What is a graph? Graph: a graph G consists of a set of vertices, denoted V (G), a set of edges, denoted E(G), and a relation called incidence so that each edge is incident with either one

More information

Lecture 14: Linear Programming II

Lecture 14: Linear Programming II A Theorist s Toolkit (CMU 18-859T, Fall 013) Lecture 14: Linear Programming II October 3, 013 Lecturer: Ryan O Donnell Scribe: Stylianos Despotakis 1 Introduction At a big conference in Wisconsin in 1948

More information

MATH 350 GRAPH THEORY & COMBINATORICS. Contents

MATH 350 GRAPH THEORY & COMBINATORICS. Contents MATH 350 GRAPH THEORY & COMBINATORICS PROF. SERGEY NORIN, FALL 2013 Contents 1. Basic definitions 1 2. Connectivity 2 3. Trees 3 4. Spanning Trees 3 5. Shortest paths 4 6. Eulerian & Hamiltonian cycles

More information

Figure 2.1: A bipartite graph.

Figure 2.1: A bipartite graph. Matching problems The dance-class problem. A group of boys and girls, with just as many boys as girls, want to dance together; hence, they have to be matched in couples. Each boy prefers to dance with

More information

Small Survey on Perfect Graphs

Small Survey on Perfect Graphs Small Survey on Perfect Graphs Michele Alberti ENS Lyon December 8, 2010 Abstract This is a small survey on the exciting world of Perfect Graphs. We will see when a graph is perfect and which are families

More information

Exercise set 2 Solutions

Exercise set 2 Solutions Exercise set 2 Solutions Let H and H be the two components of T e and let F E(T ) consist of the edges of T with one endpoint in V (H), the other in V (H ) Since T is connected, F Furthermore, since T

More information

Graphs. Edges may be directed (from u to v) or undirected. Undirected edge eqvt to pair of directed edges

Graphs. Edges may be directed (from u to v) or undirected. Undirected edge eqvt to pair of directed edges (p 186) Graphs G = (V,E) Graphs set V of vertices, each with a unique name Note: book calls vertices as nodes set E of edges between vertices, each encoded as tuple of 2 vertices as in (u,v) Edges may

More information

CS612 Algorithms for Electronic Design Automation

CS612 Algorithms for Electronic Design Automation CS612 Algorithms for Electronic Design Automation Lecture 8 Network Flow Based Modeling 1 Flow Network Definition Given a directed graph G = (V, E): Each edge (u, v) has capacity c(u,v) 0 Each edge (u,

More information

Lecture 4: Primal Dual Matching Algorithm and Non-Bipartite Matching. 1 Primal/Dual Algorithm for weighted matchings in Bipartite Graphs

Lecture 4: Primal Dual Matching Algorithm and Non-Bipartite Matching. 1 Primal/Dual Algorithm for weighted matchings in Bipartite Graphs CMPUT 675: Topics in Algorithms and Combinatorial Optimization (Fall 009) Lecture 4: Primal Dual Matching Algorithm and Non-Bipartite Matching Lecturer: Mohammad R. Salavatipour Date: Sept 15 and 17, 009

More information

On Covering a Graph Optimally with Induced Subgraphs

On Covering a Graph Optimally with Induced Subgraphs On Covering a Graph Optimally with Induced Subgraphs Shripad Thite April 1, 006 Abstract We consider the problem of covering a graph with a given number of induced subgraphs so that the maximum number

More information

1 Matchings in Graphs

1 Matchings in Graphs Matchings in Graphs J J 2 J 3 J 4 J 5 J J J 6 8 7 C C 2 C 3 C 4 C 5 C C 7 C 8 6 J J 2 J 3 J 4 J 5 J J J 6 8 7 C C 2 C 3 C 4 C 5 C C 7 C 8 6 Definition Two edges are called independent if they are not adjacent

More information

Network Flow and Matching

Network Flow and Matching Chapter 4 Network Flow and Matching In this chapter, we examine the network flow problem, a graph problem to which many problems can be reduced. In fact, some problems that don t even appear to be graph

More information

11. APPROXIMATION ALGORITHMS

11. APPROXIMATION ALGORITHMS Coping with NP-completeness 11. APPROXIMATION ALGORITHMS load balancing center selection pricing method: weighted vertex cover LP rounding: weighted vertex cover generalized load balancing knapsack problem

More information

Network Flow. November 23, CMPE 250 Graphs- Network Flow November 23, / 31

Network Flow. November 23, CMPE 250 Graphs- Network Flow November 23, / 31 Network Flow November 23, 2016 CMPE 250 Graphs- Network Flow November 23, 2016 1 / 31 Types of Networks Internet Telephone Cell Highways Rail Electrical Power Water Sewer Gas... CMPE 250 Graphs- Network

More information

PLANAR GRAPH BIPARTIZATION IN LINEAR TIME

PLANAR GRAPH BIPARTIZATION IN LINEAR TIME PLANAR GRAPH BIPARTIZATION IN LINEAR TIME SAMUEL FIORINI, NADIA HARDY, BRUCE REED, AND ADRIAN VETTA Abstract. For each constant k, we present a linear time algorithm that, given a planar graph G, either

More information

Graphs and Network Flows IE411. Lecture 21. Dr. Ted Ralphs

Graphs and Network Flows IE411. Lecture 21. Dr. Ted Ralphs Graphs and Network Flows IE411 Lecture 21 Dr. Ted Ralphs IE411 Lecture 21 1 Combinatorial Optimization and Network Flows In general, most combinatorial optimization and integer programming problems are

More information

Part II. Graph Theory. Year

Part II. Graph Theory. Year Part II Year 2017 2016 2015 2014 2013 2012 2011 2010 2009 2008 2007 2006 2005 2017 53 Paper 3, Section II 15H Define the Ramsey numbers R(s, t) for integers s, t 2. Show that R(s, t) exists for all s,

More information

Paths, Flowers and Vertex Cover

Paths, Flowers and Vertex Cover Paths, Flowers and Vertex Cover Venkatesh Raman, M. S. Ramanujan and Saket Saurabh The Institute of Mathematical Sciences, Chennai, India. {vraman msramanujan saket}@imsc.res.in Abstract. It is well known

More information

CS521 \ Notes for the Final Exam

CS521 \ Notes for the Final Exam CS521 \ Notes for final exam 1 Ariel Stolerman Asymptotic Notations: CS521 \ Notes for the Final Exam Notation Definition Limit Big-O ( ) Small-o ( ) Big- ( ) Small- ( ) Big- ( ) Notes: ( ) ( ) ( ) ( )

More information

Math 485, Graph Theory: Homework #3

Math 485, Graph Theory: Homework #3 Math 485, Graph Theory: Homework #3 Stephen G Simpson Due Monday, October 26, 2009 The assignment consists of Exercises 2129, 2135, 2137, 2218, 238, 2310, 2313, 2314, 2315 in the West textbook, plus the

More information

Approximation slides 1. An optimal polynomial algorithm for the Vertex Cover and matching in Bipartite graphs

Approximation slides 1. An optimal polynomial algorithm for the Vertex Cover and matching in Bipartite graphs Approximation slides 1 An optimal polynomial algorithm for the Vertex Cover and matching in Bipartite graphs Approximation slides 2 Linear independence A collection of row vectors {v T i } are independent

More information

Advanced Combinatorial Optimization September 15, Lecture 2

Advanced Combinatorial Optimization September 15, Lecture 2 18.438 Advanced Combinatorial Optimization September 15, 2009 Lecture 2 Lecturer: Michel X. Goemans Scribes: Robert Kleinberg (2004), Alex Levin (2009) In this lecture, we will present Edmonds s algorithm

More information

Today. Maximum flow. Maximum flow. Problem

Today. Maximum flow. Maximum flow. Problem 5 Maximum Flow (slides 1 4) Today Maximum flow Algorithms and Networks 2008 Maximum flow problem Applications Briefly: Ford-Fulkerson; min cut max flow theorem Preflow push algorithm Lift to front algorithm

More information

B r u n o S i m e o n e. La Sapienza University, ROME, Italy

B r u n o S i m e o n e. La Sapienza University, ROME, Italy B r u n o S i m e o n e La Sapienza University, ROME, Italy Pietre Miliari 3 Ottobre 26 2 THE MAXIMUM MATCHING PROBLEM Example : Postmen hiring in the province of L Aquila Panconesi Barisciano Petreschi

More information