cse 421
play

CSE 421 Edge Disjoint Path / Image Segmentation / Project Selection - PowerPoint PPT Presentation

CSE 421 Edge Disjoint Path / Image Segmentation / Project Selection Shayan Oveis Gharan 1 Marriage Theorem Pf. s.t., | | < || G does not a perfect matching Formulate as a max-flow and let (, ) be the


  1. CSE 421 Edge Disjoint Path / Image Segmentation / Project Selection Shayan Oveis Gharan 1

  2. Marriage Theorem Pf. βˆƒπ‘‡ βŠ† π‘Œ s.t., |𝑂 𝑇 | < |𝑇| ⇐ G does not a perfect matching Formulate as a max-flow and let (𝐡, 𝐢) be the min s-t cut G has no perfect matching => 𝑀 𝑔 βˆ— < |π‘Œ| . So, π‘‘π‘π‘ž 𝐡, 𝐢 < |π‘Œ| Define π‘Œ 4 = π‘Œ ∩ 𝐡, π‘Œ 7 = π‘Œ ∩ 𝐢, 𝑍 4 = 𝑍 ∩ 𝐡 Then, π‘‘π‘π‘ž 𝐡, 𝐢 = π‘Œ 7 + |𝑍 4 | Since min-cut does not use ∞ edges, 𝑂 π‘Œ 4 βŠ† 𝑍 4 𝑂 π‘Œ 4 ≀ 𝑍 4 = π‘‘π‘π‘ž 𝐡, 𝐢 βˆ’ π‘Œ 7 = π‘‘π‘π‘ž 𝐡, 𝐢 βˆ’ π‘Œ + π‘Œ 4 < |π‘Œ 4 | 𝑍 π‘Œ 7 7 ∞ t s 𝑍 π‘Œ 4 4 2

  3. Bipartite Matching Running Time Which max flow algorithm to use for bipartite matching? Generic augmenting path: O(m val(f*) ) = O(mn). Capacity scaling: O(m 2 log C ) = O(m 2 ). Shortest augmenting path: O(m n 1/2 ). Non-bipartite matching. Structure of non-bipartite graphs is more complicated, but well-understood. [Tutte-Berge, Edmonds-Galai] Blossom algorithm: O(n 4 ). [Edmonds 1965] Best known: O(m n 1/2 ). [Micali-Vazirani 1980] 3

  4. Edge Disjoint Paths

  5. Edge Disjoint Paths Problem Given a digraph G = (V, E) and two nodes s and t, find the max number of edge-disjoint s-t paths. Def. Two paths are edge-disjoint if they have no edge in common. Ex: communication networks. 2 5 s 3 6 t 4 7 5

  6. Max Flow Formulation Assign a unit capacitary to every edge. Find Max flow from s to t. 1 1 1 1 1 1 1 1 s t 1 1 1 1 1 1 Thm. Max number edge-disjoint s-t paths equals max flow value. Pf. Β£ Suppose there are k edge-disjoint paths 𝑄 > , … , 𝑄 @ . Set f(e) = 1 if e participates in some path 𝑄 A ; else set f(e) = 0. Since paths are edge-disjoint, f is a flow of value k. β–ͺ 6

  7. Max Flow Formulation 1 1 1 1 1 1 1 1 s t 1 1 1 1 1 1 Thm. Max number edge-disjoint s-t paths equals max flow value. Pf. β‰₯ Suppose max flow value is k Integrality theorem Þ there exists 0-1 flow f of value k. Consider edge (s, u) with f(s, u) = 1. β€’ by conservation, there exists an edge (u, v) with f(u, v) = 1 β€’ continue until reach t, always choosing a new edge This produces k (not necessarily simple) edge-disjoint paths. β–ͺ 7 We can return to u so we can have cycles. But we can eliminate cycles if desired

  8. Network Connectivity

  9. Network Connectivity Given a digraph G = (V, E) and two nodes s and t, find min number of edges whose removal disconnects t from s. Def. A set of edges F Í E disconnects t from s if all s-t paths uses at least one edge in F. Ex: In testing network reliability 2 5 s 3 6 t 4 7 9

  10. Network Connectivity using Min Cut Thm. [Menger 1927] The max number of edge-disjoint s-t paths is equal to the min number of edges whose removal disconnects t from s. Pf. i) We show that max number edge disjoint s-t paths = max flow. ii) Max-flow Min-cut theorem => min s-t cut = max-flow iii) For a s-t cut (A,B), cap(A,B) is equal to the number of edges out of A. In other words, every s-t cut (A,B) 2 5 A corresponds to cap(A,B) edges whose removal disconnects s from t. s 3 6 t So, max number of edge disjoint s-t paths 4 7 = min number of edges to disconnect s from t. 10

  11. Image Segmentation

  12. Image Segmentation Given an image we want to separate foreground from background β€’ Central problem in image processing. β€’ Divide image into coherent regions. 12

  13. Foreground / background segmentation Label each pixel as foreground/background. β€’ V = set of pixels, E = pairs of neighboring pixels. β€’ 𝑏 A β‰₯ 0 is likelihood pixel i in foreground. β€’ 𝑐 A β‰₯ 0 is likelihood pixel i in background. β€’ π‘ž A,F β‰₯ 0 is separation penalty for labeling one of i and j as foreground, and the other as background. Goals. Accuracy: if a i > b i in isolation, prefer to label i in foreground. Smoothness: if many neighbors of i are labeled foreground, we should be inclined to label i as foreground. Find partition (A, B) that maximizes: G 𝑏 A + G 𝑐 F βˆ’ G π‘ž A,F Foreground A∈4 F∈7 A,F ∈I A∈4,F∈7 Background 13

  14. Image Seg: Min Cut Formulation Difficulties: β€’ Maximization (as opposed to minimization) β€’ No source or sink β€’ Undirected graph Step 1: Turn into Minimization G 𝑏 A + G 𝑐 F βˆ’ G π‘ž A,F Maximizing A∈4 F∈7 A,F ∈I A∈4,F∈7 Equivalent to minimizing + G 𝑏 A + G 𝑐 βˆ’ G 𝑏 A βˆ’ G 𝑐 F + G π‘ž A,F F A∈J F∈J A∈4 F∈7 A,F ∈I A∈4,F∈7 Equivalent to minimizing + G 𝑏 F + G 𝑐 A + G π‘ž A,F F∈7 A∈4 A,F ∈I 14 A∈4,F∈7

  15. Min cut Formulation (cont’d) G' = (V', E'). Add s to correspond to foreground; p ij Add t to correspond to background Use two anti-parallel edges p ij instead of undirected edge. p ij p ij a j i j s t b i 𝐻′ 15

  16. Min cut Formulation (cont’d) Consider min cut (A, B) in G’. (A = foreground.) π‘‘π‘π‘ž 𝐡, 𝐢 = G 𝑏 F + G 𝑐 A + G π‘ž A,F F∈7 A∈4 A,F ∈I A∈4,F∈7 Precisely the quantity we want to minimize. p ij a j i j s t b i 𝐡 𝐻′ 16

  17. Project Selection

  18. Project Selection can be positive or negative Projects with prerequisites. β–  Set P of possible projects. Project v has associated revenue p v . – some projects generate money: create interactive e-commerce interface, redesign web page – others cost money: upgrade computers, get site license β–  Set of prerequisites E. If (v, w) Î E, can't do project v and unless also do project w. β–  A subset of projects A Í P is feasible if the prerequisite of every project in A also belongs to A. Project selection. Choose a feasible subset of projects to maximize revenue. 18

  19. Project Selection: Prerequisite Graph Prerequisite graph. β–  Include an edge from v to w if can't do v without also doing w. β–  {v, w, x} is feasible subset of projects. β–  {v, x} is infeasible subset of projects. w w v x v x feasible infeasible 19

  20. Project Selection: Min Cut Formulation Min cut formulation. β–  Assign capacity Β₯ to all prerequisite edge. β–  Add edge (s, v) with capacity -p v if p v > 0. β–  Add edge (v, t) with capacity -p v if p v < 0. β–  For notational convenience, define p s = p t = 0. u Β₯ w Β₯ Β₯ -p w p u Β₯ -p z p y y z s t p v Β₯ -p x Β₯ v x Β₯ 20

  21. Project Selection: Min Cut Formulation Claim. (A, B) is min cut iff A - { s } is optimal set of projects. β–  Infinite capacity edges ensure A - { s } is feasible. β–  Max revenue because: cap ( A , B ) p v ( βˆ’ p v ) = + βˆ‘ βˆ‘ v ∈ B : p v > 0 v ∈ A : p v < 0 p v p v = βˆ’ βˆ‘ βˆ‘ v : p v > 0 v ∈ A ο€± ο€² ο€³ constant w u A p u -p w s y z t p y Β₯ p v -p x Β₯ v x Β₯ 21

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend