Homework - hints Problem 1. Node weights  Edge weights

Slides:



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

Min-Max Relations, Hall’s Theorem, and Matching-Algorithms Graphs & Algorithms Lecture 5 TexPoint fonts used in EMF. Read the TexPoint manual before you.
Bart Jansen 1.  Problem definition  Instance: Connected graph G, positive integer k  Question: Is there a spanning tree for G with at least k leaves?
Greedy Algorithms.
Bipartite Matching, Extremal Problems, Matrix Tree Theorem.
1 Discrete Structures & Algorithms Graphs and Trees: III EECE 320.
1 Maximum flow sender receiver Capacity constraint Lecture 6: Jan 25.
R. Johnsonbaugh Discrete Mathematics 5 th edition, 2001 Chapter 8 Network models.
Midterm <  70 3.
Introduction To Algorithms CS 445 Discussion Session 8 Instructor: Dr Alon Efrat TA : Pooja Vaswani 04/04/2005.
The Maximum Network Flow Problem. CSE Network Flows.
Advanced Algorithm Design and Analysis (Lecture 8) SW5 fall 2004 Simonas Šaltenis E1-215b
Last time: terminology reminder w Simple graph Vertex = node Edge Degree Weight Neighbours Complete Dual Bipartite Planar Cycle Tree Path Circuit Components.
Computability and Complexity 23-1 Computability and Complexity Andrei Bulatov Search and Optimization.
1 Discrete Structures & Algorithms Graphs and Trees: II EECE 320.
Introduction to Approximation Algorithms Lecture 12: Mar 1.
Automated Layout and Phase Assignment for Dark Field PSM Andrew B. Kahng, Huijuan Wang, Alex Zelikovsky UCLA Computer Science Department
HW2 Solutions. Problem 1 Construct a bipartite graph where, every family represents a vertex in one partition, and table represents a vertex in another.
Increasing graph connectivity from 1 to 2 Guy Kortsarz Joint work with Even and Nutov.
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.
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.
Matching Polytope, Stable Matching Polytope Lecture 8: Feb 2 x1 x2 x3 x1 x2 x3.
1/13/03Tucker, Applied Combinatorics, Sec Tucker, Applied Combinatorics, Sec. 1.1, Jo E-M A Graph is a set of vertices (dots) with edges (lines)
Approximation Algorithms Motivation and Definitions TSP Vertex Cover Scheduling.
Hardness Results for Problems
Minimum Spanning Trees. Subgraph A graph G is a subgraph of graph H if –The vertices of G are a subset of the vertices of H, and –The edges of G are a.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
Homework 2. Problem 1 Families 1…..N go out for dinner together. To increase their social interaction, no two members of the same family use the same.
Lecture 12-2: Introduction to Computer Algorithms beyond Search & Sort.
Hungarian Algorithm Vida Movahedi Elderlab, York University June 2007.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
DATA MINING LECTURE 13 Absorbing Random walks Coverage.
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.
1 CS612 Algorithms for Electronic Design Automation CS 612 – Lecture 8 Lecture 8 Network Flow Based Modeling Mustafa Ozdal Computer Engineering Department,
Network Flow How to solve maximal flow and minimal cut problems.
Lecture 19 Greedy Algorithms Minimum Spanning Tree Problem.
Data Structures & Algorithms Graphs
Graph Colouring L09: Oct 10. This Lecture Graph coloring is another important problem in graph theory. It also has many applications, including the famous.
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.
Introduction to Graph Theory
Iterative Improvement for Domain-Specific Problems Lecturer: Jing Liu Homepage:
Approximation Algorithms by bounding the OPT Instructor Neelima Gupta
Matching in bipartite graphs Given: non-weighted bipartite graph not covered node extending alternating path initial matching Algorithm: so-called “extending.
The Maximum Network Flow Problem
6.1b Adding And subtracting polynomials
TU/e Algorithms (2IL15) – Lecture 8 1 MAXIMUM FLOW (part II)
Bipartite Matching Lecture 8: Oct 7.
Minimum Spanning Trees
Graph theory Definitions Trees, cycles, directed graphs.
Algorithms and Networks
Greedy Algorithms / Minimum Spanning Tree Yin Tat Lee
Chapter 5. Optimal Matchings
Bipartite Matching and Other Graph Algorithms
Planarity Testing.
CSE 421: Introduction to Algorithms
Lecture 16 Maximum Matching
Instructor: Shengyu Zhang
Analysis of Algorithms
Lecture 19-Problem Solving 4 Incremental Method
Problem Solving 4.
1.3 Modeling with exponentially many constr.
Flow Networks and Bipartite Matching
5.4 T-joins and Postman Problems
Algorithms (2IL15) – Lecture 7
Lecture 14 Shortest Path (cont’d) Minimum Spanning Tree
Automated Layout and Phase Assignment for Dark Field PSM
Lecture 13 Shortest Path (cont’d) Minimum Spanning Tree
Presentation transcript:

Homework - hints Problem 1. Node weights  Edge weights single source shortest paths problem (SSSP) 1/2 1/2 s Return:shortest path and its length 1 Hint sink 2 3 Problem 2: Shortest even (or odd) path Hint: create a copy of each node  bipartite graph, add necessary edges so that, for edge (u,v) in the new graph you always come to v in even paths and to copy of v in odd paths. Problem 3: for extra points

Matching in Bipartite Graphs “ assignment problem” Problem: Given: bipartite graph, find the maximum # of edges that do not overlap  Job assignment problem Jobs Job nobody can do Employees cannot do anything - at the same time assign only 1 job to 1 employee

Matching in Bipartite Graphs “ assignment problem” Find a job assignment such that each job is assigned to one employee and vice versa. -there is a solution in polynomial time -we need to find “extending alternating paths”: start with a node that’s not covered  edge not covered  end in not covered node

Matching in Bipartite Graphs remove Blue = matching red = so-called free node When we go down  always red, when we go up  always green Claim: if there is no alternating path, we cannot add more matching (no improvement)

Matching in Bipartite Graphs node v  M’, v  M M v M Claim:no extending alternating path  this is the maximum possible matching Proof: assume, on the contrary, that larger matching exists: M’  there is a node v  M’, v  M M+M’ has some connected components remove from M+M’ , in the rest still |M| < |M’|

Minimum Weight Matching Problem: Given: complete bipartite graph with weights on edges. Find minimum weight matching. ( G = (A  B, E,w) ) |A| = |B| w  R, not R+ +1 +1 +1 +1 any matching will increase by 1 (if we add +1 to weights of all edges outgoing from a fixed node)

Computation Geometry Application of Matching crystal defects non-convex points - all pieces rectangular, cut in vertical (or horizontal) cuts Problem: minimize # of cats - only 90, 180, 270 cuts (180  -we don’t care about), 270  - problem Fact: if we make a cut from each non-convex point, then the pieces are rectangles.  if we solve matching of non convex, then we find the optimum

Minimum Weight Matching If we change weights with the above procedure, and come to a graph with perfect matching (all nodes matched), of zero weight, then M is minimum weight matching! - we do not change matching by adding and subtracting - for each node v, v  A subtract min(v) = min u B w(v,u) next time  algorithm

Matching in Bipartite Graphs Repeat from v’  M’, v’  M. Either we find alternating path or there will be no edges in M and M’ contradiction to |M| < |M’|