lecture22 - Introduction to Algorithms...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
Introduction to Algorithms 6.046J/18.401J/SMA5503 Lecture 22 Prof. Charles E. Leiserson
Background image of page 1

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

View Full DocumentRight Arrow Icon
Introduction to Algorithms Day 38 L22.2 © 2001 by Charles E. Leiserson Flow networks Definition. A flow network is a directed graph G = ( V , E ) with two distinguished vertices: a source s and a sink t . Each edge ( u , v ) E has a nonnegative capacity c ( u , v ) . If ( u , v ) E , then c ( u , v ) = 0 . Example: s s t t 3 2 3 32 2 3 3 1 2 1
Background image of page 2
Introduction to Algorithms Day 38 L22.3 © 2001 by Charles E. Leiserson Flow networks Definition. A positive flow on G is a function p : V × V R satisfying the following: Capacity constraint: For all u , v V , 0 p ( u , v ) c ( u , v ) . Flow conservation: For all u V –{ s , t } , 0 ) , ( ) , ( = V v V v u v p v u p . The value of a flow is the net flow out of the source: V v V v s v p v s p ) , ( ) , ( .
Background image of page 3

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

View Full DocumentRight Arrow Icon
Introduction to Algorithms Day 38 L22.4 © 2001 by Charles E. Leiserson A flow on a network s s t t 1:3 2:2 2:3 1 : 2:3 1:2 1:2 2:3 1:3 0:1 2:2 positive flow capacity The value of this flow is 1 – 0 + 2 = 3 . Flow conservation (like Kirchoff’s current law): Flow into u is 2 + 1 = 3 . Flow out of u is 0 + 1 + 2 = 3 . u
Background image of page 4
Introduction to Algorithms Day 38 L22.5 © 2001 by Charles E. Leiserson The maximum-flow problem s s t t 2:3 2:2 2:3 1 : 2:3 1:2 2:2 3:3 0:3 0:1 2:2 The value of the maximum flow is 4 . Maximum-flow problem: Given a flow network G , find a flow of maximum value on G .
Background image of page 5

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

View Full DocumentRight Arrow Icon
Introduction to Algorithms Day 38 L22.6 © 2001 by Charles E. Leiserson Flow cancellation Without loss of generality, positive flow goes either from u to v , or from v to u , but not both.
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 19

lecture22 - Introduction to Algorithms...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online