Fiveable

🧮Combinatorial Optimization Unit 5 Review

QR code for Combinatorial Optimization practice questions

5.2 Minimum cost flow problems

5.2 Minimum cost flow problems

Written by the Fiveable Content Team • Last updated August 2025
Written by the Fiveable Content Team • Last updated August 2025
🧮Combinatorial Optimization
Unit & Topic Study Guides

Minimum cost flow problems are a crucial part of network optimization, combining aspects of shortest path and maximum flow problems. These problems involve finding the most cost-effective way to send a specified amount of flow through a network while satisfying capacity constraints.

This topic explores the mathematical modeling, algorithms, and applications of minimum cost flow problems. We'll cover linear and integer programming formulations, specialized algorithms like cycle-canceling and successive shortest path, and real-world applications in supply chain optimization and transportation networks.

Definition and problem statement

  • Minimum cost flow problems form a crucial subset of network optimization in Combinatorial Optimization
  • These problems involve finding the most cost-effective way to send a specified amount of flow through a network while satisfying capacity constraints
  • Combines aspects of shortest path and maximum flow problems, making it a versatile tool for various optimization scenarios

Network flow terminology

  • Directed graph G = (V, E) represents the network structure
  • Nodes (V) symbolize sources, sinks, or transshipment points
  • Edges (E) represent connections between nodes with associated costs and capacities
  • Flow conservation ensures the amount entering a node equals the amount leaving (except for source and sink nodes)
  • Capacity constraints limit the amount of flow on each edge
  • Cost function assigns a cost per unit of flow on each edge

Minimum cost flow formulation

  • Objective function minimizes the total cost of flow across the network
  • Flow variables xijx_{ij} represent the amount of flow on edge (i, j)
  • Cost coefficients cijc_{ij} denote the cost per unit flow on edge (i, j)
  • Supply/demand values bib_i indicate the net flow required at each node
  • Capacity upper bounds uiju_{ij} limit the maximum flow on each edge
  • Mathematical formulation:
    • Minimize (i,j)Ecijxij\sum_{(i,j) \in E} c_{ij}x_{ij}
    • Subject to flow conservation and capacity constraints

Feasibility conditions

  • Total supply must equal total demand for a feasible solution to exist
  • Network must have sufficient capacity to accommodate the required flow
  • No isolated nodes should exist in the network
  • Feasibility can be checked using a maximum flow algorithm
  • Infeasibility may occur due to insufficient edge capacities or disconnected components

Mathematical modeling

  • Mathematical modeling translates the minimum cost flow problem into formal mathematical structures
  • These models enable the application of powerful optimization techniques and algorithms
  • Different formulations provide various perspectives and solution approaches for the problem

Linear programming formulation

  • Represents the minimum cost flow problem as a continuous optimization problem
  • Decision variables xijx_{ij} denote the flow on each edge (i, j)
  • Objective function minimizes the total cost: min(i,j)Ecijxij\min \sum_{(i,j) \in E} c_{ij}x_{ij}
  • Constraints include:
    • Flow conservation: j:(i,j)Exijj:(j,i)Exji=bi\sum_{j:(i,j) \in E} x_{ij} - \sum_{j:(j,i) \in E} x_{ji} = b_i for all iVi \in V
    • Capacity bounds: 0xijuij0 \leq x_{ij} \leq u_{ij} for all (i,j)E(i,j) \in E
  • Can be solved using general-purpose linear programming algorithms (simplex method)

Integer programming formulation

  • Restricts flow variables to integer values, reflecting indivisible units of flow
  • Objective function and constraints remain similar to the linear programming formulation
  • Additional constraint: xijZ+x_{ij} \in \mathbb{Z}^+ for all (i,j)E(i,j) \in E
  • Harder to solve than the linear programming relaxation
  • Branch-and-bound or cutting plane methods may be employed for solution

Network simplex method

  • Specialized version of the simplex algorithm for network flow problems
  • Exploits the network structure to achieve improved efficiency
  • Maintains a spanning tree structure as the basic feasible solution
  • Iterations involve:
    • Selecting an entering arc using reduced cost criteria
    • Updating the spanning tree and flow values
    • Performing pivot operations to move to an adjacent basic feasible solution
  • Typically faster than general-purpose linear programming solvers for network problems

