CSCE 3110 Data Structures & Algorithm Analysis Graphs (I) Reading: Chap.9, Weiss.

Slides:



Advertisements
Similar presentations
Thursday, March 14 Introduction to Network Flows
Advertisements

COMP 482: Design and Analysis of Algorithms
The minimum cost flow problem
EMIS 8374 Vertex Connectivity Updated 20 March 2008.
MAXIMUM FLOW Max-Flow Min-Cut Theorem (Ford Fukerson’s Algorithm)
CSCI 256 Data Structures and Algorithm Analysis Lecture 18 Some slides by Kevin Wayne copyright 2005, Pearson Addison Wesley all rights reserved, and some.
1 Maximum Flow w s v u t z 3/33/3 1/91/9 1/11/1 3/33/3 4/74/7 4/64/6 3/53/5 1/11/1 3/53/5 2/22/2 
1 Chapter 7 Network Flow Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
1 Chapter 7 Network Flow Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
1 COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf.
1 The Max Flow Problem. 2 Flow networks Flow networks are the problem instances of the max flow problem. A flow network is given by 1) a directed graph.
Advanced Algorithms Piyush Kumar (Lecture 2: Max Flows) Welcome to COT5405 Slides based on Kevin Wayne’s slides.
CS138A Network Flows Peter Schröder. CS138A Flow Networks Definitions a flow network G=(V,E) is a directed graph in which each edge (u,v)
CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Spring, 2001 Lecture 4 Tuesday, 2/19/02 Graph Algorithms: Part 2 Network.
Computational Methods for Management and Economics Carla Gomes Module 9a Network Models Terminology (Slides adapted from J.Orlin’s)
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2001 Lecture 4 Tuesday, 10/2/01 Graph Algorithms: Part 2 Network.
Feasible Flow Network : A digraph with a nonnegative capacity c(e) on each edge e and a distinguished source node s and sink node t. Flow: A flow f assign.
Princeton University COS 423 Theory of Algorithms Spring 2002 Kevin Wayne Greed: Shortest Path s 3 t
1 Discrete Optimization. 2 The relationship between counting techniques/graph theory and discrete optimization Adding a goal (objective function) to a.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2004 Lecture 5 Wednesday, 10/6/04 Graph Algorithms: Part 2.
CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow.
Chapter 26 Maximum Flow How do we transport the maximum amount data from source to sink? Some of these slides are adapted from Lecture Notes of Kevin.
Graph Theory Chapter 6 from Johnsonbaugh Article(6.1, 6.2)
Maximum Flow Chapter 26.
Discrete Structures for Computer Science Muad M. Abu-Ata Summer 2013.
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] =
Maximization of Network Survivability against Intelligent and Malicious Attacks (Cont’d) Presented by Erion Lin.
1 CPSC 320: Intermediate Algorithm Design and Analysis July 11, 2014.
. 1 Transportation and Assignment Problems. . 2 Applications Physical analog of nodes Physical analog of arcs Flow Communication systems phone exchanges,
Announcements Network Flow today, depending on how far we get, we will do String Matching on Wednesday Then Review for Final next Monday This week’s lab.
1 COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf.
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.
Graphs Discrete Structure CS203. Adjacency Matrix We already saw a way of representing relations on a set with a Boolean matrix: R digraph(R) M R1234.
Maximum Flow. p2. Maximum Flow A flow network G=(V, E) is a DIRECTED graph where each has a nonnegative capacity u.
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)
Overview of Graph Theory. Some applications of Graph Theory Models for communications and electrical networks Models for computer architectures Network.
Chapter 7 April 28 Network Flow.
15.082J & 6.855J & ESD.78J October 7, 2010 Introduction to Maximum Flows.
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.
Shortest Path Algorithm 2 Prof. Sin-Min Lee Department of Computer Science.
Taken from Kevin Wayne’s slides (Princeton University) COSC 3101A - Design and Analysis of Algorithms 13 Maximum Flow.
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 and Algorithm Analysis Lecture 20 Some slides by Kevin Wayne copyright 2005, Pearson Addison Wesley all rights reserved, and some.
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.
Fall 2003Maximum Flow1 w s v u t z 3/33/3 1/91/9 1/11/1 3/33/3 4/74/7 4/64/6 3/53/5 1/11/1 3/53/5 2/22/2 
CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow.
Markov Random Fields in Vision
Approximation Algorithms Duality My T. UF.
TU/e Algorithms (2IL15) – Lecture 8 1 MAXIMUM FLOW (part II)
Maximum Flow Chapter 26.
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.
Max Flow – Min Cut Problem
COMP 382: Reasoning about Algorithms
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.
Richard Anderson Lecture 23 Network Flow
Richard Anderson Lecture 23 Network Flow
Richard Anderson Lecture 21 Network Flow
Chapter 7 Network Flow Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
Lecture 21 Network Flow, Part 1
Richard Anderson Lecture 22 Network Flow
Lecture 21 Network Flow, Part 1
Richard Anderson Lecture 22 Network Flow
Presentation transcript:

