CSL851: Algorithmic Graph Theory Semester I Lecture 1: July 24

Similar documents
Analysis of Algorithms, I

Network Flow I. Lecture Overview The Network Flow Problem

Connectivity and cuts

8.1 Min Degree Spanning Tree

8. Matchings and Factors

The Goldberg Rao Algorithm for the Maximum Flow Problem

Lecture 2: August 29. Linear Programming (part I)

Lecture 16 : Relations and Functions DRAFT

SHARP BOUNDS FOR THE SUM OF THE SQUARES OF THE DEGREES OF A GRAPH

Outline. NP-completeness. When is a problem easy? When is a problem hard? Today. Euler Circuits

Midterm Practice Problems

Lecture 17 : Equivalence and Order Relations DRAFT

CS 598CSC: Combinatorial Optimization Lecture date: 2/4/2010

Handout #Ch7 San Skulrattanakulchai Gustavus Adolphus College Dec 6, Chapter 7: Digraphs

Exponential time algorithms for graph coloring

5.1 Bipartite Matching

Institut für Informatik Lehrstuhl Theoretische Informatik I / Komplexitätstheorie. An Iterative Compression Algorithm for Vertex Cover

Lecture 11: Sponsored search

Minimum cost maximum flow, Minimum cost circulation, Cost/Capacity scaling

Discrete Mathematics & Mathematical Reasoning Chapter 10: Graphs

Lecture 1: Course overview, circuits, and formulas

GRAPH THEORY LECTURE 4: TREES

Outline 2.1 Graph Isomorphism 2.2 Automorphisms and Symmetry 2.3 Subgraphs, part 1

Zachary Monaco Georgia College Olympic Coloring: Go For The Gold

Generating models of a matched formula with a polynomial delay

Max Flow, Min Cut, and Matchings (Solution)

Graphs without proper subgraphs of minimum degree 3 and short cycles

A NOTE ON OFF-DIAGONAL SMALL ON-LINE RAMSEY NUMBERS FOR PATHS

Lecture 15 An Arithmetic Circuit Lowerbound and Flows in Graphs

Large induced subgraphs with all degrees odd

Tools for parsimonious edge-colouring of graphs with maximum degree three. J.L. Fouquet and J.M. Vanherpe. Rapport n o RR

Tenacity and rupture degree of permutation graphs of complete bipartite graphs

Semi-Matchings for Bipartite Graphs and Load Balancing

BOUNDARY EDGE DOMINATION IN GRAPHS

Answer: (a) Since we cannot repeat men on the committee, and the order we select them in does not matter, ( )

Every tree contains a large induced subgraph with all degrees odd

On the k-path cover problem for cacti

6.3 Conditional Probability and Independence

Graph Theory Problems and Solutions

A 2-factor in which each cycle has long length in claw-free graphs

Approximation Algorithms

SEMITOTAL AND TOTAL BLOCK-CUTVERTEX GRAPH

each college c i C has a capacity q i - the maximum number of students it will admit

Generalized Induced Factor Problems

SPANNING CACTI FOR STRUCTURALLY CONTROLLABLE NETWORKS NGO THI TU ANH NATIONAL UNIVERSITY OF SINGAPORE

136 CHAPTER 4. INDUCTION, GRAPHS AND TREES

Definition Given a graph G on n vertices, we define the following quantities:

3. Eulerian and Hamiltonian Graphs

CSC 373: Algorithm Design and Analysis Lecture 16

Class One: Degree Sequences

Scheduling Shop Scheduling. Tim Nieberg

1 The Line vs Point Test

Lecture 4: BK inequality 27th August and 6th September, 2007

THE PROBLEM WORMS (1) WORMS (2) THE PROBLEM OF WORM PROPAGATION/PREVENTION THE MINIMUM VERTEX COVER PROBLEM

REPEATED TRIALS. The probability of winning those k chosen times and losing the other times is then p k q n k.

Social Media Mining. Graph Essentials

Full and Complete Binary Trees

High degree graphs contain large-star factors

Markov random fields and Gibbs measures

COMBINATORIAL PROPERTIES OF THE HIGMAN-SIMS GRAPH. 1. Introduction

Odd induced subgraphs in graphs of maximum degree three

CSC2420 Fall 2012: Algorithm Design, Analysis and Theory

Combinatorial 5/6-approximation of Max Cut in graphs of maximum degree 3

INCIDENCE-BETWEENNESS GEOMETRY

SHORT CYCLE COVERS OF GRAPHS WITH MINIMUM DEGREE THREE

The chromatic spectrum of mixed hypergraphs

Introduction to Graph Theory

Mathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson

Graphical degree sequences and realizations

Algorithm Design and Analysis

Cycle transversals in bounded degree graphs

