割当問題とマッチング Assignment Problem B=(b ij ) : n×n matrix C ⊆ {b ij |1 ≦ i ≦ n, 1 ≦ j ≦ n} C is diagonal ⇔ (1) ∀ b ij, b kh ∈ C, ⇒ i≠k and j≠h (2) |C | =

Slides:



Advertisements
Similar presentations
Min Cost Flow: Polynomial Algorithms. Overview Recap: Min Cost Flow, Residual Network Potential and Reduced Cost Polynomial Algorithms Approach Capacity.
Advertisements

Outline LP formulation of minimal cost flow problem
1 Introduction to Linear Programming. 2 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. X1X2X3X4X1X2X3X4.
R. Johnsonbaugh Discrete Mathematics 5 th edition, 2001 Chapter 8 Network models.
CS138A Single Source Shortest Paths Peter Schröder.
Sequential Timing Optimization. Long path timing constraints Data must not reach destination FF too late s i + d(i,j) + T setup  s j + P s i s j d(i,j)
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.
Basic Feasible Solutions: Recap MS&E 211. WILL FOLLOW A CELEBRATED INTELLECTUAL TEACHING TRADITION.
1 Maximum Flow Networks Suppose G = (V, E) is a directed network. Each edge (i,j) in E has an associated ‘capacity’ u ij. Goal: Determine the maximum amount.
Chapter 7 Maximum Flows: Polynomial Algorithms
Optimisation Methods Network Models.
Maximum Bipartite Matching
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.
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.
CS 473 All Pairs Shortest Paths1 CS473 – Algorithms I All Pairs Shortest Paths.
15.082J, 6.855J, and ESD.78J September 21, 2010 Eulerian Walks Flow Decomposition and Transformations.
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.
Advanced Algorithms Piyush Kumar (Lecture 5: Weighted Matching) Welcome to COT5405 Based on Kevin Wayne’s slides.
1.3 Modeling with exponentially many constr.  Some strong formulations (or even formulation itself) may involve exponentially many constraints (cutting.
5. 最短路問題 Shortest Path Problem Problem Definition(1) Given : digraph G=(V, A) w:A →R (length w(a) of each arc a) W=(a 1, a 2, … a k ): a directed walk.
The University of Hong Kong 1 Capacity Constrained Assignment in Spatial Databases Authors: Leong Hou U, University of Hong Kong Man Lung Yiu, Aalborg.
1 Network Optimization Chapter 3 Shortest Path Problems.
C&O 355 Mathematical Programming Fall 2010 Lecture 19 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AA A.
GRAPHS CSE, POSTECH. Chapter 16 covers the following topics Graph terminology: vertex, edge, adjacent, incident, degree, cycle, path, connected component,
1 Minimum Cost Flows Goal: Minimize costs to meet all demands in a network subject to capacities (combines elements of both shortest path and max flow.
CSE 421 Algorithms Richard Anderson Lecture 24 Network Flow Applications.
Theory of Computing Lecture 13 MAS 714 Hartmut Klauck.
Shortest Path Problem Weight of the graph –Nonnegative real number assigned to the edges connecting to vertices Weighted graphs –When a graph.
Review for E&CE Find the minimal cost spanning tree for the graph below (where Values on edges represent the costs). 3 Ans. 18.
EMIS 8373: Integer Programming “Easy” Integer Programming Problems: Network Flow Problems updated 11 February 2007.
CS 473Lecture ?1 CS473-Algorithms I Lecture ? Network Flows Finding Max Flow.
1 1 © 2003 Thomson  /South-Western Slide Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
Data Structures & Algorithms Graphs
Max Flow – Min Cut Problem. Directed Graph Applications Shortest Path Problem (Shortest path from one point to another) Max Flow problems (Maximum material.
1 Network Models Transportation Problem (TP) Distributing any commodity from any group of supply centers, called sources, to any group of receiving.
Maximum Flow Chapter 26. Flow Concepts Source vertex s – where material is produced Sink vertex t – where material is consumed For all other vertices.
EMIS 8373: Integer Programming Combinatorial Relaxations and Duals Updated 8 February 2005.
Hon Wai Leong, NUS (CS6234, Spring 2009) Page 1 Copyright © 2009 by Leong Hon Wai CS6234: Lecture 4  Linear Programming  LP and Simplex Algorithm [PS82]-Ch2.
Network Flows Chun-Ta, Yu Graduate Institute Information Management Dept. National Taiwan University.
Chapter 8 Network Models to accompany Operations Research: Applications and Algorithms 4th edition by Wayne L. Winston Copyright (c) 2004 Brooks/Cole,
1 Introduction to Linear Programming. 2 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. X1X2X3X4X1X2X3X4.
and 6.855J March 6, 2003 Maximum Flows 2. 2 Network Reliability u Communication Network u What is the maximum number of arc disjoint paths from.
Supplementary: Feasible Labels and Linear Programming  Consider the LP formulation of the shortest s-t path problem: (P) Minimize  (i, j)  A c ij x.
Review for E&CE Find the minimal cost spanning tree for the graph below (where Values on edges represent the costs). 3 Ans. 18.
Problems in Combinatorial Optimization. Linear Programming.
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.
1 Chapter 7 Network Flow Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
Lecture 20. Graphs and network models 1. Recap Binary search tree is a special binary tree which is designed to make the search of elements or keys in.
Assignment Problem, Dynamic Programming
Chapter 5. Optimal Matchings
Bipartite Matching and Other Graph Algorithms
1.206J/16.77J/ESD.215J Airline Schedule Planning
Instructor: Shengyu Zhang
Analysis of Algorithms
Strategic Problems: Location
Algorithms (2IL15) – Lecture 5 SINGLE-SOURCE SHORTEST PATHS
Introduction Basic formulations Applications
Lecture 19-Problem Solving 4 Incremental Method
Vertex Covers, Matchings, and Independent Sets
Problem Solving 4.
Max Flow Min Cut, Bipartite Matching Yin Tat Lee
Chapter 5 Transportation, Assignment, and Transshipment Problems
Algorithms (2IL15) – Lecture 7
Advanced LP models column generation.
Advanced LP models column generation.
Text Book: Introduction to algorithms By C L R S
Parallel Graph Algorithms
Vertex Covers and Matchings
Presentation transcript:

割当問題とマッチング

Assignment Problem B=(b ij ) : n×n matrix C ⊆ {b ij |1 ≦ i ≦ n, 1 ≦ j ≦ n} C is diagonal ⇔ (1) ∀ b ij, b kh ∈ C, ⇒ i≠k and j≠h (2) |C | = n def max (min) {Σb ij | C is diagonal} C

max-weight bipartite matching problem Given G=(S ∪ T, A) complete bipartite graph, |S|=|T|=ncomplete bipartite graph, w:A→R arc weight find min{Σ w(a) | K : perfect matching}perfect matching a∈Ka∈K max-weight bipartite matching problem assignment problem EQUIVALENT

Bipartite graph G=(V, A) is bipartite ⇔ ∃ partition of V, V=S ∪ T s.t. ∃ arc which has both their vertices in S, ∃ arc which has both their vertices in T def ・ G=(S ∪ T, A) is complete bipartite ⇔ A=S×T def

Matching G=(V, A) M ⊆ A M is a matching ⇔ ∀ a, b ∈ M a and b do not have any vertex in common. M is a perfect matching ⇔ any vertex in V is covered by an arc in M def

diagonal ⇔ perfect matching Assume that any arc weigh ( matrix element) is given by nonnegative real number. S T

Node weighting (potential) G=(S ∪ T, A) u(i) i ∈ S v(j) j ∈ T u, v is feasible node weighting ⇔ u(i)+v(j) ≧ w(i, j) ∀ {i, j} ∈ A def ex. u(i) = 0, ∀ i ∈ S v(j)=max{w(i, j) |i ∈ S}, ∀ j ∈ T is a feasible node weighting u\v

Lemma 6.1 u, v: feasible node weighting K : perfect matching = ≦ Corollary 6.2 u, v: feasible node weighting A = ={{i, j} ∈ A | u(i)+v(j)=w(i, j)} K ⊆ A = K : perfect matching ⇒ K : max-weight perfect matching

Reduced weighting w(i, j) = u(i)+v(j)-w(i, j) ∀ {i, j} ∈ A u, v is feasible node weighting ⇔ w(i, j) ≧ 0 ∀ {i, j} ∈ A

Graph orientation u, v: feasible node weighting K : (any) matching S T orientation i ∈ S, j ∈ T {i, j} ∈ K ⇒ j→i {i, j} ∈ A\K ⇒ i→j add new vertices s, t, and new arcs {(s, i) | i ∈ S\K} ∪ {(j, t) |j ∈ T\K} s t Each vertex i ∈ S has one incoming arcs

Re-weighting u, v: feasible node weighting K : (any) matching S T re-weighting {i, j} ∈ K ⇒ l(j, i) = -w(i, j) {i, j} ∈ A\K ⇒ l(i. j) = w(i, j) l(s, i) = 0 ∀ i ∈ S\K l(j, t)=0 ∀ j ∈ T\K s t d(v) : distance from s to v with respect to l Property u’(i) = u(i)+d(i), i ∈ S v’(j) = v(j) - d(j), j ∈ T : feasible node potential

feasible node weighting? re-weighting {i, j} ∈ K ⇒ l(j, i) = -w(i, j) {i, j} ∈ A\K ⇒ l(i. j) = w(i, j) l(s, i) = 0 ∀ i ∈ S\K l(j, t)=0 ∀ j ∈ T\K u’(i) = u(i)+d(i), i ∈ S v’(j) = v(j) - d(j), j ∈ T feasible? ( u’(i)+v’(j) ≧ w(i, j) ) {i, j} ∈ A\K i j w(i, j) d(j) ≦ d(i)+l(i, j) = d(i)+w(i, j) ∴ u’(i)+v’(j) = u(i)+d(i)+v(j)-d(j) ≧ u(i)+v(j)-w(i, j) = u(i)+v(j)-(u(i)+v(j)-w(i, j)) = w(i, j) {i, j} ∈ K i j -w(i, j) d(i)=d(j)+l(i, j) =d(j)-w(i, j) ∵ i has exactly one incoming arc ∴ u’(i)+v’(j) = u(i)+v(j)-w(i, j) = w(i, j)

Corollary P : shortest path from s to t with respect to l {i, j} ∈ A(P) ⇒ u’(i)+v’(j)=w(i, j) K △ A(P) = (K\A(P)) ∪ (A(P)\K) : matching s t s t | K △ A(P) |>|K|

Algorithm (successive shortest path) Maintain a feasible node weighting u, v and a matching K ⊆ A = ={{i, j} ∈ A | u(i)+v(j)+w(i, j)} 1.Orient each arc and add new vertices and arcs. 2.Find a shortest path P and shortest path distance d (since l ≧ 0, we can use Dijkstra algorithm) 2.Update u and v by d 3.Update K to K △ A(P) Repeat the following steps: Each step increases the cardinality of K. Thus the algorithm terminates at most n iterations.

Example (1) Initialization w u(i) = 0, ∀ i ∈ S,v(j)=max{w(i, j) |i ∈ S}, ∀ j ∈ T arcs in A = K

Example (2) Iteration 1 w s t Find d shortest path P update

Example (3) Iteration 2 w s t Find d shortest path P update optimal

LP variable x :A→{0, 1} 1 ( when an optimal matching contains an arc a) x(a) = 0 ( otherwise)

LP -dual

Hichcock’s Transportation Problem 輸送問題

Problem Definition Given G=(S ∪ T, A) bipartite graph supply b(i) i ∈ S, demand b(j), j ∈ T (Σb(i) = Σb(j) ) arc cost c(i, j), {i, j} ∈ A i j warehouse customer Determine a way of distribution of goods from each warehouse to each customoer with minimizing the total transpotation cost.

f(i, j) : a value distributed a goods from warehouse i to customer j total transportation cost = Σ c(i, j)f(i, j) {i, j} ∈ A Node cost G=(S ∪ T, A) u(i) i ∈ S v(j) j ∈ T u, v is feasible node cost ⇔ u(i)+v(j) ≦ c(i, j) ∀ {i, j} ∈ A def

Lemma 6.3 u, v: feasible node cost f : feasible distribution Corollary 6.4 u, v: feasible node cost A = ={{i, j} ∈ A | u(i)+v(j)=c(i, j)} If G(S ∪ T, A = ) has a feasible solution f, f is optimal.

Think Think Think Develop an algorithm for Hichcock’s transportation problem Describe an LP formulation of Hichcock’s transportation problem Develop an algorithm for Hichcock’s transportation problem with arc capacity

Matching problem on nonbipartite graphs optimal solution fractional optimal solution value = 18 1/ value = 19