# All Science Fair Projects

## Science Fair Project Encyclopedia for Schools!

 Search    Browse    Forum  Coach    Links    Editor    Help    Tell-a-Friend    Encyclopedia    Dictionary

# Science Fair Project Encyclopedia

For information on any area of science that interests you,
enter a keyword (eg. scientific method, molecule, cloud, carbohydrate etc.).
Or else, you can start by choosing any of the categories below.

# Ford-Fulkerson algorithm

The Ford-Fulkerson algorithm (named for L. R. Ford and D. R. Fulkerson) computes the maximum flow in a flow network.

It works by finding a flow augmenting path in the graph. By adding the flow augmenting path to the flow already established in the graph, the maximum flow will be reached when no more flow augmenting paths can be found in the graph. However, there is no certainty that this situation will ever be reached, so the best that can be guaranteed is that the answer will be correct if the algorithm terminates. In the case that the algorithm runs forever, the flow might not even converge towards the maximum flow. However, this situation only occurs with irrational flow values. When the capacities are integers, the runtime of Ford-Fulkerson is bounded by O(E*f), where E is the number of edges in the graph and f is the maximum flow in the graph. This is because each augmenting path can be found in O(E) time and increases the flow by an integer amount which is at least 1.

A variation of the Ford-Fulkerson algorithm with guaranteed termination and a runtime independent of the maximum flow value is the Edmonds-Karp algorithm.

## Pseudocode:

• let G be the input graph.
• initialize an array f such that f[e] = 0 for all edges e in G
• while there exists an s -> t path in the residual graph
• choose some path p
• augment(f, p)
• update residual graph
• augment(array f, path p):
• c = lowest capacity edge on p
• for each edge e on p
• if e if a forward edge
• f[e] += c
• if e is a backwards edge
• f[e] -= c