Algorithms for minimum cost flow

  • Algorithms for minimum cost flow problems exploit the network structure
  • These methods aim to efficiently find optimal solutions by iteratively improving flow patterns
  • Different algorithms offer trade-offs between simplicity, theoretical complexity, and practical performance

Cycle-canceling algorithm

  • Starts with any feasible flow and iteratively improves it
  • Identifies negative cost cycles in the residual network
  • Pushes flow along negative cost cycles to reduce overall cost
  • Continues until no negative cost cycles remain
  • Guarantees optimality based on the negative cycle optimality criterion
  • May require many iterations for convergence, especially on large networks

Successive shortest path algorithm

  • Incrementally sends flow from sources to sinks along shortest paths
  • Utilizes node potentials to maintain reduced cost optimality
  • Steps include:
    1. Find a shortest path from a source to a sink in the residual network
    2. Augment flow along the path
    3. Update node potentials
    4. Repeat until all required flow is sent
  • Efficient for problems with small total flow values
  • Can be improved using capacity scaling techniques

Primal-dual algorithm

  • Simultaneously works on the primal (flow) and dual (potential) solutions
  • Maintains complementary slackness conditions throughout the algorithm
  • Iteratively adjusts node potentials and augments flow
  • Steps involve:
    1. Updating dual variables (node potentials)
    2. Constructing the admissible network
    3. Finding an augmenting path in the admissible network
    4. Augmenting flow and updating primal solution
  • Achieves polynomial time complexity
  • Provides insights into the relationship between primal and dual solutions

Capacity scaling algorithm

  • Improves the performance of the successive shortest path algorithm
  • Processes flow in batches, starting with large capacities and refining gradually
  • Uses a scaling parameter Δ, initially set to a power of 2 near the largest capacity
  • In each scaling phase:
    1. Consider only edges with residual capacity ≥ Δ
    2. Find augmenting paths and send flow in multiples of Δ
    3. Halve Δ and repeat until Δ < 1
  • Achieves better worst-case time complexity than basic successive shortest path
  • Practical performance often superior on large-scale problems
Network flow terminology, CS 360: Lecture 25: Maximal Flow - Ford-Fulkerson Algorithm

Special cases and variations

  • Special cases of minimum cost flow problems arise in various applications
  • These variations often have tailored algorithms or simplifications
  • Understanding these special cases helps in recognizing and solving related problems efficiently

Maximum flow vs minimum cost flow

  • Maximum flow focuses on maximizing the total flow from source to sink
  • Minimum cost flow considers both flow amount and associated costs
  • Maximum flow can be seen as a special case of minimum cost flow where:
    • All edge costs are zero
    • A supersource and supersink are added with infinite capacity edges
  • Ford-Fulkerson and push-relabel algorithms solve maximum flow efficiently
  • Minimum cost maximum flow combines both objectives:
    1. Find the maximum flow value
    2. Among maximum flows, find the one with minimum cost

Assignment problem as minimum cost flow

  • Bipartite matching problem with costs on edges
  • Network structure:
    • Left nodes represent workers, right nodes represent tasks
    • Edges indicate possible assignments with associated costs
    • Add source connected to all workers and sink connected to all tasks
  • All node supplies/demands and edge capacities are 1
  • Integer property guarantees integral optimal solutions
  • Can be solved efficiently using the Hungarian algorithm
  • Applications include job scheduling and resource allocation

Transportation problem as minimum cost flow

  • Involves shipping goods from supply nodes to demand nodes at minimum cost
  • Network structure:
    • Supply nodes (sources) with positive supply values
    • Demand nodes (sinks) with positive demand values
    • Edges represent shipping routes with costs and capacities
  • Total supply must equal total demand for feasibility
  • Can be solved using specialized transportation algorithms (northwest corner method)
  • Generalizes to the transshipment problem with intermediate nodes

Duality and optimality conditions

  • Duality theory provides powerful insights into minimum cost flow problems
  • Optimality conditions help verify solutions and guide algorithm design
  • Understanding these concepts is crucial for developing and analyzing efficient algorithms

Complementary slackness conditions

  • Link primal (flow) and dual (potential) solutions in optimality
  • For each edge (i, j):
    • If xij<uijx_{ij} < u_{ij}, then πjπi=cijπ_j - π_i = c_{ij}
    • If xij>0x_{ij} > 0, then πjπicijπ_j - π_i ≤ c_{ij}
  • πiπ_i represents the dual variable (potential) at node i
  • Provide a certificate of optimality when satisfied
  • Guide the design of primal-dual algorithms

