/
CSE 421 Applications CSE 421 Applications

CSE 421 Applications - PowerPoint Presentation

calandra-battersby
calandra-battersby . @calandra-battersby
Follow
343 views
Uploaded On 2019-12-08

CSE 421 Applications - PPT Presentation

CSE 421 Applications Yin Tat Lee 1 2 Project Selection Given a DAG G V E representing precedence constraints on tasks a task points to its predecessors a profit value p ID: 769626

foreground cut capacity edges cut foreground edges capacity

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "CSE 421 Applications" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

CSE 421 ApplicationsYin Tat Lee 1

2 Project Selection Given a DAG G=(V,E) representing precedence constraints on tasks (a task points to its predecessors ) a profit value p(v) for each task vV (may be positive or negative)Find a set AV of tasks that is closed under predecessors, (i.e. if (u,v)E and uA then vA) that maximizes Profit(A)=SvA p(v) -1 4 3 12 10 8 -3 11 - 13 14 -5 -6 4 2 Each task points to its predecessor tasks

3 Extended Graph -1 4 3 12 10 8 -3 11 - 13 14 -5 -6 4 2 s t

4 Extended Graph G’ -1 4 3 12 10 8 -3 11 - 13 14 -5 -6 4 2 s t 5 10 For each vertex v If p ( v )  0 add ( s , v ) edge with capacity p ( v ) If p ( v )  0 add ( v , t ) edge with capacity –p ( v )

5 Extended Graph G’Want: Set capacities on edges of G so that for minimum s-t-cut in G’ , the set A=S-{s} satisfies precedence constraintshas maximum possible profit in GCut capacity with S={s} is just C=Sv: p(v)0 p(v)Profit(A)  C for any set ATo satisfy constraints, don’t want any original edges of G going forward across the minimum cutThat would correspond to a task in A= S-{ s} that had a predecessor not in A=S-{s}Set capacity of each of the edges of G to . 

6 Extended Graph G’ -1 4 3 12 10 8 -3 11 - 13 14 -5 -6 4 2 s t 5 10 Capacity C = S v : p(v)  0 p ( v )

7 Extended Graph G’ -1 4 3 12 10 8 -3 11 - 13 14 -5 -6 4 2 s t 5 10 Cut value = 13 + 3 + 2 + 3 + 4 = 13 + 3 + C - 4 - 8 - 10 - 11 - 12 - 14

8 Project Selection Claim Any s-t-cut in G’ such that A=S-{s} satisfies precedence constraints andhas capacity c(S,T)=C - SvA p(v) = C - Profit(A)Corollary A minimum cut in G’ yields an optimal solution A=S -{s } to the project selection problemAlgorithm Compute maximum flow f in G’, find the set S of nodes reachable from s in G’f and return S-{s} 

9 Proof of Claim A=S-{s} satisfies precedence constraints No edge of G crosses forward out of A since those edges have capacity Only forward edges cut are of the form ( v,t) for vA or (s,v) for vAThe (v,t) edges for vA contribute SvA:p(v)0 -p(v) = - SvA:p(v)0 p (v) The (s,v) edges for vA contribute SvA: p(v)0 p (v)=C-SvA: p(v)0 p(v)Therefore the total capacity of the cut is c(S,T ) = C - SvA p(v) =C-Profit(A)  

Image Segmentation Given an image we want to separate foreground from backgroundImportant problem in image processing. Divide image into coherent regions.10

Foreground / background segmentation Label each pixel as foreground/background. = set of pixels, = pairs of neighboring pixels. is the original image. means we prefer to label in foreground. is separation penalty for labeling one of and j as foreground, and the other as background.Goals:Find partition that minimizes: where is the foreground.  11

Min cut Formulation Add s to correspond to foreground;Add t to correspond to background;Use two anti-parallel edges instead of undirected edge.   12 p ij p ij p ij s t i j p ij if     if  

Min cut Formulation (cont’d) Consider min cut in G’. ( = foreground.)  13 Precisely, what we want to minimize.   s t i j p ij     if   if  

Reality The main difficulty is to come up with a good model.May want to have human interaction. Segmentation may be real-valued instead of {0,1}.There are many more than 1 objects.May need labeling.Augmenting path is not great for GPU. 14