CSCE 3110 Data Structures & Algorithm Analysis Graphs (I) Reading: Chap.9, Weiss

Network reliability. Distributed computing. Many many more... Maximum Flow and Minimum Cut Max flow and min cut. Two algorithmic problems. See Cormen et.al for more details Nontrivial applications / reductions. Network connectivity. Traffic control Data mining. Airline scheduling. Project selection. General scheduling

Max flow network: G = (V, E, s, t, u). (V, E) = directed graph, no parallel arcs. Two distinguished nodes: s = source, t = sink. u(e) = capacity of arc e. Max Flow Network Capacity s t

An s-t flow is a function f: E   that satisfies: For each e  E: 0  f(e)  u(e) (capacity) For each v  V – {s, t}: (conservation) Flows s t Capacity Flow

An s-t flow is a function f: E   that satisfies: For each e  E: 0  f(e)  u(e) (capacity) For each v  V – {s, t}: (conservation) Flows s t Capacity Flow Value = 4 MAX FLOW: find s-t flow that maximizes net flow out of the source.

An s-t flow is a function f: E   that satisfies: For each e  E: 0  f(e)  u(e) (capacity) For each v  V – {s, t}: (conservation) Flows MAX FLOW: find s-t flow that maximizes net flow out of the source. s t Value = Capacity Flow

An s-t flow is a function f: E   that satisfies: For each e  E: 0  f(e)  u(e) (capacity) For each v  V – {s, t}: (conservation) Flows MAX FLOW: find s-t flow that maximizes net flow out of the source. s t Value = Capacity Flow

Networks Flow Examples communication Network telephone exchanges, computers, satellites NodesArcs cables, fiber optics, microwave relays Flow voice, video, packets circuits gates, registers, processors wirescurrent mechanicaljointsrods, beams, springsheat, energy hydraulic reservoirs, pumping stations, lakes pipelinesfluid, oil financialstocks, currencytransactionsmoney transportation airports, rail yards, street intersections highways, railbeds, airway routes freight, vehicles, passengers chemicalsitesbondsenergy

An s-t cut is a node partition (S, T) such that s  S, t  T. The capacity of an s-t cut (S, T) is: Min s-t cut: find an s-t cut of minimum capacity. Cuts s t Capacity = 30

Cuts s t Capacity = 62 An s-t cut is a node partition (S, T) such that s  S, t  T. The capacity of an s-t cut (S, T) is: Min s-t cut: find an s-t cut of minimum capacity.

Cuts s t Capacity = 28 An s-t cut is a node partition (S, T) such that s  S, t  T. The capacity of an s-t cut (S, T) is: Min s-t cut: find an s-t cut of minimum capacity.

L1. Let f be a flow, and let (S, T) be a cut. Then, the net flow sent across the cut is equal to the amount reaching t. Flows and Cuts s t Value =

Flows and Cuts s t Value = 24 L1. Let f be a flow, and let (S, T) be a cut. Then, the net flow sent across the cut is equal to the amount reaching t.

Flows and Cuts s t Value = 24 0 L1. Let f be a flow, and let (S, T) be a cut. Then, the net flow sent across the cut is equal to the amount reaching t.

Let f be a flow, and let (S, T) be a cut. Then, Proof by induction on |S|. Base case: S = { s }. Inductive hypothesis: assume true for |S’| = k-1. consider cut (S, T) with |S| = k S = S'  { v } for some v  s, t, |S' | = k-1  cap(S', T') = | f |. adding v to S' increase cut capacity by Flows and Cuts s v t After s v t S' Before S

L2. Let f be a flow, and let (S, T) be a cut. Then, | f |  cap(S, T). Proof. Corollary. Let f be a flow, and let (S, T) be a cut. If |f| = cap(S, T), then f is a max flow and (S, T) is a min cut. Flows and Cuts s t S T

Max Flow and Min Cut Corollary. Let f be a flow, and let (S, T) be a cut. If |f| = cap(S, T), then f is a max flow and (S, T) is a min cut. s t Flow value = Cut capacity = 28

Max-Flow Min-Cut Theorem MAX-FLOW MIN-CUT THEOREM (Ford-Fulkerson, 1956): In any network, the value of the max flow is equal to the value of the min cut. s t Flow value = Cut capacity = 28

Max-Flow Min-Cut Theorem Intuitive Proof: Lemma 2  | f |  cap(S, T). Max for |f| is a certain cut C where Max|f| = C Min cut for cap(S,T) is a certain flow F where |f| = Min cut |f|  Max |f| = C  Min cut(S,T)  Max |f|  Min cut(S,T) L2  Max |f|  Min cut(S,T)  Max |f| = Min cut(S,T)