BUILT-IN MATHEMATICA SYMBOL

# FindMinimumCostFlow

FindMinimumCostFlow[g, {sd1, sd2, ...}]
finds the minimum cost flow in the graph g with , , ... vertex supplies or demands.

FindMinimumCostFlow[g, s, t]
finds the minimum cost maximum flow between source vertex s and target vertex t in a graph g.

FindMinimumCostFlow[g, s, t, d]
finds the minimum cost flow between source s and target t, with the required flow d.

FindMinimumCostFlow[m, ...]
finds the minimum cost flow in a graph with cost matrix m.

FindMinimumCostFlow[data, ..., "property"]
returns the value of .

## Details and OptionsDetails and Options

• FindMinimumCostFlow finds a flow of minimum total cost from a set of supply vertices to a set of demand vertices in a graph with capacity constraints and edge costs.
• By default, the minimum total cost is returned.
• Matrices and SparseArray objects can be used in FindMinimumCostFlow.
• For undirected graphs, edges are taken to have flows in both directions at the same time and same capacities.
• Self-loops are ignored and parallel edges are merged.
• FindMinimumCostFlow[data, ..., "OptimumFlowData"] returns an OptimumFlowData object flowdata that can be used to extract additional properties, using the form flowdata["property"].
• FindMinimumCostFlow[data, ..., "property"] can be used to directly give the value of .
• Properties related to the optimal flow data include:
•  "CostValue" cost of the flow "EdgeList" list of edges contributing to the flow "FlowGraph" graph of vertices and edges contributing to the flow "FlowMatrix" matrix of edge flows between pairs of vertices "FlowValue" value of the flow "VertexList" list of vertices contributing to the flow
• The following options can be given:
•  EdgeCapacity Automatic capacity bounds for each edge EdgeCost Automatic cost per unit flow on edges
• With the default setting , the edge capacity of an edge is taken to be the EdgeCapacity in the graph g if available, otherwise Infinity.
• With the default setting , the cost per unit flow on an edge is taken to be the EdgeCost in the graph g if available, otherwise .

## ExamplesExamplesopen allclose all

### Basic Examples (2)Basic Examples (2)

Find the minimum cost flow between supply and demand:

 Out[1]=

Find the minimum cost maximum flow between two vertices in a graph:

 Out[2]=

Highlight the flow:

 Out[3]=