Introduction to Graph Theory

Slides:



Advertisements
Similar presentations
6.896: Topics in Algorithmic Game Theory Lecture 21 Yang Cai.
Advertisements

Great Theoretical Ideas in Computer Science
Min-Max Relations, Hall’s Theorem, and Matching-Algorithms Graphs & Algorithms Lecture 5 TexPoint fonts used in EMF. Read the TexPoint manual before you.
Bipartite Matching, Extremal Problems, Matrix Tree Theorem.
Great Theoretical Ideas in Computer Science for Some.
Bioinformatics III1 We will present an algorithm that originated by Ford and Fulkerson (1962). Idea: increase the flow in a network iteratively until it.
Introduction to Graph Theory Lecture 11: Eulerian and Hamiltonian Graphs.
GOLOMB RULERS AND GRACEFUL GRAPHS
Midterm <  70 3.
Finding a Maximum Matching in Non-Bipartite Graphs Alicia Thilani Singham Goodwin /22/2013.
Great Theoretical Ideas in Computer Science.
Yangjun Chen 1 Bipartite Graphs What is a bipartite graph? Properties of bipartite graphs Matching and maximum matching - alternative paths - augmenting.
1 Discrete Structures & Algorithms Graphs and Trees: II EECE 320.
04/12/2005Tucker, Sec Applied Combinatorics, 4 th Ed. Alan Tucker Section 4.4 Algorithmic Matching Prepared by Joshua Schoenly and Kathleen McNamara.
Mycielski’s Construction Mycielski’s Construction: From a simple graph G, Mycielski’s Construction produces a simple graph G’ containing G. Beginning with.
Matchings Matching: A matching in a graph G is a set of non-loop edges with no shared endpoints.
Definition Hamiltonian graph: A graph with a spanning cycle (also called a Hamiltonian cycle). Hamiltonian graph Hamiltonian cycle.
Maximum Bipartite Matching
Matchings Matching: A matching in a graph G is a set of non-loop edges with no shared endpoints Maximal Matching: A maximal matching in a graph is a matching.
Yangjun Chen 1 Bipartite Graph 1.A graph G is bipartite if the node set V can be partitioned into two sets V 1 and V 2 in such a way that no nodes from.
1 Bipartite Matching Lecture 3: Jan Bipartite Matching A graph is bipartite if its vertex set can be partitioned into two subsets A and B so that.
3/24/03Tucker, Section 4.31 Tucker, Applied Combinatorics, Sec. 4.3, prepared by Jo E-M Bipartite GraphMatching Some Definitions X-Matching Maximal Matching.
Khabbazian1 Copyright © Dale Carnegie & Associates, Inc. Mohammad Khabbazian Department of computer engineering,sharif University,Tehran,iran.
Lecture 11. Matching A set of edges which do not share a vertex is a matching. Application: Wireless Networks may consist of nodes with single radios,
K-Coloring k-coloring: A k-coloring of a graph G is a labeling f: V(G)  S, where |S|=k. The labels are colors; the vertices of one color form a color.
Maximum Bipartite Matching In a graph G, if no M-augmenting path exists, then M is a maximum matching in G. Idea: Iteratively seek augmenting paths to.
Minimum Spanning Trees. Subgraph A graph G is a subgraph of graph H if –The vertices of G are a subset of the vertices of H, and –The edges of G are a.
1/22/03Tucker, Applied Combinatorics, Section EDGE COUNTING TUCKER, APPLIED COMBINATORICS, SECTION 1.3, GROUP B Michael Duquette & Amanda Dargie.
Introduction to Graph Theory
CSE, IIT KGP Matchings and Factors. CSE, IIT KGP Matchings A matching of size k in a graph G is a set of k pairwise disjoint edges.A matching of size.
Hungarian Algorithm Vida Movahedi Elderlab, York University June 2007.
The Turán number of sparse spanning graphs Raphael Yuster joint work with Noga Alon Banff 2012.
4.1 Connectivity and Paths: Cuts and Connectivity
Section 2.1 “Matching in bipartite graphs” in Graph Theory Handout for reading seminar.
5.8 Graph Matching  Example: Set of worker assign to a set of task  Four tasks are to be assigned to four workers.  – Worker 1 is qualified to do tasks.
Mycielski’s Construction Mycielski’s Construction: From a simple graph G, Mycielski’s Construction produces a simple graph G’ containing G. Beginning with.
Graph Colouring L09: Oct 10. This Lecture Graph coloring is another important problem in graph theory. It also has many applications, including the famous.
10. Lecture WS 2006/07Bioinformatics III1 V10: Network Flows V10 follows closely chapter 12.1 in on „Flows and Cuts in Networks and Chapter 12.2 on “Solving.
Connectivity and Paths 報告人:林清池. Connectivity A separating set of a graph G is a set such that G-S has more than one component. The connectivity of G,
Bipartite Matching. Unweighted Bipartite Matching.
5.8 Graph Matching  Example: Set of worker assign to a set of task  Four tasks are to be assigned to four workers.  – Worker 1 is qualified to do tasks.
Matching Algorithms and Networks. Algorithms and Networks: Matching2 This lecture Matching: problem statement and applications Bipartite matching Matching.
Assignments and matchings Chapter 12 Presented by Yorai Geffen.
Introduction to Graph Theory Lecture 13: Graph Coloring: Edge Coloring.
Introduction to Graph Theory
Great Theoretical Ideas in Computer Science for Some.
Chromatic Coloring with a Maximum Color Class Bor-Liang Chen Kuo-Ching Huang Chih-Hung Yen* 30 July, 2009.
COMPSCI 102 Introduction to Discrete Mathematics.
Iterative Improvement for Domain-Specific Problems Lecturer: Jing Liu Homepage:
Approximation Algorithms by bounding the OPT Instructor Neelima Gupta
Matching and Factors Matchings and Covers. Definitions: A matching M in a graph G is a set of non loop edges with no shared endpoints. G M.
Indian Institute of Technology Kharagpur PALLAB DASGUPTA Graph Theory: Matchings and Factors Pallab Dasgupta, Professor, Dept. of Computer Sc. and Engineering,
Proof of correctness of Dijkstra’s algorithm: Basically, we need to prove two claims. (1)Let S be the set of vertices for which the shortest path from.
1 Graphs Chapters 10.1 and 10.2 University of Maryland Chapters 10.1 and 10.2 Based on slides by Y. Peng University of Maryland.
V15: Max-Flow Min-Cut V15 continues chapter 12 in Gross & Yellen „Graph Theory“ Theorem [Characterization of Maximum Flow] Let f be a flow in a.
Chapter 10 Iterative Improvement
Proof technique (pigeonhole principle)
Bipartite Matching Lecture 8: Oct 7.
Bipartite Graphs What is a bipartite graph?
Algorithms and Networks
Algorithm Design and Analysis
Great Theoretical Ideas in Computer Science
Chapter 5. Optimal Matchings
Discrete Mathematics for Computer Science
Problem Solving 4.
Bipartite Graph 1. A graph G is bipartite if the node set V can be partitioned into two sets V1 and V2 in such a way that no nodes from the same set are.
Piyush Kumar (Lecture 6: MaxFlow MinCut Applications)
5.7.2 A Maximum flow algorithm
Richard Anderson Lecture 5 Graph Theory
Locality In Distributed Graph Algorithms
Presentation transcript:

Introduction to Graph Theory Lecture 07: Bipartite Graphs, Matching and Job Assignments

Bipartite Graphs A graph is bipartite if V(G) is partitioned into nonempty subsets V1 and V2, such that if xy is in E(G), x and y belong to different subsets. r1 w1 r2 w2 r3 w3 r4 r5

Bipartite Graphs It is common that each subset is give a color. Can you think of graphs that we have come across are bipartite? Paths, Pn Trees Cn when n is even. The cardinality of the color sets is an invariant of a bipartite graph.

Algorithm We want to label V1(G) a and V2(G) b. Label any vertex a and its neighbors b If there are unlabeled vertices adjacent to labeled vertex v, label them the opposite label that v was assigned. Repeat until no such vertices If there is an unlabeled vertex, go back to step 1 with such a vertex If all adjacent vertices get distinct labels G is bipartite.

Shortcut Can we do without the algorithm? If G contains a cycle with odd number of vertices. Theorem: A graph G is bipartite if and only if G does not contain an odd cycle. Proof?

Matchings A matching M is a set of edges, no two of which are incident with one another. What applications can you think of? Seat assignment to ensure harmony Job assignment to maximize efficiency Anything else? r1 w1 r2 w2 r3 r4 w3 r5

Matchings in Bipartite Graph Let G be a bipartite graph with parts X and Y. Complete matching from X to Y: Every vertex in X is incident with an edge of M. (the direction is important, and |X|<|Y|) Perfect matching: M is complete from X to Y and Y to X. (|X|=|Y|) Can you think of an application in which the complete matching is important?

Finding Maximum Matching Maximum matching: M is a maximum matching for G if M has largest cardinality among all possible matchings. Maximal matching: A matching M that cannot be enlarged by adding additional edges, i.e. no larger M’ containing M. The goal here is to find a maximum matching

Illustration d d c c e e b b f f a a g g h h (a) Maximal (b) Maximum

More Definitions M-alternating path: A path in G whose edges are alternately in M and not in M. A vertex is M-matched if incident to one of the edges of M. Else M-unmatched. M-augmenting path is an alternating path joining two M-unmatched vertices. Need not use all the edges of M Always begin and end with an edge not in M

Finding the Maximum Matching Berge’s Matching Theorem: A matching M in a graph G is maximum if and only if there is no M-augmenting path in G. Proof: “if and only if ” demands the proofs for both directions.

Proof (Left -> Right) Prove by contradiction Suppose that matching M is maximum, and there is an M-augmenting path P. P necessarily has one more edge not in M than in M. Let be edges of P in M, and not in M We construct a new match . Contradiction!

Proof (Right -> Left) Suppose no M-augmenting path, and M is indeed maximum. Assuming M* is maximum => no M*-aug path Let’s construct a graph H containing all V(G), and Analysis of H reveals that So, M is maximum

Algorithm For maximum matching in a bipartite graph, we’ll study the algorithm when we discuss networking.

Complete vs. Perfect Matching What properties of a bipartite graph allow as to conclude if a graph is complete or perfect? Having even number of vertices? G is equitable? (parts X and Y have the same number of vertices)

Complete Matching in Bipartite Graph Some notations: n(v) is the set of all vertices adjacent to v. Hall’s Matching Theorem: a bipartite graph G with parts X and Y as a complete matching from X to Y if and only if for every subset

Proof: Forward direction To prove: If a bipartite graph G with parts X and Y as a complete matching from X to Y then for every subset Proof: A complete matching implies each vertex in X is matched to a distinct vertex in Y. Therefore, this condition follows.

Proof: Backward direction To prove: If a bipartite graph G with for every subset then G has a complete matching from X to Y Proof: By contradiction. Suppose no complete matching from X to Y. Let M be the maximum match and is M-unmatched Using the given condition, we know that v has at least one neighbor in Y.

Proof: Backward direction (cont) Proof: By contradiction Case1: if one such neighbor v* is not in Y* (the set of M-matched vertices in Y), then Case2: if every neighbor v* of v is in Y*, we can start and M-alternating path at v that will become M-aug path, since for every This implies that M is not maximum (by Berges’s matching theorem)

Perfect Matching in Bipartite Graph Hall’s Marriage Theorem: a bipartite graph G with parts X and Y, where |X|=|Y|, has a perfect matching if and only if for every subset Proof?

Perfect Matching Anther necessary condition for a bipartite graph to be a perfect matching is that it is regular. We start with a lemma Lemma: An r-regular bipartite graph must be equitable. Assume that |X|=k, then |E(G)|=r*k The r*k edges each is incident with a vertex in Y, since G is bipartite And each vertex in Y is incident with r of the r*k edges => r|Y|=r*k Therefore |Y|=k=|X|

Perfect Matching Theorem: If a bipartite graph is regular, the it has a perfect matching Proof: We know that G is |X|=|Y|. So, only need to show that G has a complete matching from X to Y We want to show that , for every subset in order to apply Hall’s matching theorem. The technique is similar to the proof for the lemma

(cont) Proof: Given any set S of m vertices in X, there is a total of r*m edges, since G is r-reg Each of the r*m edges are also incident to a vertex in Y, since G is bipartite Since each vertex in Y is only incident to r edges, N(S) must contain at least m vertices in Y. Therefore Combining this with Hall’s theorem and the lemma, we complete the proof.

Some Remarks M-augmenting path techniques applies to all graphs, not just bipartite graphs. There are other techniques for finding maximum matchings, e.g. the network flow technique. Matchings can be found in weighted graphs too.

Quiz Let T be a spanning tree of G. Show that a perfect matching for T is also a perfect matching for G. Find an example to show that the converse is not true.