Flow conservation requires equal total inflow and outflow at every vertex other than the source and sink:Equivalently, the divergence of a flow is zero there.[ref]
FordFulkerson.java. Algorithms, 4th edition by Robert Sedgewick and others; Sedgewick and Wayne, FordFulkerson.java, excess and isFeasible methods, lines 138–175: incoming minus outgoing amount and zero excess at nonterminal vertices
This is a steady accounting condition: an intermediate vertex neither creates the routed resource nor accumulates it. Splitting is allowed; equality between individual incoming and outgoing edges is not required. For the running flow, the equation at is , or , and at it is , or .
Capacity constraints alone do not ensure flow conservation. For instance, changing only from to keeps every edge amount within its flow network edge capacity, but leaves an excess inflow of at and an excess outflow of at . It is therefore not a feasible flow. Changing all affected edge amounts together to restores both equations and gives flow value .
New to topics? Read the docs here!