maximum flow

Download Maximum Flow

Post on 14-Jul-2015

1.849 views

Category:

Documents

0 download

Embed Size (px)

TRANSCRIPT

  • Maximum Flow

  • The Standard Maximum Flow Problem

    (flow-capacity) ,

    X Y . ,

  • Rephrasing in terms of graph theory

    - (directed graph)

    (capacity) c X, Y ,

    (flow) f

    f

  • Residual networks

    . : f c

    : f

  • Augmenting paths

    Residual network

    (path capacity)

  • How to Solve It (1/N)

    Figure 2b Residual network Augmenting path? X-A-C-Y

    C-Y 1

    1

  • How to Solve It (2/N)

    Figure 3b Residual network Augmenting path? X-A-C-B-D-E-Y

    C-B 1

    1

  • How to Solve It (3/N)

    Figure 1b Residual network Augmenting path?

  • The Ford-Fulkerson method

    //Assumption 1: capacities and flows of the edges being integers

    //Assumption 2: path-capacity being positive

    Begin

    x := 0

    create the residual network G(x)

    while there is some augmenting path from s to t in G(x)

    begin

    let P be a path from s to t in G(x)

    min:= Capacity of P

    Increase flow by min along P

    Update G(x)

    end

    End { the flow x is now maximum }

  • Correctness of the Ford-Fulkerson

    method Augmenting path maximum flow?

    Maximum flow Augmenting path

    Maximum flow

    Augmenting path maximum flow.

  • Choosing Good Augmenting Paths

    Ford-Fulkerson algorithm augmenting path maximum flow

    augmenting path 1

    (shortest path)

    (maximum path capacity)

  • Reduction of multiple-source/

    multiple sink

    dummy vertex

    super-source: .

    super-sink: . .

  • Eliminating vertex-capacities

    2,

    ,

  • Maximum Bipartite Matching

    11 ( X, Y )

    super-source: 1. 1

    A B

    super-sink

Recommended

View more >