dinic max flow algorithm
play

Dinic Max Flow Algorithm Slides by Dominik Scheder Part I Dinic - PowerPoint PPT Presentation

Dinic Max Flow Algorithm Slides by Dominik Scheder Part I Dinic Algorithm in General Flow Networks 2 4 2 1 3 3 1 2 3 t 3 3 1 2 s 4 4 2 1 3 3 3 3 2 4 2 1 3 3 1 2 3 t 3 3 1 2 s 4 4 2 1 3 3 3 3


  1. 2 4 (2) (1) (2) 2 1 3 3 1 2 3 (1) (1) t (1) 3 3 1 2 s 4 4 2 1 3 3 3 3 Collect the flow of this phase.

  2. 2 4 (2) (1) (3) 2 1 3 3 (1) 1 2 3 (1) (1) t (1) 3 3 1 2 s 4 (1) 4 2 (1) 1 3 3 3 3 Collect the flow of this phase.

  3. 2 4 (2) (1) (3) 2 1 3 3 (1) 1 2 3 (1) (1) t (1) 3 3 1 2 s 4 (1) 4 2 (1) 1 3 3 3 3 Collect the flow of this phase.

  4. 2 4 (2) (1) (3) 2 1 3 3 (1) 1 2 3 (1) (1) t (1) 3 3 1 2 s 4 (1) 4 2 (1) 1 3 3 3 3 Collect the flow of this phase.

  5. 2 4 (2) (1) (3) 2 1 3 3 (1) 1 2 3 (1) (1) t (1) 3 3 1 2 s 4 (1) 4 2 (2) 1 3 3 (1) 3 (1) 3 (1) Collect the flow of this phase.

  6. 2 4 (2) (1) (3) 2 1 3 3 (1) 1 2 3 (1) (1) t (1) 3 3 1 2 s 4 (1) 4 2 (2) 1 3 3 (1) 3 (1) 3 (1) Collect the flow of this phase.

  7. 2 4 (2) (1) (3) 2 1 3 3 (1) 1 2 3 (1) (1) t (1) 3 3 1 2 s 4 (1) 4 2 (2) 1 3 3 (1) 3 (1) 3 (1) Collect the flow of this phase. Observation: Only edges on a shortest s - t -path carry flow.

  8. 2 4 (2) (1) (3) 2 1 3 3 (1) 1 2 3 (1) (1) t (1) 3 3 1 2 s 4 (1) 4 2 (2) 1 3 3 (1) 3 (1) 3 (1) Collect the flow of this phase. Observation: Only edges on a shortest s - t -path carry flow. Build residual network (and introduce back edges)!

  9. 2 1 1 2 3 1 1 2 3 1 2 1 1 t 1 3 3 2 s 4 4 2 2 1 2 1 1 1 2 2 1 Collect the flow of this phase. Observation: Only edges on a shortest s - t -path carry flow. Build residual network (and introduce back edges)!

  10. 2 4 2 1 3 3 1 2 3 t 3 3 1 2 s 4 4 2 1 3 3 3 3

  11. 2 4 2 1 3 3 1 2 3 t 3 3 1 2 s 4 4 2 1 3 3 3 3 dist ( s, t ) = 4 in the original network.

  12. 2 1 1 2 3 1 1 2 3 1 2 1 1 t 1 3 3 2 s 4 4 2 2 1 2 1 1 1 2 2 1 dist ( s, t ) = 4 in the original network.

  13. 2 1 1 2 3 1 1 2 3 1 2 1 1 t 1 3 3 2 s 4 4 2 2 1 2 1 1 1 2 2 1 dist ( s, t ) = 4 in the original network. Back edges go backwards. Not part of any length- 4 -path.

  14. 2 1 1 2 3 1 1 2 3 1 2 1 1 t 1 3 3 2 s 4 4 2 2 1 2 1 1 1 2 2 1 dist ( s, t ) = 4 in the original network. Back edges go backwards. Not part of any length- 4 -path. dist ( s, t ) > 4 in the residual network.

  15. Runtime Analysis

  16. dist ( s, t ) increases in every phase.

Recommend


More recommend