Flow network Flashcards
What is a flow network and what is the capacity of each arc?
Weighted, directed graph with nodes s, t where s is the source and t is the destination.
* s has only out neighbours
* t has only in neighbours
Capacity of arc = weight
What is the maximal flow problem?
Find max flow F from s -> t subject to:
- flow along arc does not exceed capacity
- Flow into vertex = flow out of vertex
What are the 3 variables defined for each arc?
cij = capacity
fij = flow
eij = excess capacity (c - f)
How do we find the maximum flow through a network?
Max flow = capacity of min cut
What is the goal of the minimum cost flow?
Let dij = unit cost of flow through arc
Goal is to minimise cost (flow * cost) subject to capacity restrictions and total flow = F
What are the steps for the minimum cost flow?
- Initialse total flow G = 0 and cost T = 0
- Create labels on each arc (f, e, d)
- P = shortest path from source to sink using cost, p = length of path
- b minimum of excess capacity on the arcs in P and F-G (flow needed - current flow) (This is the minimum between excess capacity in shortest path and how much flow is still needed to push.)
- Assign b uunits of flow to each arc in P and add bp to T.