WB13 Define the terms bipartite graph,

Slides:



Advertisements
Similar presentations
Example 1 Translate a Figure Example 2 Find a Translation Matrix
Advertisements

Orthogonal Drawing Kees Visser. Overview  Introduction  Orthogonal representation  Flow network  Bend optimal drawing.
Lecture 5 Graph Theory. Graphs Graphs are the most useful model with computer science such as logical design, formal languages, communication network,
R. Johnsonbaugh Discrete Mathematics 5 th edition, 2001 Chapter 8 Network models.
Module 5 – Networks and Decision Mathematics Chapter 24 – Directed Graphs.
Tutorial 6 of CSCI2110 Bipartite Matching Tutor: Zhou Hong ( 周宏 )
Matchings Example Freya buys some chocolates to share with her friends. There are six chocolates – raspberry rage (R), truffle tickle (T), nut nibble (N),
Allocation problems - The Hungarian Algorithm The Hungarian algorithm Step 1Reduce the array by both row and column subtractions Step 2Cover the zero elements.
Linear Programming Applications
D1: Matchings.
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,
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley.
Graph Coloring.
9.2 Graph Terminology and Special Types Graphs
GRAPH Learning Outcomes Students should be able to:
 Jim has six children.  Chris fights with Bob,Faye, and Eve all the time; Eve fights (besides with Chris) with Al and Di all the time; and Al and Bob.