3. Linear Programming and Polyhedral Combinatorics

Math/Stats 425 Introduction to Probability. 1. Uncertainty and the axioms of probability

(67902) Topics in Theory and Complexity Nov 2, Lecture 7

Tree-representation of set families and applications to combinatorial decompositions

Lecture 22: November 10

Conditional Probability, Independence and Bayes Theorem Class 3, 18.05, Spring 2014 Jeremy Orloff and Jonathan Bloom

Determination of the normalization level of database schemas through equivalence classes of attributes

Minimum degree condition forcing complete graph immersion

CIS 700: algorithms for Big Data

Discrete Applied Mathematics. The firefighter problem with more than one firefighter on trees

Best Monotone Degree Bounds for Various Graph Parameters

Semi-Matchings for Bipartite Graphs and Load Balancing

Guessing Game: NP-Complete?

Total colorings of planar graphs with small maximum degree

An inequality for the group chromatic number of a graph

An Empirical Study of Two MIS Algorithms

A permutation can also be represented by describing its cycles. What do you suppose is meant by this?

P. Jeyanthi and N. Angel Benseera

Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products

Solutions to In-Class Problems Week 4, Mon.

Disjoint Compatible Geometric Matchings

How To Solve The Stable Roommates Problem

arxiv: v1 [math.co] 7 Mar 2012

Distributed Computing over Communication Networks: Maximal Independent Set

14.30 Introduction to Statistical Methods in Economics Spring 2009

Computer Algorithms. NP-Complete Problems. CISC 4080 Yanjun Li

On Integer Additive Set-Indexers of Graphs

Reading 13 : Finite State Automata and Regular Expressions

Course on Social Network Analysis Graphs and Networks

Transcription:

CSL851: Algorithmic Graph Theory Semester I 2013-2014 Lecture 1: July 24 Lecturer: Naveen Garg Scribes: Suyash Roongta Note: LaTeX template courtesy of UC Berkeley EECS dept. Disclaimer: These notes have not been subjected to the usual scrutiny reserved for formal publications. They may be distributed outside this class only with the permission of the Instructor. Matching in Bipartite Graphs Definition 1.1 Given a graph G = (V,E), M E is said to be a matching if M is an independent set of edges, i.e., no two edges of M are incident on the same vertex. A single edge set is a trivial matching. We are interested in an algorithm to find the largest matching in a given bipartite graph. The algorithm that we are going to discuss is an iterative algorithm. 1.0.1 Augmenting path Let M be the current matching. Suppose M is not maximum. Let M be the maximum matching. Consider the symmetric difference of M and M, i.e., the set of all edges present in exactly one of M and M. Let v be any vertex. By the definition of matching, in the symmetric difference, there is at most one edge from M incident on v, and at most one edge from M. This gives us deg(v) 2 This means that we must have a disjoint union of paths and cycles. Let us denote the edges of the matching M by the colour blue and those of the matching M by the colour red. Observe that two edges of the same colour cannot be incident on a vertex. Hence, the cycles and paths must have alternating red and blue edges. Figure 1.1: Symmetric Difference of M and M 1-1

1-2 Lecture 1: July 24 Lemma 1.2 If M is not a maximum matching, there must exist an alternating path of odd length starting with a red edge. Proof: All the cycles are even in size, because of the alternating edges. Now, suppose all the paths also had even length. Then the number of edges of M in the symmetric difference is equal to that of M. This implies M = M since the edges of M and M not in the symmetric difference are common to both. Therefore, if M is not maximum, there must be an alternating path with more red edges than blue ones. This will be an odd length alternating path starting with a red edge. Figure 1.2: Odd length alternating path We call such a path an augmenting path. Note that the vertices on either end of the augmenting path are unmatched in our current matching M. This concept of augmenting paths gives the following general idea of an iterative algorithm to compute the maximum matching in a bipartite graph. If our current matching M is not maximum, there must exist a path of odd length that starts with an unmatched vertex, takes alternately an edge not in the matching and an edge in the matching and ends up at another unmatched vertex. If we flip the edges along this path, i.e., the edges along this path which were in the matching go out of the matching, and those which weren t are now included in the matching. Figure 1.3: Augmenting procedure Note: Flipping will not cause a vertex to have more than two incident edges in the matching, since, the end vertices on the path were unmatched, and the other vertices were already matched, and thus had no edge incident on them apart from the ones in the alternating path. Following this procedure, we have increased the size of our matching by 1. This is called augmenting the matching. We can do this iteratively till we get a maximum matching. The number of times we will have repeat this procedure is at most n where n is the number of vertices in one partition of the bipartite graph. In the next section, we formally describe the algorithm and argue about its correctness.

