Algorithm Analysis (CSC 301 2015F) : EBoards

CSC301.01 2015F, Class 31: Network Flows


Overview

Preliminaries

Admin

Extra Credit

Academic

Peer

Questions

The max-flow problem

Given a weighted, directed graph, and two labeled vertices find the most "information" (the max flow) from source to target.

Augmenting paths

Used for finding max-flow.

A path from source to target with only positive edge weights.

Incorrect algorithm

while augmenting paths exist
  choose one
  identify the least edge weight
  decrement every edge in the path by that weight
  increment every corresponding edge in the flow graph by that weight

Why is it incorrect? Make a graph in which picking an augmenting path makes it impossible to get the max flow.

The Ford-Fulkerson algorithm

while augmenting paths exist
  choose one
  identify the least edge weight
  decrement every edge in the path by that weight
  increment every back edge in the path by that weight
  increment every corresponding edge in the flow graph by that weight

Ford-Fulkerson is slow if you don't make good choices about which path to take.

Normal solution: Use DFS to find the path.

Bipartite matching

Two sets of vertices, L and R, with edges only between L and R (no edges within L, no edges within R).

Find maximal set of edges, M, s.t. each vertex in L is incident to at most one edge in M, each vertex in R is incident to at most on edge in M.

Solve this using Max Flow

Yay! Many of you could.