Richard Anderson Lecture 24 Network Flow Applications

Slides:



Advertisements
Similar presentations
Graph Partitioning Problems Lecture 18: March 14 s1 s3 s4 s2 T1 T4 T2 T3 s1 s4 s2 s3 t3 t1 t2 t4 A region R1 R2 C1 C2.
Advertisements

Approximation Algoirthms: Graph Partitioning Problems Lecture 17: March 16 s1 s3 s4 s2 T1 T4 T2 T3.
EMIS 8374 Vertex Connectivity Updated 20 March 2008.
CSE 421 Algorithms Richard Anderson Lecture 23 Network Flow Applications.
Graph-Based Image Segmentation
Foreground/Background Image Segmentation. What is our goal? To label each pixel in an image as belonging to either the foreground of the scene or the.
MAXIMUM FLOW Max-Flow Min-Cut Theorem (Ford Fukerson’s Algorithm)
HW2 Solutions. Problem 1 Construct a bipartite graph where, every family represents a vertex in one partition, and table represents a vertex in another.
CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow.
MRF Labeling With Graph Cut CMPUT 615 Nilanjan Ray.
Stereo Computation using Iterative Graph-Cuts
Comp 775: Graph Cuts and Continuous Maximal Flows Marc Niethammer, Stephen Pizer Department of Computer Science University of North Carolina, Chapel Hill.
CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow.
CSE 421 Algorithms Richard Anderson Lecture 24 Network Flow Applications.
CSEP 521 Applied Algorithms
Advanced Algorithms Piyush Kumar (Lecture 4: MaxFlow MinCut Applications) Welcome to COT5405.
CS774. Markov Random Field : Theory and Application Lecture 13 Kyomin Jung KAIST Oct
10/11/10 A. Smith; based on slides by E. Demaine, C. Leiserson, S. Raskhodnikova, K. Wayne Adam Smith Algorithm Design and Analysis L ECTURE 22 Network.
CSE 421 Algorithms Richard Anderson Lecture 24 Network Flow Applications.
Applications of the Max-Flow Min-Cut Theorem. S-T Cuts SF D H C A NY S = {SF, D, H}, T={C,A,NY} [S,T] = {(D,A),(D,C),(H,A)}, Cap [S,T] =
CSE 421 Algorithms Richard Anderson Lecture 26 Network Flow Applications.
Graph Cuts Marc Niethammer. Segmentation by Graph-Cuts A way to compute solutions to the optimization problems we looked at before. Example: Binary Segmentation.
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.
Max Flow – Min Cut Problem. Directed Graph Applications Shortest Path Problem (Shortest path from one point to another) Max Flow problems (Maximum material.
Maximum Flow Problem (Thanks to Jim Orlin & MIT OCW)
15.082J and 6.855J March 4, 2003 Introduction to Maximum Flows.
CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 25.
CSEP 521 Applied Algorithms Richard Anderson Lecture 8 Network Flow.
CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow.
Prof. Swarat Chaudhuri COMP 382: Reasoning about Algorithms Fall 2015.
CSE 421 Algorithms Richard Anderson Lecture 24 Network Flow Applications.
CSE 421 Algorithms Richard Anderson Lecture 21 Shortest Paths and Network Flow.
CS 312: Algorithm Design & Analysis Lecture #29: Network Flow and Cuts This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported.
Richard Anderson Lecture 26 NP-Completeness
Graph Theory and Algorithm 02
Richard Anderson Lecture 25 Min Cut Applications and NP-Completeness
Richard Anderson Lecture 23 Network Flow
Lecture 22 Network Flow, Part 2
December 1st – Graph Madness
Richard Anderson Lecture 23 Network Flow Applications
Haim Kaplan and Uri Zwick
Richard Anderson Lecture 27 Network Flow Applications
Richard Anderson Lecture 25 Open Pit Mining
Lecture 31: Graph-Based Image Segmentation
Richard Anderson Lecture 9 Dijkstra’s algorithm
Richard Anderson Lecture 9 Dijkstra’s algorithm
CSE 421 Richard Anderson Autumn 2016, Lecture 3
Richard Anderson Lecture 23 Network Flow
Richard Anderson Lecture 23 Network Flow
Richard Anderson Lecture 21 Network Flow
Problem Solving 4.
Richard Anderson Lecture 25 Network Flow Applications
WHAT YOU SHOULD HAVE ON YOUR DESK…
Richard Anderson Autumn 2016 Lecture 7
Project Selection Bin Li 10/29/2008.
Piyush Kumar (Lecture 6: MaxFlow MinCut Applications)
Network Flow.
Lecture 21 Network Flow, Part 1
Richard Anderson Lecture 22 Network Flow
Richard Anderson Winter 2019 Lecture 7
Lecture 21 Network Flow, Part 1
Richard Anderson Lecture 23 Network Flow Applications
Richard Anderson Lecture 20 Shortest Paths and Network Flow
Lecture 22 Network Flow, Part 2
Richard Anderson Lecture 24 Network Flow Applications
Richard Anderson Lecture 26 Open Pit Mining
Network Flow.
Richard Anderson Lecture 22 Network Flow
Vertex Covers and Matchings
CSE 421 Richard Anderson Autumn 2019, Lecture 3
Presentation transcript:

Richard Anderson Lecture 24 Network Flow Applications CSE 421 Algorithms Richard Anderson Lecture 24 Network Flow Applications

Today’s topics Image Segmentation Strip Mining Reading: 7.5, 7.6, 7.10-7.12

Minimum Cut Applications Image Segmentation Open Pit Mining / Task Selection Problem Reduction to Min Cut problem S, T is a cut if S, T is a partition of the vertices with s in S and t in T The capacity of an S, T cut is the sum of the capacities of all edges going from S to T

Image Segmentation

Separate Lion from Savana

Image analysis ai: value of assigning pixel i to the foreground bi: value of assigning pixel i to the background pij: penalty for assigning i to the foreground, j to the background or vice versa A: foreground, B: background Q(A,B) = S{i in A}ai + S{j in B}bj - S{(i,j) in E, i in A, j in B}pij

Pixel graph to flow graph s t

Mincut Construction s av pvu u v puv bv t

Open Pit Mining

Application of Min-cut Open Pit Mining Problem Task Selection Problem Reduction to Min Cut problem S, T is a cut if S, T is a partition of the vertices with s in S and t in T The capacity of an S, T cut is the sum of the capacities of all edges going from S to T

Open Pit Mining Each unit of earth has a profit (possibly negative) Getting to the ore below the surface requires removing the dirt above Test drilling gives reasonable estimates of costs Plan an optimal mining operation

Mine Graph -4 -3 -2 -1 -1 -3 3 -1 4 -7 -10 -2 8 3 -10

Determine an optimal mine -5 -3 -4 -4 2 -4 3 -1 -7 -10 -1 -3 -3 3 4 4 -3 -10 -10 -10 4 7 -2 -10 3 -10 -10 -10 -10 6 8 6 -3 -10 -10 -10 -10 -10 -10 1 4 4 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10

Generalization Precedence graph G=(V,E) Each v in V has a profit p(v) A set F is feasible if when w in F, and (v,w) in E, then v in F. Find a feasible set to maximize the profit -4 6 -2 -3 5 -1 -10 4

Min cut algorithm for profit maximization Construct a flow graph where the minimum cut identifies a feasible set that maximizes profit

Precedence graph construction Precedence graph G=(V,E) Each edge in E has infinite capacity Add vertices s, t Each vertex in V is attached to s and t with finite capacity edges

Find a finite value cut with at least two vertices on each side of the cut Infinite Finite t

The sink side of a finite cut is a feasible set No edges permitted from S to T If a vertex is in T, all of its ancestors are in T

Setting the costs If p(v) > 0, If p(v) < 0 If p(v) = 0 cap(v,t) = p(v) cap(s,v) = 0 If p(v) < 0 cap(s,v) = -p(v) cap(v,t) = 0 If p(v) = 0 3 3 1 1 -3 -1 -3 3 2 1 2 3 t

Minimum cut gives optimal solution Why? 2 2 -2 1 2 -2 1 1 2 1 t

Computing the Profit Cost(W) = S{w in W; p(w) < 0}-p(w) Benefit(W) = S{w in W; p(w) > 0} p(w) Profit(W) = Benefit(W) – Cost(W) Maximum cost and benefit C = Cost(V) B = Benefit(V)

Express Cap(S,T) in terms of B, C, Cost(T), Benefit(T), and Profit(T) Cap(S,T) = Cost(T) + Ben(S) = Cost(T) + Ben(S) + Ben(T) – Ben(T) = B + Cost(T) – Ben(T) = B – Profit(T)