Richard Anderson Lecture 23 Network Flow Applications

Slides:



Advertisements
Similar presentations
COMP 482: Design and Analysis of Algorithms
Advertisements

1 Maximum flow sender receiver Capacity constraint Lecture 6: Jan 25.
Network Flow CS494/594 – Graph Theory Alexander Sayers.
CSE 421 Algorithms Richard Anderson Lecture 23 Network Flow Applications.
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.
Piyush Kumar (Lecture 6: MaxFlow MinCut Applications)
1 Chapter 7 Network Flow Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow.
7.7 Extensions to Max Flow. 2 Circulation with Demands Circulation with demands. n Directed graph G = (V, E). n Edge capacities c(e), e  E. n Node supply.
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.
CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow.
CSE 421 Algorithms Richard Anderson Lecture 24 Network Flow Applications.
CSEP 521 Applied Algorithms
CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 26.
CS774. Markov Random Field : Theory and Application Lecture 13 Kyomin Jung KAIST Oct
CSE 421 Algorithms Richard Anderson Lecture 24 Network Flow Applications.
Chapter 4 sections 1 and 2.  Fig. 1  Not connected  All vertices are even.  Fig. 2  Connected  All vertices are even.
CSE 421 Algorithms Richard Anderson Lecture 26 Network Flow Applications.
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.
Chapter 7 April 28 Network Flow.
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.
Chapter 7 May 3 Ford-Fulkerson algorithm Step-by-step walk through of an example Worst-case number of augmentations Edmunds-Karp modification Time complexity.
1 EE5900 Advanced Embedded System For Smart Infrastructure Static Scheduling.
CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 23.
CSEP 521 Applied Algorithms Richard Anderson Lecture 8 Network Flow.
1 Network Flow CSC401 – Analysis of Algorithms Chapter 8 Network Flow Objectives: Flow networks –Flow –Cut Maximum flow –Augmenting path –Maximum flow.
CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow.
1 Chapter 7 Network Flow Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
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.
Algorithms Classroom Activities Richard Anderson University of Washington July 3, 20081IUCEE: Algorithm Activities.
Maximum Flow c v 3/3 4/6 1/1 4/7 t s 3/3 w 1/9 3/5 1/1 3/5 u z 2/2
Maximum Flow Chapter 26.
Data Structures and Algorithms (AT70. 02) Comp. Sc. and Inf. Mgmt
CS4234 Optimiz(s)ation Algorithms
Lectures on Network Flows
Richard Anderson Lecture 23 Network Flow
Maximum Flow 9/13/2018 6:12 PM Presentation for use with the textbook, Algorithm Design and Applications, by M. T. Goodrich and R. Tamassia, Wiley, 2015.
Lecture 22 Network Flow, Part 2
CSCI 3160 Design and Analysis of Algorithms Tutorial 8
Edmonds-Karp Algorithm
Maximum Flow c v 3/3 4/6 1/1 4/7 t s 3/3 w 1/9 3/5 1/1 3/5 u z 2/2
Maximum Flow c v 3/3 4/6 1/1 4/7 t s 3/3 w 1/9 3/5 1/1 3/5 u z 2/2
Chapter 7 Network Flow Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
Network Flow and Connectivity in Wireless Sensor Networks
Richard Anderson Lecture 23 Network Flow Applications
Richard Anderson Lecture 27 Network Flow Applications
Richard Anderson Lecture 24 Network Flow Applications
Richard Anderson Lecture 25 Open Pit Mining
Richard Anderson Lecture 23 Network Flow
Richard Anderson Lecture 23 Network Flow
Richard Anderson Lecture 21 Network Flow
Richard Anderson Lecture 25 Network Flow Applications
Max Flow Min Cut, Bipartite Matching Yin Tat Lee
AB AC AD AE AF 5 ways If you used AB, then, there would be 4 remaining ODD vertices (C, D, E and F) CD CE CF 3 ways If you used CD, then, there.
Flow Networks General Characteristics Applications
Piyush Kumar (Lecture 6: MaxFlow MinCut Applications)
Algorithms (2IL15) – Lecture 7
Network Flow CSE 373 Data Structures.
EE5900 Advanced Embedded System For Smart Infrastructure
Maximum Flow c v 3/3 4/6 1/1 4/7 t s 3/3 w 1/9 3/5 1/1 3/5 u z 2/2
Lecture 21 Network Flow, Part 1
Richard Anderson Lecture 22 Network Flow
Lecture 21 Network Flow, Part 1
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 22 Network Flow
Presentation transcript:

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

