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

Similar documents
Section 8.2 Graph Terminology. Undirected Graphs. Definition: Two vertices u, v in V are adjacent or neighbors if there is an edge e between u and v.

The vertex set is a finite nonempty set. The edge set may be empty, but otherwise its elements are two-element subsets of the vertex set.

Math.3336: Discrete Mathematics. Chapter 10 Graph Theory

CHAPTER 2. Graphs. 1. Introduction to Graphs and Graph Isomorphism

γ(ɛ) (a, b) (a, d) (d, a) (a, b) (c, d) (d, d) (e, e) (e, a) (e, e) (a) Draw a picture of G.

Math 776 Graph Theory Lecture Note 1 Basic concepts

Theorem 3.1 (Berge) A matching M in G is maximum if and only if there is no M- augmenting path.

MC 302 GRAPH THEORY 10/1/13 Solutions to HW #2 50 points + 6 XC points

Math 170- Graph Theory Notes

DEFINITION OF GRAPH GRAPH THEORY GRAPHS ACCORDING TO THEIR VERTICES AND EDGES EXAMPLE GRAPHS ACCORDING TO THEIR VERTICES AND EDGES

CPCS Discrete Structures 1

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

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.

Assignment 4 Solutions of graph problems

11.4 Bipartite Multigraphs

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

Graphs and Isomorphisms

5 Graphs

Introduction to Graph Theory

Definition 1.1. A matching M in a graph G is called maximal if there is no matching M in G so that M M.

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

REU 2006 Discrete Math Lecture 5

Elements of Graph Theory

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.

MATH 682 Notes Combinatorics and Graph Theory II

CS473-Algorithms I. Lecture 13-A. Graphs. Cevdet Aykanat - Bilkent University Computer Engineering Department

Algorithms: Graphs. Amotz Bar-Noy. Spring 2012 CUNY. Amotz Bar-Noy (CUNY) Graphs Spring / 95

CPS 102: Discrete Mathematics. Quiz 3 Date: Wednesday November 30, Instructor: Bruce Maggs NAME: Prob # Score. Total 60

Matching and Planarity

MATH20902: Discrete Maths, Solutions to Problem Set 1. These solutions, as well as the corresponding problems, are available at

Discrete mathematics II. - Graphs

Lecture 6: Graph Properties

Discrete Mathematics

Chapter 3. Graphs CLRS Slides by Kevin Wayne. Copyright 2005 Pearson-Addison Wesley. All rights reserved.

Graphs. Pseudograph: multiple edges and loops allowed

Assignment 1 Introduction to Graph Theory CO342

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

Lecture 22 Tuesday, April 10

Solutions to In-Class Problems Week 4, Fri

Characterizing Graphs (3) Characterizing Graphs (1) Characterizing Graphs (2) Characterizing Graphs (4)

Graph Theory. 1 Introduction to Graphs. Martin Stynes Department of Mathematics, UCC January 26, 2011

5 Matchings in Bipartite Graphs and Their Applications

Graphs. Introduction To Graphs: Exercises. Definitions:

Proposition 1. The edges of an even graph can be split (partitioned) into cycles, no two of which have an edge in common.

Lecture 4: 3SAT and Latin Squares. 1 Partial Latin Squares Completable in Polynomial Time

An Introduction to Graph Theory

Algorithms. Graphs. Algorithms

Abstract. A graph G is perfect if for every induced subgraph H of G, the chromatic number of H is equal to the size of the largest clique of H.

Graph Theory II. Po-Shen Loh. June edges each. Solution: Spread the n vertices around a circle. Take parallel classes.

CSE 417: Algorithms and Computational Complexity. 3.1 Basic Definitions and Applications. Goals. Chapter 3. Winter 2012 Graphs and Graph Algorithms

Graphs and trees come up everywhere. We can view the internet as a graph (in many ways) Web search views web pages as a graph

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

Varying Applications (examples)

Lecture 5: Graphs. Rajat Mittal. IIT Kanpur

Basics of Graph Theory

K 4 C 5. Figure 4.5: Some well known family of graphs

On vertex types of graphs

Introduction III. Graphs. Motivations I. Introduction IV

Matchings and Covers in bipartite graphs

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

1 Matchings in Graphs

Scheduling, Map Coloring, and Graph Coloring

Lecture 2 : Counting X-trees

5 Graph Theory. 5.1 Definitions Simple Graphs. mcs-ftl 2010/9/8 0:40 page 121 #127

Lecture 19 Thursday, March 29. Examples of isomorphic, and non-isomorphic graphs will be given in class.

Graph Theory: Matchings and Factors

Math 443/543 Graph Theory Notes 5: Planar graphs and coloring

Module 11. Directed Graphs. Contents

GRAPHS, GRAPH MODELS, GRAPH TERMINOLOGY, AND SPECIAL TYPES OF GRAPHS

ECS 20 Lecture 17b = Discussion D8 Fall Nov 2013 Phil Rogaway

v V Question: How many edges are there in a graph with 10 vertices each of degree 6?

NOTE ON MINIMALLY k-connected GRAPHS

Ma/CS 6b Class 5: Graph Connectivity

Majority and Friendship Paradoxes

Bipartite Roots of Graphs

Today. Types of graphs. Complete Graphs. Trees. Hypercubes.

Matching and Covering

Matching Theory. Figure 1: Is this graph bipartite?

GRAPH THEORY: AN INTRODUCTION

1. (15 points) Solve the decanting problem for containers of sizes 199 and 179; that is find integers x and y satisfying.

(5.2) 151 Math Exercises. Graph Terminology and Special Types of Graphs. Malek Zein AL-Abidin

Discrete Mathematics and Probability Theory Summer 2016 Dinh, Psomas, and Ye HW 2

DS UNIT 4. Matoshri College of Engineering and Research Center Nasik Department of Computer Engineering Discrete Structutre UNIT - IV

Graph Theory. Part of Texas Counties.

3.1 Basic Definitions and Applications. Chapter 3. Graphs. Undirected Graphs. Some Graph Applications

Introduction to Graphs

CMSC 380. Graph Terminology and Representation

The Matrix-Tree Theorem and Its Applications to Complete and Complete Bipartite Graphs

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

Graphs (MTAT , 6 EAP) Lectures: Mon 14-16, hall 404 Exercises: Wed 14-16, hall 402

Graph Definitions. In a directed graph the edges have directions (ordered pairs). A weighted graph includes a weight function.

CPSC 536N: Randomized Algorithms Term 2. Lecture 10

Characterizations of graph classes by forbidden configurations

Counting the number of spanning tree. Pied Piper Department of Computer Science and Engineering Shanghai Jiao Tong University

Graph Connectivity G G G

IMO Training 2008: Graph Theory

11.1. Definitions. 11. Domination in Graphs

Chapter 3. Graphs. Slides by Kevin Wayne. Copyright 2005 Pearson-Addison Wesley. All rights reserved.

Extremal Graph Theory: Turán s Theorem

Bar k-visibility Graphs

Transcription:

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) (by direct proof). Inductive hypothesis: assume P (n). Inductive step: using hypothesis, derive P (n + 1). Strong Induction: Want to prove P (n). Prove base case P (1). Inductive hypothesis: assume P (m) for all m n. Inductive step: using hypothesis, derive P (n + 1). Graphs Def: A simple graph consists of a set of vertices or nodes V a set of edges or collection of two-elt subsets of vertices E. Denote graph by G(V, E). Draw a directed and undirected graph. Note: By definition, undirected, no selfloops, no multi-edges Terminology: adjacent nodes share an edge edge incident to nodes it joins degree of node is number of incident edges G 1 subgraph of G 2 if V 1 V 2 and E 1 E 2 Find examples of each of these definitions in above graph. Common Graphs Empty graph: no edges Complete graph: an edge between every pair of vertices (how many?) Line: n-node graph with n 1 edges: V = {v 1,..., v n }, E = {{v 1, v 2 }, {v 2, v 3 },..., {v n 1, v n }} Cycle: n-node graph with n edges: add edge {v n, v 1 } to above 1