Lecture 1: July 24 1-3 1.0.2 Alternating tree algorithm Given a bipartite graph G = (U, V, E), we start with an empty matching and iteratively augment the matching using the following procedure (Let us denote the vertices on the U side by the colour red and the vertices on the V side by the colour blue.) 1. Start with an unmatched red vertex v. 2. Consider all the unmatched edges out of it. If one of these leads to an unmatched vertex w, add the edge (v, w) to the matching. Otherwise go to step 3. 3. From the set of blue vertices obtained in the previous step, consider all the matched edges. 4. From the set of red vertices obtained in the previous step, consider all the unmatched edges. If one of these leads to an unmatched vertex, we have found an augmenting path; flip along this path to increase the size of the matching by 1. Otherwise, go back to step 3. Figure 1.4: Building alternating tree If we find an augmenting path, we improve our matching by flipping along the augmenting path, and we can start afresh with another unmatched red vertex and repeat the procedure and keep doing that till we get a maximum matching. Figure 1.5: No augmenting path found

1-4 Lecture 1: July 24 Suppose, we are not able to find an augmenting path, i.e., at step 4, all the unmatched edges are back edges. Does this imply that our matching is maximum? Let us consider the case when vertex v is the only unmatched red vertex. Let us denote the set of red vertices in the tree by A and the set of blue vertices by B. Then A = B + 1 since apart from vertex v, each red vertex is matched to exactly one blue vertex (See FIg 1.5). Now, there cannot be an edge from a vertex in A to a vertex in V \B. If there was such an edge, by the procedure described above, it would have been included in the tree. Figure 1.6: All edges starting from A end up in B This means that all the vertices in A have to be matched to the vertices in B and since the size of B is one less, one vertex of A will remain unmatched in any matching. And hence if v is the only unmatched vertex in U, the current matching is maximum. Now, suppose v wasn t the only unmatched vertex in U. Then, we throw away all vertices in the alternating tree rooted at v and start building an alternating tree from another unmatched vertex in U. We do this until we exhaust all unmatched vertices. Whenever we find an augmenting path, we improve our matching and start building alternating trees afresh. Figure 1.7: Discarding is justified

Lecture 1: July 24 1-5 Suppose we end up with 3 unmatched vertices, for which no augmenting path is found. As before, let us denote the set of vertices of U side in the trees by A and the set of vertices of V side by B. Then, as argued above, A = B + 3 At least 3 vertices will remain unmatched in any matching, and since we also have 3 unmatched vertices, our matching is maximum. 1.0.3 Size of maximum matching Definition 1.3 The neighbourhood of a set S, denoted by N(S) is defined as N(S) = {v : u S; (u, v) E} Figure 1.8: Neighbourhood of a set Theorem 1.4 A bipartite graph G = (U, V, E) ( U = V = n) has a perfect matching, i.e., a matching of size n, iff S V, N(S) S This theorem is called Hall s Theorem. And a set S s.t. N(S) < S is called a Hall set. Proof: 1. If G has a perfect matching, then there is no Hall set, i.e., S V, N(S) S Suppose there exists a Hall set, i.e., S s.t. N(S) < S, then by an argument similar to one given above, all vertices of S cannot be matched, and hence there is no perfect matching. 2. If there is no Hall set, i.e., S V, N(S) S, then G has a perfect matching Suppose G does not have a perfect matching. That means, that if we run our alternating tree algorithm on G, we ll land up with an unmatched vertex v for which we cannot find an augmenting path. Using the alternating tree rooted at v, we can construct a Hall set (set of all U vertices in the tree). Definition 1.5 The deficiency of a set S, denoted by def(s) is defined as def(s) = S N(S)

1-6 Lecture 1: July 24 Theorem 1.6 Let the size of the maximum matching of a bipartite graph G = (U, V, E) ( U = V = n) be denoted by s(g). Then s(g) = n max (Note: The notation s(g) is used for convenience, is not standard.) Proof: 1. s(g) n max Let the maximum deficiency value be k and let S be a set with deficiency k. Then, at least k vertices of S will remain unmatched in any matching. Hence, s(g) n k. 2. s(g) n max Suppose s(g) = n k, then in our matching, there must be k unmatched vertices in U for which the alternating tree rooted at these vertices do not contain an augmenting path. We can construct a set A as above, whose deficiency would be k. The maximum deficiency value is then greater than or equal to k, by definition. k max k max n k n max s(g) n max In fact there cannot be a set with deficiency greater than k, because then the size of the maximum matching would have to be less than n-k, by the first point. 1.0.4 Time complexity analysis The matching is augmented at most n times. The time taken to perform one augmentation (building the alternating tree, finding the augmenting path by building backwards and flipping along it) is O(m) since each edge is considered at most once. So, the total time complexity of the algorithm is O(mn).