Reduced cost optimality

  • Defines optimality in terms of reduced costs
  • Reduced cost of edge (i, j): cijπ=cijπj+πic_{ij}^π = c_{ij} - π_j + π_i
  • Optimality conditions:
    • cijπ0c_{ij}^π ≥ 0 for all edges (i, j) with xij<uijx_{ij} < u_{ij}
    • cijπ0c_{ij}^π ≤ 0 for all edges (i, j) with xij>0x_{ij} > 0
  • Allows for efficient optimality checking in algorithms
  • Forms the basis for the network simplex method

Negative cycle optimality criterion

  • States that a flow is optimal if and only if the residual network contains no negative cost cycles
  • Residual network includes forward edges with remaining capacity and backward edges with positive flow
  • Provides a global optimality condition
  • Used in cycle-canceling algorithms to iteratively improve solutions
  • Can be checked using shortest path algorithms (Bellman-Ford)

Applications and real-world examples

  • Minimum cost flow problems have numerous practical applications
  • These problems arise in various industries and domains
  • Understanding real-world examples helps in recognizing and modeling similar problems

Supply chain optimization

  • Optimizes the flow of goods from suppliers to consumers through distribution networks
  • Network components:
    • Nodes represent suppliers, warehouses, and retail locations
    • Edges represent transportation routes with associated costs and capacities
  • Objectives include minimizing transportation costs and meeting demand
  • Constraints involve production capacities, warehouse storage limits, and customer demands
  • Applications:
    • Manufacturing supply chains (automotive, electronics)
    • Food distribution networks
    • Global logistics optimization

Transportation networks

  • Models the movement of people or goods through various transportation modes
  • Network elements:
    • Nodes represent cities, intersections, or transportation hubs
    • Edges represent roads, railways, or shipping lanes with costs and capacities
  • Objectives may include minimizing travel time, fuel consumption, or environmental impact
  • Applications:
    • Urban traffic flow optimization
    • Public transit route planning
    • Freight transportation scheduling

Resource allocation problems

  • Distributes limited resources across various activities or projects
  • Network structure:
    • Source node represents the pool of available resources
    • Intermediate nodes represent activities or projects
    • Sink node collects unused resources
  • Edges model resource assignments with associated benefits or costs
  • Applications:
    • Project portfolio management
    • Budget allocation in organizations
    • Computer network resource management (bandwidth allocation)
Network flow terminology, CS 360: Lecture 15: Graph Theory

Computational complexity

  • Computational complexity analysis helps understand the efficiency of minimum cost flow algorithms
  • Different complexity classes exist for minimum cost flow algorithms
  • Trade-offs between worst-case guarantees and practical performance must be considered

Polynomial-time algorithms

  • Run in time bounded by a polynomial function of the input size
  • Provide theoretical guarantees of efficiency for large problem instances
  • Examples of polynomial-time minimum cost flow algorithms:
    • Network simplex method (polynomial on average, exponential worst-case)
    • Capacity scaling algorithm: O(mlogU(m+nlogn))O(m \log U (m + n \log n))
    • Cost scaling algorithm: O(nmlog(nC)log(nU))O(n m \log(nC) \log(nU))
  • nn: number of nodes, mm: number of edges, UU: largest capacity, CC: largest cost

Strongly polynomial algorithms

  • Run in polynomial time regardless of the numeric values in the input
  • Provide robust performance guarantees across all problem instances
  • Examples of strongly polynomial minimum cost flow algorithms:
    • Enhanced capacity scaling algorithm: O(mlogn(m+nlogn))O(m \log n (m + n \log n))
    • Double scaling algorithm: O(nmlognlog(nC))O(nm \log n \log(nC))
  • Theoretically significant but may not always outperform weakly polynomial algorithms in practice

Pseudopolynomial algorithms

  • Run in polynomial time when numeric input values are encoded in unary
  • May have exponential running time in the worst case for binary-encoded inputs
  • Examples in minimum cost flow context:
    • Successive shortest path algorithm without scaling: O(nU(m+nlogn))O(nU(m + n \log n))
    • Cycle-canceling algorithm: O(nmCU)O(nmCU)
  • Often simple to implement and may perform well on certain problem classes

