Minimum-cost flow problem
Definition

A flow network is a directed graph G = (V, E) {\displaystyle G=(V,E)} with a source vertex s ∈ V {\displaystyle s\in V} and a sink vertex t ∈ V {\displaystyle t\in V}, where each edge (u, v) ∈ E {\displaystyle (u,v)\in E} has capacity c (u, v) > 0 {\displaystyle c(u,v)>0}, flow f (u, v) {\displaystyle f(u,v)} and cost a (u, v) {\displaystyle a(u,v)}, with most minimum-cost flow algorithms supporting edges with negative costs. The cost of sending this flow along an edge (u, v) {\displaystyle (u,v)} is f (u, v) ⋅ a (u, v) {\displaystyle f(u,v)\cdot a(u,v)}. The problem requires an amount of flow d {\displaystyle d} to be sent from source s {\displaystyle s} to sink t {\displaystyle t}.

The definition of the problem is to minimize the total cost of the flow over all edges:

with the constraints
change_case:english_capital, oulipo:avoid_letter[t]