Theory of Computing Lecture 13 MAS 714 Hartmut Klauck.

Slides:



Advertisements
Similar presentations
Min-Max Relations, Hall’s Theorem, and Matching-Algorithms Graphs & Algorithms Lecture 5 TexPoint fonts used in EMF. Read the TexPoint manual before you.
Advertisements

1 LP Duality Lecture 13: Feb Min-Max Theorems In bipartite graph, Maximum matching = Minimum Vertex Cover In every graph, Maximum Flow = Minimum.
1 Matching Polytope x1 x2 x3 Lecture 12: Feb 22 x1 x2 x3.
C&O 355 Mathematical Programming Fall 2010 Lecture 22 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A.
Totally Unimodular Matrices
Introduction to Algorithms
1 Maximum flow sender receiver Capacity constraint Lecture 6: Jan 25.
Theory of Computing Lecture 14 MAS 714 Hartmut Klauck.
C&O 355 Lecture 20 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A A A A A A A A.
Political problem Suppose a politician trying to win an election 3 types of areas --- urban, suburban, rural. Certain issues --- road, gun control, farm.
Introduction To Algorithms CS 445 Discussion Session 8 Instructor: Dr Alon Efrat TA : Pooja Vaswani 04/04/2005.
MAXIMUM FLOW Max-Flow Min-Cut Theorem (Ford Fukerson’s Algorithm)
Linear Programming.
1 The Max Flow Problem. 2 Flow networks Flow networks are the problem instances of the max flow problem. A flow network is given by 1) a directed graph.
Totally Unimodular Matrices Lecture 11: Feb 23 Simplex Algorithm Elliposid Algorithm.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Spring, 2001 Lecture 4 Tuesday, 2/19/02 Graph Algorithms: Part 2 Network.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2001 Lecture 4 Tuesday, 10/2/01 Graph Algorithms: Part 2 Network.
The max flow problem
Linear programming maximize x 1 + x 2 x 1 + 3x 2  3 3x 1 + x 2  5 x 1  0 x 2  0.
Maximum Flows Lecture 4: Jan 19. Network transmission Given a directed graph G A source node s A sink node t Goal: To send as much information from s.
Matching Polytope, Stable Matching Polytope Lecture 8: Feb 2 x1 x2 x3 x1 x2 x3.
Linear Programming – Max Flow – Min Cut Orgad Keller.
CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow.
1 Ford-Fulkerson method Ford-Fulkerson(G) f = 0 while( 9 simple path p from s to t in G f ) f := f + f p output f Runs in time O(|f max | |E|) where f.
1 Spanning Tree Polytope x1 x2 x3 Lecture 11: Feb 21.
C&O 355 Mathematical Programming Fall 2010 Lecture 17 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AA A.
C&O 355 Lecture 2 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A.
Maximum Flow Chapter 26.
Approximating Minimum Bounded Degree Spanning Tree (MBDST) Mohit Singh and Lap Chi Lau “Approximating Minimum Bounded DegreeApproximating Minimum Bounded.
C&O 355 Mathematical Programming Fall 2010 Lecture 18 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A.
TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AA A A A A A A A A Image:
CS 473Lecture ?1 CS473-Algorithms I Lecture ? Network Flows Finding Max Flow.
Max Flow – Min Cut Problem. Directed Graph Applications Shortest Path Problem (Shortest path from one point to another) Max Flow problems (Maximum material.
15.082J and 6.855J March 4, 2003 Introduction to Maximum Flows.
CPSC 536N Sparse Approximations Winter 2013 Lecture 1 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAAAAAAA.
1 CS612 Algorithms for Electronic Design Automation CS 612 – Lecture 8 Lecture 8 Network Flow Based Modeling Mustafa Ozdal Computer Engineering Department,
1 EE5900 Advanced Embedded System For Smart Infrastructure Static Scheduling.
Exercise 6.1 Find the number of different shortest paths from point A to point B in a city with perfectly horizontal streets and vertical avenues as shown.
CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow.
Theory of Computing Lecture 12 MAS 714 Hartmut Klauck.
C&O 355 Lecture 19 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A A A A A A A A.
TU/e Algorithms (2IL15) – Lecture 12 1 Linear Programming.
A directed graph G consists of a set V of vertices and a set E of arcs where each arc in E is associated with an ordered pair of vertices from V. V={0,
TU/e Algorithms (2IL15) – Lecture 12 1 Linear Programming.
TU/e Algorithms (2IL15) – Lecture 8 1 MAXIMUM FLOW (part II)
Polyhedral Optimization Lecture 2 – Part 2 M. Pawan Kumar Slides available online
Lap Chi Lau we will only use slides 4 to 19
The Maximum Network Flow Problem
Topics in Algorithms Lap Chi Lau.
Data Structures and Algorithms (AT70. 02) Comp. Sc. and Inf. Mgmt
Linear Programming (LP) (Chap.29)
CS4234 Optimiz(s)ation Algorithms
Algorithm Design and Analysis
Lectures on Network Flows
Network flow problem [Adapted from M.Chandy].
Richard Anderson Lecture 23 Network Flow
Lecture 22 Network Flow, Part 2
CSCI 3160 Design and Analysis of Algorithms Tutorial 8
Instructor: Shengyu Zhang
Edmonds-Karp Algorithm
CSE Algorithms Max Flow Problems 11/21/02 CSE Max Flow.
Lecture 10 Network flow Max-flow and Min-cut Ford-Fulkerson method
Analysis of Algorithms
Problem Solving 4.
Flow Networks General Characteristics Applications
Flow Networks and Bipartite Matching
Algorithms (2IL15) – Lecture 7
EE5900 Advanced Embedded System For Smart Infrastructure
Lecture 19 Linear Program
Lecture 22 Network Flow, Part 2
Presentation transcript:

Theory of Computing Lecture 13 MAS 714 Hartmut Klauck

Application: Matching For simplicity we consider the bipartite matching problem G=(L [ R,E) is a bipartite graph A matching is a set M µ E, in which no two edges share a vertex A perfect matching (assuming |L|=|R|) has |L| edges Edges have weights W(u,v) A maximum matching is a matching with the maximum total edge weight

Flow network for bipartite matching G=(L [ R,E) is a bipartite graph (unweighted) Add two extra vertices s, t – connect s to all vertices of L, weight 1 – keep the edges in E (directed from L to R), weight 1 – connect all vertices in R to t, weight 1 Then the maximum flow in the new graph is equal to the maximum matching – We will prove this later, it is obvious that a matching leads to a flow but not the other way around

Computing Max Matchings Reduce the problem to Max Flow

Finding large matchings The Max Flow Min Cut theorem implies that the maximum flow in the graph is equal to the maximum matching: – A maximum matching of size s implies a flow of size s – The max flow is equal to the min s,t-cut – Find a cut that is smaller than the maximum matching

The Cut Define – U: matched vertex pairs connected to unmatched vertices in R (or to no unmatched vertices) – V: matched vertex pairs connected to unmatched vertices in L – U and V are disjoint, otherwise the matching is not maximum

The Cut

Finding large matchings Problem: flows across edges are not integers Definition: a flow is integral, if all f(u,v) are integers Claim: – If M is a matching in G, then there is an integral flow f in the flow network for G, such that |f|=|M| – Conversely, for an integral flow f there is a matching with |f|=|M|

Proof 1) Matching to Flow Define flow as follows: f(u,v)=1 if (u,v) in the matching, also f(v,u)=-1, f(s,u)=1, f(v,t)=1 etc. all other edges: f(u,v)=0 This is a legal flow Value is |M|

Proof 2) Flow to Matching Let f be an integral flow Set M={(u,v) with f(u,v)> 0} C(s,u)=1, hence f(s,u) 2 {0,1} f(u,v) 2 {0,1} For u there is at most one v with f(u,v)=1 M is a matching |M|= |f|

Integrality Theorem If all C(u,v) are integers, and a maximum flow is computed with Ford Fulkerson, then |f| and all f(u,v) are integers Corollary: Maximum Bipartite Matchings can be computed in time O(m 2 n) And even in time O(mn): Ford Fulkerson has time O(|f|m) for a max flow f, and |f| · n – Better algorithm can do it in O(m n 0.5 ) (Hopcroft Karp) Proof: – Induction over the iterations – First iteration: there is an augmenting path with integral capacity C p (f) – N f is also a network with integral capacities

Linear Programming Linear Programming is the most powerful optimization problem that can be solved in polynomial time – Some generalizations [semidefinite programming] can be much more appropriate Fast LP solvers exist – Write an LP, solve it – Fast in theory/fast in practice... Important theoretical tool Duality

Linear Programming Definition – A Linear Program (LP) is an optimization problem over real variables x 1,…,x n – Maximizes/minimizes a linear function of x: max/min C(x)=  i c i x i ( c i are real coefficients) – Constraints: feasible solutions are those that satisfy a system of linear inqualities: A is a real m £ n matrix, b a vector All x with Ax · b are feasible – We are looking for a feasible x with maximum C(x)

Geometry The set of x that satisfy a linear inequality is a half-space The set of feasible solutions to an LP is an intersection of halfspaces This is a convex polytope To solve an LP it is sufficient to be able to find a feasible solution I.e. find a point inside a convex polytope

Example: Max Flow Graph G with capacities C(u,v) G has m edges (u,v), use m variables f(u,v) Inequalities: f(u,v) · C(u,v) for all edges (u,v)  v f(u,v)=  v f(v,u) for all u except s,t f(u,v) ¸ 0 for all edges Maximize  v f(s,v) The program has m variables and m+n inequalities/equations By definition the maximum is a maximum flow

Example: Shortest Path Variables: d(v) for all vertices v Objective function: Minimize d(t) Constraints: d(v) · d(u)+W(u,v) for all edges (u,v) d(s)=0

Standard form Constraints using ¸, · and = are possible Easy to reduce to the standard form:  max c T x  Constraints:  Ax · b  x ¸ 0