Implementation considerations

  • Efficient implementation of minimum cost flow algorithms requires careful consideration of data structures and programming techniques
  • Choosing appropriate tools and libraries can significantly impact solution quality and runtime
  • Balancing theoretical efficiency with practical performance is crucial for real-world applications

Data structures for network representation

  • Adjacency list: efficient for sparse networks, supports fast edge iteration
    • Each node maintains a list of its outgoing edges
    • Allows quick access to neighbors and edge properties
  • Adjacency matrix: suitable for dense networks, enables constant-time edge lookup
    • 2D array representation with rows and columns representing nodes
    • Entry (i, j) contains edge information or indicates absence of edge
  • Incidence matrix: useful for certain algorithm implementations
    • Rows represent nodes, columns represent edges
    • Entries indicate edge-node relationships (+1 for outgoing, -1 for incoming)

Efficient algorithm implementations

  • Use priority queues for shortest path computations (Dijkstra's algorithm)
  • Implement efficient data structures for dynamic tree operations (network simplex)
  • Utilize bit-level operations for faster arithmetic in scaling algorithms
  • Employ caching strategies to avoid redundant computations
  • Consider parallel processing for large-scale problems:
    • Distribute network partitions across multiple processors
    • Parallelize independent computations (augmenting paths)

Software tools and libraries

  • General-purpose optimization solvers:
    • CPLEX: commercial solver with network flow capabilities
    • Gurobi: high-performance commercial optimizer
    • GLPK (GNU Linear Programming Kit): open-source linear programming solver
  • Specialized network flow libraries:
    • LEMON (Library for Efficient Modeling and Optimization in Networks): C++ library
    • NetworkX: Python library for complex network analysis, includes flow algorithms
    • OR-Tools: Google's operations research tools with network flow solvers
  • Graph processing frameworks:
    • GraphBLAS: matrix-based graph algorithms
    • Boost Graph Library: C++ library for graph algorithms

Extensions and generalizations

  • Extensions of the minimum cost flow problem address more complex scenarios
  • These generalizations often require specialized algorithms or adaptations of existing methods
  • Understanding these extensions helps in tackling a wider range of real-world optimization problems

Multicommodity flow problems

  • Involves multiple commodities sharing the same network
  • Each commodity has its own set of source-sink pairs and flow requirements
  • Edges have shared capacities across all commodities
  • Objective minimizes total cost across all commodities
  • Challenges:
    • Increased problem size and complexity
    • Potential fractional solutions in the integer case
  • Solution approaches:
    • Decomposition methods (Dantzig-Wolfe)
    • Approximation algorithms
    • Column generation techniques

Minimum cost flow with convex costs

  • Generalizes linear cost functions to convex cost functions on edges
  • Models economies or diseconomies of scale in network flows
  • Cost of flow on edge (i, j): fij(xij)f_{ij}(x_{ij}) where fijf_{ij} is convex
  • Solution methods:
    • Convex cost network simplex
    • Capacity scaling with convex cost approximation
    • Gradient descent algorithms
  • Applications:
    • Traffic flow with congestion effects
    • Production planning with non-linear costs

Dynamic minimum cost flow

  • Incorporates time-varying aspects of network flows
  • Network structure and parameters change over discrete time periods
  • Challenges include:
    • Handling time-expanded networks
    • Balancing flow over time with storage at nodes
    • Incorporating forecasting and uncertainty
  • Solution approaches:
    • Time-expanded network formulations
    • Rolling horizon methods
    • Stochastic programming techniques
  • Applications:
    • Dynamic traffic assignment
    • Time-dependent supply chain optimization
    • Energy distribution in smart grids
Pep mascot
Upgrade your Fiveable account to print any study guide

Download study guides as beautiful PDFs See example

Print or share PDFs with your students

Always prints our latest, updated content

Mark up and annotate as you study

Click below to go to billing portal → update your plan → choose Yearly → and select "Fiveable Share Plan". Only pay the difference

Plan is open to all students, teachers, parents, etc
Pep mascot
Upgrade your Fiveable account to export vocabulary

Download study guides as beautiful PDFs See example

Print or share PDFs with your students

Always prints our latest, updated content

Mark up and annotate as you study

Plan is open to all students, teachers, parents, etc
report an error
description

screenshots help us find and fix the issue faster (optional)

add screenshot

2,589 studying →