{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

netflow

netflow - CMSC 451 Network Flows Slides By Carl Kingsford...

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

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.

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

View Full Document
Network Flows Our 4th major algorithm design technique (greedy, divide-and-conquer, 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

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

View Full Document
Flow Network A flow network is a connected, directed graph G = ( V , E ). Each edge e has a non-negative, 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.

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

View Full Document
Flow Def. An s-t flow is a function f : E R 0 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 0 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

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

View Full Document
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 ).

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.

{[ snackBarMessage ]}

What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern