This preview shows pages 1–10. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: CMSC 451: Network Flows Slides By: Carl Kingsford Department of Computer Science University of Maryland, College Park Based on Sections 7.1&7.2 of Algorithm Design by Kleinberg & Tardos. Network Flows • Our 4th major algorithm design technique (greedy, divideandconquer, and dynamic programming are the others). • A little different than the others: we’ll see an algorithm for one problem (and minor variants) that is so useful that we can apply to to many practical problems. • Called network flow . Network flow problem, e.g. 10 5 2 3 Suppose you want to ship natural gas from Alaska to Texas. There are pipes, each with a capacity. How can you send as much gas as possible? 3 7 8 7 1 3 4 8 10 12 10 Flow Network A flow network is a connected, directed graph G = ( V , E ). • Each edge e has a nonnegative, integer capacity c e . • A single source s ∈ V . • A single sink t ∈ V . • No edge enters the source and no edge leaves the sink. s u v t x w 20 10 30 10 10 30 10 20 Assumptions To repeat, we make these assumptions about the network: 1 Capacities are integers. 2 Every node has one edge adjacent to it. 3 No edge enters the source and no edge leaves the sink. These assumptions can all be removed. Flow Def. An st flow is a function f : E → R ≥ that assigns a real number to each edge. Intuitively, f ( e ) is the amount of material carried on the edge e . s u v t x w 20 10 30 20 5 30 10 20 10 10 5 15 15 5 10 Flow constraints Constraints on f : 1 ≤ f ( e ) ≤ c e for each edge e . (capacity constraints) 2 For each node v except s and t , we have: X e into v f ( e ) = X e leaving v f ( e ) . (balance constraints: whatever flows in, must flow out). v 10 3 2 7 4 Notation The value of flow f is: v ( f ) = X e out of s f ( e ) This is the amount of material that s is able to send out. Notation: • f in ( v ) = ∑ e into v f ( e ) • f out ( v ) = ∑ e leaving v f ( e ) Balance constraints becomes: f in ( v ) = f out ( v ) for all v 6∈ { s , t } Maximum Flow Problem Definition (Value) The value v ( f ) of a flow f is f out ( s )....
View
Full
Document
This note was uploaded on 01/13/2012 for the course CMSC 423 taught by Professor Staff during the Fall '07 term at Maryland.
 Fall '07
 staff

Click to edit the document details