Isomorphism {u, v} E if u and v have sex. squares with different node labels, pentagon vs star. Def: G 1 (V 1, E 1 ) is isomorphic to G 2 (V 2, E 2 ) if there s a function f mapping each v V 1 to a unique v V 2 (bijection) s.t. Matching Problems ABC News, 2004: men have 20, women have 6 NYTimes, 2007: have 4 Graph G(V, E), men have 7, women V are people, split into M (men) and W (women), suppose no one is both or neither man or woman, draw potential graph Claim: Surveys are inaccurate. Two ways to count edges: sum degrees of men: v M deg(v) u, v V 1, {u, v} E 1 {f(u), f(v)} E 2. sum degrees of women: v W deg(w) Same up to relabeling. Isomorphism for examples? Simple Divide by M W : checks? (number vertices same, degree sequence same) No easy-to-check necessary and suff condition. W M 1 deg(v)/ M = 1 deg(v)/ W v M v W avedeg(v M) = W M avedeg(v W ) Nodes people Edges u likes v Matching So men have W = 3.5% more sex. M marriages (no polygamy) [[Promiscuity irrelevant. ]] Match packets to paths, traffic to web Question: Minority students study more servers, etc. with non-minority students (Boston Globe). Sex in America Surprising or not? Key observation for above, relationship between degrees and edges. More general: Question: Who has more (heterosexual) Claim: Handshaking Lemma: The sum of sex? the degrees of vertices in a graph is twice the number of edges. UofC survey, 1994: men have 74% more Each edge contributes twice to the partners sum of degrees, once for each end. 2 Bipartite Graphs Def: A graph is bipartite if there re subsets L and R of vertices s.t. L R = and L R = V every edge incident to one u L and one v R.

Boys and girls and relationships in a heterosexual world. Question: Given n boys B n girls G Pairs E where (b, g) E if boy b and girl g like each other. Find a way to marry everyone off such that each couple likes each other. When can we do this? Boys Girls Not if some boy likes no girls Not if some two boys only like the same girls... not if some k boys collectively like strictly less than k girls. Last condition both necessary and sufficient! Def: A bipartite graph G has vertex set V = V 1 V 2 and edge set E such that (u, v) E, u V 1, v V 2 (all edges are between V 1 and V 2 ). Def: M E is a matching iff each v V 1 V 2 has at most one edge. Def: M E is a perfect matching iff each v V 1 V 2 has exactly one edge. Boys Girls Notation: For a set of vertices S, let N(S) be the neighbors of vertices in S. N(S) = {v : u S (u, v) E}. Claim: Hall s Theorem: For G = (V 1, V 2, E) with V 1 = V 2, there is a perfect matching in G iff S V 1, S N(S). : For any set S, N(S) includes all matched vertices, so S N(S). : By induction on n = V 1 = V 2. Base case n = 1 holds. Assume true for graphs of size at most n. Two cases: 1. S V 1, N(S) S + 1: Pick u V 1, v N({u}). Hall s condition holds for G {u, v}, so use I.H. 3

to find matching. Match u to v to get matching for G. u v u v 2. S V 1, S = N(S) : Split graph G = (S, N(S), E) and G = (V 1 S, V 2 N(S), E). set S graph G graph G Hall s condition holds for G so use I.H. to find matching M. Consider T V 1 S: N (T ) = N(T S) N(S) T S S = T so Hall s condition holds for G so use I.H. to find matching M. Return matching M M for G. Claim: Every k-regular bipartite graph on vertices (V 1, V 2 ) has a perfect matching. Each vertex has degree k, so k V 1 = E = k V 2. As k > 0 this means V 1 = V 2. Let S V 1, E 1 be edges adjacent to S and E 2 edges adjacent to N(S). Then by definition of N(S), E 1 E 2, so k S = E 1 E 2 = k N(S). Hence S N(S) so graph has a perfect matching by Hall s theorem. [[Can skip below. ]] Applications: Def: A Latin rectangle is a r s array of digits from 1... n such that any given digit appears at most once in every row and column. Question: Given an r n Latin rectangle, can it be extended to an n n Latin square? Rectangle: 1 3 2 4 2 1 4 3 Extension: 1 3 2 4 2 1 4 3 3 4 1 2 4 2 3 1 Claim: Every r n Latin rectangle can be extended to a n n Latin square. Show can extend r n to (r+1) n. Make a bipartite graph: one node set C is columns of Latin rectangle other node set D is digits from 1 to n edge (c, d) for c C, d D iff column c does not contain digit d [[Draw for example rectangle. ]] 4

degree of nodes in C is nr (r digits are ruled out and there are a total of n digits) degree of nodes in D is n r (each digit appears once in every row, so r times in total) thus graph is regular bipartite and so has perfect matching add row corresponding to matching Select matching in drawn example and show it extends Latin rectangle. 5