lecture_13

# lecture_13 - Maximum flow To remember max flow = min cut...

This preview shows pages 1–13. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Maximum flow To remember: max flow = min cut Reading s Dasgupta: Chapter 7.2 s Cormen et al. : Chapter 26.1-2 ssignment 1 Assignment 1 s Average 29.4 / 50 (expectation: 30 – 35) s Max 45 / 50 s Difficulty rating: ~4 (expectation: 4) Mid-term (Friday 10:40 – 11:35) s Divide and conquer, graph algorithms, greedy algorithms, dynamic programming Networks and Flow s A flow network or simply network G = (V, E, c) is a directed graph in which every edge (u,v) has a capacity c(u,v) ≥ 0. G has two distinguished vertices: a source s and a sink t . s Example : v v 12 t v 4 v 2 3 1 s 16 9 14 4 20 7 10 13 Imagine an edge as a pipe. Capacity = liter per min. Flow A flow f on G assigns a real value to every edge in G (i.e., f: E b R) that satisfies two constraints: s Capacity constraint: For every edge (u,v) ∈ E, f (u,v) ≤ c(u,v). s Conservation constraint : zero or positive For every vertex v ∈ V – {s, t}, . y) f(v, v) f(x, E v) (x, E y) (v, ∑ ∑ ∈ ∈ = total inflow total outflow = v Example b Capacity constraint: For every edge (u,v) ∈ E, f(u,v) ≤ c(u,v). b Flow conservation constraint : For every vertex v ∈ V – {s, t}, . y) f(v, v) f(x, E v) (x, E y) (v, ∑ ∑ ∈ ∈ = t v 4 v 2 v 3 v 1 s 11/ 16 4/ 9 11/ 14 4/ 4 15/ 20 12/ 12 7/ 7 1/ 10 8/ 13 Value (size) of a flow s A flow f on G is a function that assigns a real value to every edge in G, i.e., f: E b R. s Value of the flow f : value(f), size(f), v(f) value(f) = ∑ ( s ,y) ∈ E f( s ,y) = ∑ (v, t ) ∈ E f(v, t ). B Example : value(f) = 19 t v 4 v 2 v 3 v 1 s 11/ 16 4/ 9 11/ 14 4/ 4 15/ 20 12/ 12 7/ 7 1/ 10 8/ 13 19 Maximum flow s Given G=(V, E, c), find a flow of G with the maximum value. s How to solve this problem? s Greedy algorithm : tart with some trivial flow of G, say, an empty flow. b Start with some trivial flow of G, say, an empty flow. b Repeatedly augment the current flow until the flow is maximum. s Questions : b How to systematically augment a flow of G. b How to determine whether the current flow is maximum. A path from s to t. s t v u 5/7 15/27 12/57 red vertical line shows total inflow; green vertical line shows total outflow. A small increase s v u 5/7 15/27 12/57 To increase the value of the flow, we increase the flow out of s by some very small value ε . t + ε Influx problem: total inflow > total outflow Push the excess flow along the path s t v u 5/7 15/27 12/57 + ε This edge hasn’t used up its capacity. Residual capacity = 27 – 15 = 12. Push the excess units out of u through this edge. Propagate the increase s v u 5/7 15/27 12/57 + ε t + ε Terminate the push at the sink s v u 5/7 15/27 12/57 t + ε + ε + ε We don't need to conserve the flow at the sink. How much to push? As much as possible 5/27 Note that ε cannot be larger than the smallest residual capacity on the path....
View Full Document

## This note was uploaded on 03/01/2010 for the course CS 1234 taught by Professor Chan during the Spring '10 term at University of the Bío-Bío.

### Page1 / 44

lecture_13 - Maximum flow To remember max flow = min cut...

This preview shows document pages 1 - 13. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online