Lecture 12-2: Introduction to Computer Algorithms beyond Search & Sort.
Hungarian Algorithm Vida Movahedi Elderlab, York University June 2007.
5.1  Routing Problems: planning and design of delivery routes.  Euler Circuit Problems: Type of routing problem also known as transversability problem.
Copyright © Cengage Learning. All rights reserved. CHAPTER 10 GRAPHS AND TREES.
SOLUTION EXAMPLE 4 Identify angle pairs To find vertical angles, look or angles formed by intersecting lines. To find linear pairs, look for adjacent angles.
Which of these can be drawn without taking your pencil off the paper and without going over the same line twice? If we can find a path that goes over all.
Can you connect the dots as shown without taking your pen off the page or drawing the same line twice.
(CSC 102) Lecture 28 Discrete Structures. Graphs.
SPORTS MATCHINGS. YOUR TASK Your are the sports captain of your school. There are four different sports teams which are looking for one more person to.
Eric Chang and Rutwik Parikh. Goal: Determine the largest subset of edges in a graph such that no vertex of the graph is touched by more than one edge.
All Pair Shortest Path IOI/ACM ICPC Training June 2004.
Computer Science: A Structured Programming Approach Using C Graphs A graph is a collection of nodes, called vertices, and a collection of segments,
JessicaManager JasonProduce section RobertShelf Stacking CharlotteTrolleys LauriDeli EdCheckout Matching the elements of 2 different sets occurs when for.
1 12/2/2015 MATH 224 – Discrete Mathematics Formally a graph is just a collection of unordered or ordered pairs, where for example, if {a,b} G if a, b.
Bipartite Matching. Unweighted Bipartite Matching.
Graphs Edge(arc) Vertices can be even or odd or undirected (two-way) Edges can be directed (one-way) This graph is connected. Degree(order) = 3 Odd vertex.
Roots, Zeroes, and Solutions For Quadratics Day 2.
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.
D1 stuff The tail wags the dog. M1A1 A1 A1 We mark your best effort.
Graphs 9.1 Graphs and Graph Models أ. زينب آل كاظم 1.
Relation. Combining Relations Because relations from A to B are subsets of A x B, two relations from A to B can be combined in any way two sets can be.
Network Flows Chun-Ta, Yu Graduate Institute Information Management Dept. National Taiwan University.
Conic Sections in Polar Coordinates
Introduction to Graph Theory Lecture 17: Graph Searching Algorithms.
Introduction to Graph Theory Lecture 13: Graph Coloring: Edge Coloring.
Introduction to Graph Theory
Goal: Identify and graph functions..  Relation: mapping or pairing, of input values with output values.  Domain: Set of input values.  Range: set of.
Approximation Algorithms by bounding the OPT Instructor Neelima Gupta
Instructor Neelima Gupta Table of Contents Introduction to Approximation Algorithms Factor 2 approximation algorithm for TSP Factor.
MATCHINGS A college dramatic society has six helpers: Andrew, Donna, Henry, Karl, Nicola and Yana. They are to be matched to six tasks: Props, Lighting,
DECISION 1. How do you do a Bubble Sort? Bubble Sort:  You compare adjacent items in a list;  If they are in order, leave them.  If they are not in.
1 GRAPH Learning Outcomes Students should be able to: Explain basic terminology of a graph Identify Euler and Hamiltonian cycle Represent graphs using.
Map Coloring Vertex Drawing Txt: mini excursion 2 (p ) & SOL: DM.1 Classwork Project Assigned due in two blocks (print the rubric at the end of.
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.
Timetable Problem solving using Graph Coloring
Chapter 10 Iterative Improvement
Lecture 16 Bipartite Matching
EXAMPLE 1 Represent relations
Redraw this PCB in such a way that no wires cross.
Review: Mini-Quiz Matching
The Taxi Scheduling Problem
Graphs Chapters 10.1 and 10.2 Based on slides by Y. Peng University of Maryland.
Critical Path Analysis
Section 14.4 Trees.
Algebra: Graphs, Functions, and Linear Systems
R. Johnsonbaugh Discrete Mathematics 5th edition, 2001
Representing Relations
Route Inspection Which of these can be drawn without taking your pencil off the paper and without going over the same line twice? If we introduce a vertex.
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley.
Copyright © Cengage Learning. All rights reserved.
Relations and Functions
Lecture 4: Matching Algorithms
Section 13.4 Trees.
Warm Up – 3/27 - Thursday Write a priority list using the decreasing time algorithm. Do you see any problem with this?
Presentation transcript:

WB13 Define the terms bipartite graph, A graph consisting of two distinct sets of vertices X and Y in which arcs can only join a vertex in X to a vertex in Y. Eg if A-D are four workers and 1-4 represent four tasks The bipartite graph could represent the possible tasks each worker is able to do (b) alternating path, A path from an unmatched vertex in X to an unmatched vertex in Y which alternately uses arcs in/not in the matching. Eg if A and B are initially assigned to their first task An alternating path starts at an unmatched ‘worker’ and finishes at an unmatched ‘task’ Initial matching Why do you think this is done? 1 does go to A 3 does go to B C could go to 1 B could go to 4 A could go to 3

(c) matching, The (1-1) matching / pairing of some elements of X with elements of Y. Alternating path from previously: If you ‘change status’ here: You now have 3 matches instead of 2 An alternating path increases the number of matches by 1 This gives an improved matching: (d) complete matching. A 1-1 matching between all elements of X onto Y Alternating path: Change status: This gives a complete matching:

Matchings WB14 A taxi firm has six taxis A- F, available for six journeys, 1- 6, which are booked for 9 am tomorrow. The bipartite graph shown in Figure 1 shows the possible matchings. Initially A, B, C and D are matched to 5, 2, 3 and 6 respectively, as indicated in Figure 2. Figure 1 Figure 2 (a) Explain why it is necessary to perform the maximum matching algorithm twice in order to try to obtain a complete matching. The algorithm increases the number of matches by 1 using an alternating path, and there are two unmatched nodes on each side of the initial matching.

Matchings Improved matching Figure 1 Figure 2 Alternating path WB14(b) Use the maximum matching algorithm twice to obtain a complete matching. List clearly the alternating paths you use. Alternating path Change status Change status Complete matching Improved matching Alternative solution F = 5 – A = 6 – D = 2 =B – 4 Complete matching: A = 6, B = 4, C = 1 D = 2, E = 3, F = 5

WB15 Six newspaper reporters Asif (A), Becky (B), Chris (C), David (D), Emma (E) and Fred (F), are to be assigned to six news stories Business (1), Crime (2), Financial (3), Foreign (4), Local (5) and Sport (6). The table shows possible allocations of reporters to news stories. For example, Chris can be assigned to any one of stories 1, 2 or 4. 1 2 3 4 5 6 A B C D E F (a) Show these possible allocations on the bipartite graph on the diagram below. A possible matching is A to 5, C to 1, E to 6, F to 4 (b) Show this information, in a distinctive way, on the diagram. (c) Use an appropriate algorithm to find a maximal matching. You should list any alternating paths you have used. Alternating path Change status Improved matching 3 & 6 can only be done by C (d) Explain why it is not possible to find a complete matching.