Announcements Final Exam, March 18, 2:30-4:20 pm Practice Exams available

Today’s topics Network flow reductions Baseball Scheduling Multi source flow Reviewer Assignment Baseball Scheduling Image Segmentation Reading: 7.5, 7.6, 7.10-7.12

Network Flow Definitions Review Network Flow Definitions Flowgraph: Directed graph with distinguished vertices s (source) and t (sink) Capacities on the edges, c(e) >= 0 Problem, assign flows f(e) to the edges such that: 0 <= f(e) <= c(e) Flow is conserved at vertices other than s and t Flow conservation: flow going into a vertex equals the flow going out The flow leaving the source is a large as possible

Key Ideas for Network Flow Review Key Ideas for Network Flow Residual Graph for a Flow Augmenting a flow Ford Fulkerson Algorithm Max Flow / Min Cut Theorem Practical Flow Algorithms Modelling problems as Network Flow or Minimum Cut

Max Flow / Min Cut a d g s b e h t c f i Review 20/20 20/30 0/5 0/5 5/5 0/5 0/5 5/5 0/20 25/30 20/20 30/30 s b e h t 20/20 0/5 5/5 20/25 0/5 0/5 15/25 15/20 c f i 20/20 10/10

Multi-source network flow Sources s1, s2, . . ., sk Sinks t1, t2, . . . , tj Solve with Single source network flow

Review Bipartite Matching A graph G=(V,E) is bipartite if the vertices can be partitioned into disjoints sets X,Y A matching M is a subset of the edges that does not share any vertices Find a matching as large as possible

Converting Matching to Network Flow s t

Integrality Theorem 1:1 1:0.5 1:1 1:1 1:1 1:1 1:0 1:0.5 s t s t 1:0 1:0.5 1:1 1:1 1:1 1:1 1:1 1:0.5 Theorem: If all capacities are integers, then there exists a maximum flow where all edges are assigned integer valued flows

Resource Allocation: Assignment of reviewers A set of papers P1, . . ., Pn A set of reviewers R1, . . ., Rm Paper Pi requires Ai reviewers Reviewer Rj can review Bj papers For each reviewer Rj, there is a list of paper Lj1, . . ., Ljk that Rj is qualified to review

Baseball elimination Can the Dinosaurs win the league? Remaining games: AB, AC, AD, AD, AD, BC, BC, BC, BD, CD W L Ants 4 2 Bees Cockroaches 3 Dinosaurs 1 5 A team wins the league if it has strictly more wins than any other team at the end of the season A team ties for first place if no team has more wins, and there is some other team with the same number of wins

Baseball elimination Can the Fruit Flies win or tie the league? Remaining games: AC, AD, AD, AD, AF, BC, BC, BC, BC, BC, BD, BE, BE, BE, BE, BF, CE, CE, CE, CF, CF, DE, DF, EF, EF W L Ants 17 12 Bees 16 7 Cockroaches Dinosaurs 14 13 Earthworms 10 Fruit Flies 15

Assume Fruit Flies win remaining games Fruit Flies are tied for first place if no team wins more than 19 games Allowable wins Ants (2) Bees (3) Cockroaches (3) Dinosaurs (5) Earthworms (5) 18 games to play AC, AD, AD, AD, BC, BC, BC, BC, BC, BD, BE, BE, BE, BE, CE, CE, CE, DE W L Ants 17 13 Bees 16 8 Cockroaches 9 Dinosaurs 14 Earthworms 12 Fruit Flies 19 15

Remaining games AC, AD, AD, AD, BC, BC, BC, BC, BC, BD, BE, BE, BE, BE, CE, CE, CE, DE s AC AD BC BD BE CE DE E A B C D T

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 foreground from background

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