🧩 Constraint Solving POTD:Problem of the Day: Minimum Cost Flow Problem #49327
Closed
Replies: 1 comment
|
This discussion has been marked as outdated by Constraint Solving — Problem of the Day. A newer discussion is available at Discussion #49571. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Warning
threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.
Details
The threat detection engine failed to produce results.
Review the workflow run logs for details.
Problem Statement
The Minimum Cost Flow (MCF) problem asks: given a directed network where edges have both capacity and unit cost, find a flow that satisfies supply/demand constraints at nodes while minimizing total cost.
Formal definition:
G = (V, E)withnnodes andmedges(i,j) ∈ Ehas:u_ij(max flow allowed)c_ij(per unit of flow)i ∈ Vhas supply/demand:b_i(positive = supply, negative = demand)x_ijon each edge such that:Σ c_ij × x_ijis minimizedConcrete instance: A warehouse at node 1 supplies 100 units. Two distribution centers at nodes 2 and 3 each need 50 units. Edges: (1→2) cost 2, capacity 80; (1→3) cost 3, capacity 70; (2→3) cost 1, capacity 60. Optimal solution routes 50 directly to node 2, 50 from node 1 to node 3, using transshipment edge (2→3) if beneficial.
Why It Matters
Modeling Approaches
Approach 1: Linear Programming (Standard)
Formulate as a linear program:
Trade-offs:
Approach 2: Constraint Programming with Discrete Flow
Model as an integer CSP:
Trade-offs:
Example Model (MiniZinc Pseudo-Code)
Approach 3: Network Simplex (Specialized Algorithm)
The Network Simplex algorithm is the gold standard for MCF:
Key Techniques
1. Successive Shortest Path Algorithm
O(n2m log n)with Dijkstra2. Cost Scaling (Refined)
O(n log n × (m log n + nC))for cost range C3. Cycle Canceling
4. Decomposition & Symmetry Breaking
Challenge Corner
Question: In many real logistics networks, you have multiple types of goods (commodities) flowing through the same network, each with different supply/demand and possibly different costs on the same edge.
References
Next Problem: Tomorrow we explore a fresh challenge in constraint satisfaction!
All reactions