Tutorial 6 of CSCI2110 Bipartite Matching Tutor: Zhou Hong ( 周宏 )

Slides:



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

Covers, Dominations, Independent Sets and Matchings AmirHossein Bayegan Amirkabir University of Technology.
Tutorial 5 of CSCI2110 Eulerian Path & Hamiltonian Cycle Tutor: Zhou Hong ( 周宏 )
Poly-Logarithmic Approximation for EDP with Congestion 2
How to Schedule a Cascade in an Arbitrary Graph F. Chierchetti, J. Kleinberg, A. Panconesi February 2012 Presented by Emrah Cem 7301 – Advances in Social.
Naveen Garg, CSE, IIT Delhi
Bipartite Matching, Extremal Problems, Matrix Tree Theorem.
2/14/13CMPS 3120 Computational Geometry1 CMPS 3120: Computational Geometry Spring 2013 Planar Subdivisions and Point Location Carola Wenk Based on: Computational.
1 Discrete Structures & Algorithms Graphs and Trees: III EECE 320.
Label Placement and graph drawing Imo Lieberwerth.
Playing Fair at Sudoku Joshua Cooper USC Department of Mathematics.
Tic Tac Toe Game playing strategies
Algorithms and Networks
TIC-TAC-TOE FELIX CHEN CLUSTER 5: Computers in Biophysics and Robotics.
Graphs Graphs are the most general data structures we will study in this course. A graph is a more general version of connected nodes than the tree. Both.
A Mapping Algorithm for Defect- Tolerance of Reconfigurable Nano- Architectures By: Ibis Benito M.B. Tahoori, “A Mapping Algorithm for Defect-Tolerance.
GOLOMB RULERS AND GRACEFUL GRAPHS
Proof. Previously... Art Communicates Subjective, Qualitative Science Establishes Facts Objective, Quantitative, Reproducible Experiments Proofs Game.
1 Weighted Bipartite Matching Lecture 4: Jan Weighted Bipartite Matching Given a weighted bipartite graph, find a matching with maximum total weight.
Great Theoretical Ideas in Computer Science.
1 Discrete Structures & Algorithms Graphs and Trees: II EECE 320.
November 10, 2009Introduction to Cognitive Science Lecture 17: Game-Playing Algorithms 1 Decision Trees Many classes of problems can be formalized as search.
Great Theoretical Ideas in Computer Science.
A general approximation technique for constrained forest problems Michael X. Goemans & David P. Williamson Presented by: Yonatan Elhanani & Yuval Cohen.
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.
Job Scheduling Lecture 19: March 19. Job Scheduling: Unrelated Multiple Machines There are n jobs, each job has: a processing time p(i,j) (the time to.
Tirgul 13. Unweighted Graphs Wishful Thinking – you decide to go to work on your sun-tan in ‘ Hatzuk ’ beach in Tel-Aviv. Therefore, you take your swimming.
Rectangular Drawing Imo Lieberwerth. Content Introduction Rectangular Drawing and Matching Thomassen’s Theorem Rectangular drawing algorithm Advanced.
Applied Discrete Mathematics Week 12: Trees
1 Introduction to Approximation Algorithms Lecture 15: Mar 5.
What is the next line of the proof? a). Assume the theorem holds for all graphs with k edges. b). Let G be a graph with k edges. c). Assume the theorem.
Simplify each expression.
9.2 Graph Terminology and Special Types Graphs
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
The Turán number of sparse spanning graphs Raphael Yuster joint work with Noga Alon Banff 2012.
There is a Postman who delivers mail to a certain neighborhood of streets. The postman is unwilling to walk far so he wants to find the shortest route.
Games. Adversaries Consider the process of reasoning when an adversary is trying to defeat our efforts In game playing situations one searches down the.
Graph Colouring L09: Oct 10. This Lecture Graph coloring is another important problem in graph theory. It also has many applications, including the famous.
3.2 Matchings and Factors: Algorithms and Applications This copyrighted material is taken from Introduction to Graph Theory, 2 nd Ed., by Doug West; and.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
Matching Algorithms and Networks. Algorithms and Networks: Matching2 This lecture Matching: problem statement and applications Bipartite matching Matching.
Part 3 Linear Programming
1 Decomposition into bipartite graphs with minimum degree 1. Raphael Yuster.
Graphs A ‘Graph’ is a diagram that shows how things are connected together. It makes no attempt to draw actual paths or routes and scale is generally inconsequential.
Matching Algorithms and Networks. Algorithms and Networks: Matching2 This lecture Matching: problem statement and applications Bipartite matching Matching.
Matching Lecture 19: Nov 23.
October 1, 2013Computer Vision Lecture 9: From Edges to Contours 1 Canny Edge Detector However, usually there will still be noise in the array E[i, j],
Graph Algorithms Maximum Flow - Best algorithms [Adapted from R.Solis-Oba]
Introduction to Graph Theory Lecture 13: Graph Coloring: Edge Coloring.
Introduction to Graph Theory
Center for Graphics and Geometric Computing, Technion 1 Computational Geometry Chapter 9 Line Arrangements.
Iterative Improvement for Domain-Specific Problems Lecturer: Jing Liu Homepage:
Non-LP-Based Approximation Algorithms Fabrizio Grandoni IDSIA
Approximation Algorithms by bounding the OPT Instructor Neelima Gupta
Approximation Algorithms based on linear programming.
K 3 -Saturator By Roy Oursler. What is K 3 -Saturator K 3 -Saturator is a combinatorial game A combinatorial game is a two player game where both of the.
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.
Section 7.6 Functions Math in Our World. Learning Objectives  Identify functions.  Write functions in function notation.  Evaluate functions.  Find.
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.
Hex: a Game of Connecting Faces. Player 1 Player 2 Players take turns placing blue chips (player 1) and red chips (player 2). Player 1 plays first. Player.
Algorithms and Networks
Çizge Algoritmaları.
Bipartite Matching Lecture 8: Oct 7.
Algorithms and Networks
Discrete Mathematics for Computer Science
Chapter 6 : Game Search 게임 탐색 (Adversarial Search)
Enumerating Distances Using Spanners of Bounded Degree
Instructor: Shengyu Zhang
Roy Oursler and Jason Williford
Richard Anderson Lecture 5 Graph Theory
Presentation transcript:

Tutorial 6 of CSCI2110 Bipartite Matching Tutor: Zhou Hong ( 周宏 )

Outline Maximum Bipartite Matching B-Matching Tic-Tac-Toe (Optional) Midterm Review

The bipartite matching problem: Find a matching with the maximum number of edges. A perfect matching is a matching in which every vertex is matched (i.e. of degree 1). Reduce to Perfect Matching: Once you know how to solve perfect matching, you can also do maximum matching. Maximum Matching A B E In the following, we assume |A|=|B| for simplicity.

Perfect Matching Oracle Oracle of Perfect Matching Perfect Matching Oracle input output No Perfect Matching Our Goal: find a maximum matching by querying perfect matching oracle as few as possible

Bipartite Graph Contains Perfect Matching A B If G already has a perfect matching M, then M must be a maximum matching. We done with only one query! However, what shall we do if G does not contain a perfect matching?

Matching of Size n-1 A B To get an ideal of the reduction step, first, we assume G has a maximum matching of size n-1.

First Attempt A B By adding an appropriate edge, G will contain a perfect matching. We can find it by one query. Then, remove new added edge from the perfect matching, we done. Drawback of This Approach? We need to try different pair of vertices, in the worst case, O(n 2 ) queries are required.

A Better Solution A B Add two dummy vertices connecting to all vertices on the opposite. In the new graph, we find a perfect matching by one query. Remove the new added edges, we have a maximum matching of original graph. A matching of size n-1 in original graph guarantees a perfect matching in new graph

A Better Solution A B Add two dummy vertices connecting to all vertices on the opposite. In the new graph, we find a perfect matching by one query. Remove the new added edges, we have a maximum matching of original graph. On the other hand, a perfect matching in new graph will guarantee a matching of size n-1 in original graph

Complete Reduction No perfect matching in the new graph implies no matching of size n-1 in the original graph. What shall we do? Repeat the previous procedure until we find a perfect matching In each iteration –We add two dummy vertices connecting with all vertices on the opposite. –Make a query with the updated graph. How many queries do we need? At most n Using binary search, we can improve to log(n) queries!

Residence Assignment Assignment Requirements: Each student can be assigned to at most one room Each room can accommodate a specific number of students Our Goal: Maximize the number of residents

Basic Idea For a shared room with b beds, treat it as b single rooms In the new setting –Applying for a shared room becomes applying for all b duplicate single rooms –Then, we only need to find a maximum matching

A B B-Matching Matching is a special case of b-matching, with b v =1 for all v.

Reduction to Maximum Matching For each vertex v with degree bound b v, make b v copies of vertex v. Connect the duplicate vertices according to the original graph.

Reduction to Maximum Matching For each vertex v with degree bound b v, make b v copies of vertex v. Connect the duplicate vertices according to the original graph. Find a maximum matching in the new graph. Map the resulting matching back to the original graph.

Tic-Tac-Toe A paper-and-pencil game. – Two players (X and O) – They take turns marking spaces in a 3x3 grid Player who succeeds in placing three respective marks in a horizontal, vertical, or diagonal row wins the game Best play from both parties leads to a draw A game won by the first player X

Winning Set of Tic-Tac-Toe Therefore, there are totally 8 winning sets

Bipartite Graph Now, let’s construct a bipartite graph – On one side, the vertices corresponding to the squares in the grid (totally 9) – On the other side, the vertices corresponding to the winning sets (totally 8) – An edge between a square and a winning set indicate that the square is in the winning set

Generalized Tic-Tac-Toe Generalize to nxn grid – There are n 2 squares – Winning sets are still the whole horizontal, vertical or diagonal rows, totally 2n+2

B-Matching Consider a b-matching in the bipartite graph between squares and winning sets – Degree bound for square is 1 – Degree bound for winning set is 2 We claim that – if there exists a b-matching such that each winning set incidents with exactly 2 edges – then player 2 has a trivial strategy to avoid losing

Example of 5x5 Grid In case of 5x5 grid Tic-Tac-Toe, there exists a b-matching as required – (not shown) Player 2 has a trivial strategy to force a draw – Pair squares in the grid according to the b-matching – If player 1 marks a square in a pair, then marks the other square in the pair, otherwise marks randomly … … … … Note that, player 1 can never mark both squares in a pair.

Existence of The Trivial Strategy V.S. Hall’s Theorem For each winning set, make a copy of it in the bipartite graph Then, the desired b-matching is corresponding to a matching saturating both original and duplicate winning sets Generalized Hall’s Theorem: A bipartite graph G=(V,W;E) has a matching saturating W if and only if |N(S)| >= |S| for every subset S of W. Player 2 does not always have such a trivial strategy to avoid losing, consider the standard (3x3) Tic-Tac-Toe!

Thank You! Q & A ?