1 1 Find a maximum Matching ? 2 2 3 3 4 4 5 5 Women Men.

Slides:



Advertisements
Similar presentations
Maximum flow Main goals of the lecture:
Advertisements

1 LP Duality Lecture 13: Feb Min-Max Theorems In bipartite graph, Maximum matching = Minimum Vertex Cover In every graph, Maximum Flow = Minimum.
Linear Programming (LP) (Chap.29)
Max Flow Problem Given network N=(V,A), two nodes s,t of V, and capacities on the arcs: uij is the capacity on arc (i,j). Find non-negative flow fij for.
1 Maximum flow sender receiver Capacity constraint Lecture 6: Jan 25.
Prof. Swarat Chaudhuri COMP 482: Design and Analysis of Algorithms Spring 2012 Lecture 19.
1 Augmenting Path Algorithm s t G: Flow value = 0 0 flow capacity.
Chapter 10: Iterative Improvement The Maximum Flow Problem The Design and Analysis of Algorithms.
Advanced Algorithm Design and Analysis (Lecture 8) SW5 fall 2004 Simonas Šaltenis E1-215b
Lectures on Network Flows
HW2 Solutions. Problem 1 Construct a bipartite graph where, every family represents a vertex in one partition, and table represents a vertex in another.
CSC 2300 Data Structures & Algorithms April 17, 2007 Chapter 9. Graph Algorithms.
Section 4.2 Network Flows By Christina Touhey. The flow out of a equals the flow into z. Algorithm 1.Make vertex a: (0, ). 2.Scan the first vertex and.
1 Augmenting Path Algorithm s t G: Flow value = 0 0 flow capacity.
Maximum Bipartite Matching
Linear Programming – Max Flow – Min Cut Orgad Keller.
A B C D The diagram below shows water flowing through a pipework system. The values on the edges are the capacities of water that they.
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.
Maximum Flow Chapter 26.
Hungarian Algorithm Vida Movahedi Elderlab, York University June 2007.
Topic III The Simplex Method Setting up the Method Tabular Form Chapter(s): 4.
Lecture 16 Maximum Matching. Incremental Method Transform from a feasible solution to another feasible solution to increase (or decrease) the value of.
Theory of Computing Lecture 13 MAS 714 Hartmut Klauck.
Network Flow. Network flow formulation A network G = (V, E). Capacity c(u, v)  0 for edge (u, v). Assume c(u, v) = 0 if (u, v)  E. Source s and sink.
Maximum Flow Problem (Thanks to Jim Orlin & MIT OCW)
The diagram below shows water flowing through a pipework system. The values on the edges are the capacities of water that they can carry.
Maximum Flow Chapter 26. Flow Concepts Source vertex s – where material is produced Sink vertex t – where material is consumed For all other vertices.
15.082J and 6.855J March 4, 2003 Introduction to Maximum Flows.
1 EE5900 Advanced Embedded System For Smart Infrastructure Static Scheduling.
Theory of Computing Lecture 12 MAS 714 Hartmut Klauck.
ENGM 631 Maximum Flow Solutions. Maximum Flow Models (Flow, Capacity) (0,3) (2,2) (5,7) (0,8) (3,6) (6,8) (3,3) (4,4) (4,10)
TU/e Algorithms (2IL15) – Lecture 8 1 MAXIMUM FLOW (part II)
Excel Solver Tutorial BI&A 674.
Maximum Flow Chapter 26.
Using Variable Domain Functions
Maximum Flow Chapter 26.
Water Resources Planning and Management Daene McKinney
Lectures on Network Flows
Network Flow & Linear Programming
CSCI 3160 Design and Analysis of Algorithms Tutorial 8
Max Flow min Cut.
Chapter 5. Optimal Matchings
Maximum Flow Solutions
Maximum Flow Problem flow capacity Actual flow  capacity
3.3 Applications of Maximum Flow and Minimum Cut
Network Flows – Labelling procedure
Lecture 16 Maximum Matching
Network Flow 2016/04/12.
Instructor: Shengyu Zhang
Edmonds-Karp Algorithm
Analysis of Algorithms
Introduction to Maximum Flows
optimal basis will not change
R. Johnsonbaugh Discrete Mathematics 5th edition, 2001
Problem Solving 4.
Max Flow Min Cut, Bipartite Matching Yin Tat Lee
Augmenting Path Algorithm
LINGO LAB 3/4.
optimal basis will not change
5.4 T-joins and Postman Problems
Algorithms (2IL15) – Lecture 7
Chapter 6 Network Flow Models.
EE5900 Advanced Embedded System For Smart Infrastructure
Max Flow / Min Cut.
Network Flows – Restricted vertices
Advanced LP models column generation.
Augmenting Path Algorithm
Lecture 19 Linear Program
Maximum Flow Neil Tang 4/8/2008
Maximum Flow Problems in 2005.
Presentation transcript:

1 1 Find a maximum Matching ? 2 2 3 3 4 4 5 5 Women Men

1 1 Find a maximum matching by eyes. 2 2 3 3 4 4 5 5 Women Men

Find a maximum matching by computer. 1 1 Find a maximum matching by computer. 2 2 Restrictions: Find Max 3 3 4 4 5 5 Women Men

Not a good way!! 1 1 Find a maximum matching by computer. 2 2 Restriction: x12+x13=1, x23=1, x33+x34+x35=1, x41+x42+x44=1, x55=1, x41=1, x12+x42=1, x13+x23+x31=1, x34+x44=1, x35+x55=1, xij=0 or 1. Find Max 3 3 4 4 5 5 Not a good way!! Women Men

1 1 Find a maximum Matching by computer again? 2 2 3 3 This is a maximal matching, but not a maximum matching. 4 4 5 5 Women Men

1 1 Find a maximum Matching by computer again? 2 2 3 1. Find an augmentative path. 3 4 4 5 5 Women Men

1 1 Find a maximum Matching by computer again? 2 2 3 1. Find an augmentative path. 2. Add the edges in the path, but not in matching. 3 4 4 5 5 Women Men

1 1 Find a maximum Matching by computer again? 2 2 3 1. Find an augmentative path. 2. Add the edges in the path, but not in matching. 3. Delete the edges in the path and in the matching. 3 4 4 5 5 Women Men

1 1 Find a maximum Matching by computer again? 2 2 3 Now we have 4 pairs 3 4 4 5 5 Women Men

1 1 Find a maximum Matching by computer again? 2 2 1. Keep doing this procedure. 3 3 4 4 5 5 Women Men

1 1 Find a maximum Matching by computer again? 2 2 1. Keep doing this procedure. 3 3 4 4 Wrong!! This is not an augmentative path. 5 5 Women Men

1 1 Find a maximum Matching by computer again? 2 2 1. Keep doing this procedure. 3 3 4 4 5 5 Women Men

1 1 Find a maximum Matching by computer again? 2 2 1. Keep doing this procedure. 3 3 4 4 5 5 Women Men

1 1 Find a maximum Matching by computer again? 2 2 Keep doing this procedure. When there exists no augmentative path, we find a maximum matching. 3 3 4 4 5 5 Women Men

3 1 1 1 5 3 2 3 4 2 1 2 3 5 Find maximum water flow with given capacities in the one-way pipes.

3/3 1/1 1/1 1/1 5/3 3 3 2/1 3/2 4 2 1 2 3 5 Find maximum water flow with given capacities by eyes.

3/3 1/1 1/1 1/1 5/3 3 3+3 2/1+1 3/2+1 4/3 2 1 2/2 3/2 5 Find maximum water flow with given capacities by eyes.

3/3 5 1/1 1/1 1/1 5/3 3 3+3+1 2/1+1 3/2+1 4/3 2 1/1 2/2 3/2+1 5/1 Find maximum water flow 7 with given capacities by eyes.

3/3 1/1 1/1 1/1 5 3/3 4 2 3 4/4 2/1 1 2/2 3/3 5/1 Flow 4 is maximal, but not a maximum flow.

3/3 1/1 1/1 1/1 5 3/3 4 2 3 4/4 2/1 1 2/2 3/3 5/1 Blue path is an augmentative path with increasing value 2.

3/3 1/1 1/1 1/1 5/2 3/3-2 4+2 2/2 3/2 4/4 2/1 1 2/2 3/3 5/1 Increasing or decreasing flow 2 in pipes according to augmentative path

3/3 1/1 1/1 1/1 5/2 3/3-2 4+2+1 2/2 3/2+1 4/4 2/1-1 1/1 2/2 3/3 5/1 The same way to increase the pink flow 1, and to obtain the maximum flow 7.

Relation to optimization problems c 3 b 1 1 1 5 3 2 3 a 4 d 2 1 2 3 5

Final comments There always exists a trivial solution, 0 flow. We don’t need to assume that xab is an integer, since each time we only increase integral flow value. 3. x<3 iff –x > -3 4. x<3 iff x+y=3 and y>0 5. Max x iff Min –x 6. Max xy is related to Max x+y, or Max x under the assumption x=cy.