I am studying the Ford-Fulkerson algorithm from Cormen's "Introduction to algorithms 2nd Edition". It is described in pseudo code for a directed graph G=(V, E) as follows where f is a flow defined on VxV
FORD-FULKERSON(G, s, t)
for each edge (u,v) in E(G)
do f[u, v] = 0
f[v, u] = 0
while there is a path p from s to t in the residual network Gf
do m = min{c(u, v)-f[u, v]: (u, v) is on p}
for each edge (u, v) on p
do f[u, v] = f[u, v] + m
f[v, u] = - f[u, v]
The residual graph Gf has the same vertices as G and have as edges those ordered pairs of vertices (u, v) for which c(u, v) - f(u, v) > 0. (Edit: c is a capacity function given when starting and extended to be zero on edges not part of the graph)
I am unsure about what to do in the case when there exists edges in "both directions", for example what happens in the algorithm when an edge and its reverse is in the graph. I am assuming that the c(u, v) in the minimum is for the original capacities in the graph. Do I somehow need to handle four edges in the residual graph for a case when both (a, b) and (b, a) are edges ? At the moment in my setup I can't directly handle parallel edges.
I found the following question on SO: Maximum flow - Ford-Fulkerson: Undirected graph But I am not clear on what the outcome is.