{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

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

View Full Document Right Arrow Icon
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.
Image of page 1

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

View Full Document Right Arrow Icon
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 .
Image of page 2
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
Image of page 3

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

View Full Document Right Arrow Icon
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
Image of page 4
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.
Image of page 5

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

View Full Document Right Arrow Icon
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
Image of page 6
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
Image of page 7

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

View Full Document Right Arrow Icon
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 }
Image of page 8
Maximum Flow Problem Definition (Value) The value v ( f ) of a flow f is f out ( s ).
Image of page 9

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

View Full Document Right Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    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.

    Student Picture

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

  • Left Quote Icon

    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.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    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.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern