stylistic:style_transfer, structural:expansion
Complexity

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) {\displaystyle O(Ef)} (see big O notation), where E {\displaystyle E} is the number of edges in the graph and f {\displaystyle f} is the maximum flow in the graph. This is because each augmenting path can be found in O (E) {\displaystyle O(E)} time and increases the flow by an integer amount of at least 1 {\displaystyle 1}, with the upper bound f {\displaystyle f}.

A variation of the Ford – Fulkerson algorithm with guaranteed termination and a runtime independent of the maximum flow value is the Edmonds–Karp algorithm, which runs in O (V E 2) {\displaystyle O(VE^{2})} time.