Richard Anderson Lecture 27 Network Flow Applications

Slides:



Advertisements
Similar presentations
Minimum Spanning Tree Sarah Brubaker Tuesday 4/22/8.
Advertisements

Network Flow CS494/594 – Graph Theory Alexander Sayers.
R. Johnsonbaugh Discrete Mathematics 5 th edition, 2001 Chapter 8 Network models.
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)
CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow.
Applications of Network Flow Problem. 7.5 Bipartite Matching.
CS/ENGRD 2110 Object-Oriented Programming and Data Structures Fall 2014 Doug James Lecture 17: Graphs.
Partitioning 1 Outline –What is Partitioning –Partitioning Example –Partitioning Theory –Partitioning Algorithms Goal –Understand partitioning problem.
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.
CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 26.
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.
Do Now 3/13/12 Take out HW from last night. Take out HW from last night.  Text p. 307, #2-32 evens Copy HW in your planner. Copy HW in your planner. 
1.4 and 1.5 Quiz on Friday!. When two lines intersect, they intersect in a ___________ Point.
Geometry: Plane Figures Chapter. point A point marks a location. A A B B line segment the part of the line between 2 points endpoints.
By Meli & Amy & Meggie & Bex. What is route inspection hmmmm??? Objective: Is to go along every single edge and end up back to where you started from.
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.
CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow.
Prof. Swarat Chaudhuri COMP 382: Reasoning about Algorithms Fall 2015.
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.
8-1 Building Blocks of Geometry Course 2 Warm Up Warm Up Lesson Presentation Lesson Presentation Problem of the Day Problem of the Day.
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.
Unit 3 Chinese Postman. Non - Eulerian Semi - Eulerian Eulerian.
南亚和印度.
The graph is neither Eulerian or Semi – Eulerian as it has 4 ODD vertices.
Algorithms Classroom Activities Richard Anderson University of Washington July 3, 20081IUCEE: Algorithm Activities.
Graphs Lecture 19 CS2110 – Spring 2013.
6.2 Properties of Parallelograms
Chapter 7 Network Flow Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
Richard Anderson Lecture 29 NP-Completeness and course wrap-up
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.
Combinations COURSE 3 LESSON 11-3
5.2 Similar Polygons Two congruent polygons are also similar polygons.
CSCE350 Algorithms and Data Structure
Richard Anderson Lecture 23 Network Flow Applications
CSE373: Data Structures & Algorithms Lecture 12: Minimum Spanning Trees Catie Baker Spring 2015.
CSE373: Data Structures & Algorithms Lecture 20: Minimum Spanning Trees Linda Shapiro Spring 2016.
Richard Anderson Lecture 24 Network Flow Applications
Chapter 9: Graphs Basic Concepts
Richard Anderson Lecture 23 Network Flow
Richard Anderson Lecture 23 Network Flow
Example A cable company want to connect five villages to their network which currently extends to the market town of Avonford. What is the minimum.
Richard Anderson Lecture 21 Network Flow
Richard Anderson Lecture 30 NP-Completeness
Geometry/Trig Name: __________________________
Richard Anderson Lecture 25 Network Flow Applications
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.
Planarity K4 (complete)
Piyush Kumar (Lecture 6: MaxFlow MinCut Applications)
Lecture 21 Network Flow, Part 1
NET 424: REAL-TIME SYSTEMS (Practical Part)
Richard Anderson Lecture 22 Network Flow
Lecture 21 Network Flow, Part 1
Kruskal’s Algorithm AQR.
Richard Anderson Lecture 23 Network Flow Applications
Richard Anderson Lecture 24 Network Flow Applications
Chapter 9: Graphs Basic Concepts
Richard Anderson Lecture 22 Network Flow
Lecture 23: Minimum Spanning Trees
Homework Solutions.
Presentation transcript:

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

Today’s topics More network flow reductions Airplane scheduling Image segmentation Baseball elimination

Airplane Scheduling Given an airline schedule, and starting locations for the planes, is it possible to use a fixed set of planes to satisfy the schedule. Schedule [segments] Departure, arrival pairs (cities and times) Approach Construct a circulation problem where paths of flow give segments flown by each plane

Compatible segments Segments S1 and S2 are compatible if the same plane can be used on S1 and S2 End of S1 equals start of S2, and enough time for turn around between arrival and departure times End of S1 is different from S2, but there is enough time to fly between cities

Graph representation Each segment, Si, is represented as a pair of vertices (di, ai, for departure and arrival), with an edge between them. Add an edge between ai and dj if Si is compatible with Sj. di ai ai dj

Setting up a flow problem 1,1 di ai 0,1 ai dj 1 -1 P’i Pi

Result The planes can satisfy the schedule iff there is a feasible circulation

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

Baseball elimination Can the Dung Beetles win the league? Remaining games: AB, AC, AD, AD, AD, BC, BC, BC, BD, CD W L Ants 4 2 Bees Cockroaches 3 Dung Beetles 1 5

Baseball elimination Can the Fruit Flies win 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 Dung Beetles 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) Dung Beetles (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 Dung Beetles 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

Network flow applications summary Bipartite Matching Disjoint Paths Airline Scheduling Survey Design Baseball Elimination Project Selection Image Segmentation