This page introduces the basic concepts of network flows.
Overview
A network is a special directed graph , distinguished from an ordinary directed graph by its capacities and source and sink.
-
Every edge in , namely , has a weight called its capacity, denoted by . When , we may assume .
-
There are two special vertices in : the source (source) and the sink (sink) ().
For a network , a flow is a function from the edge set to the integers or reals that satisfies the following properties.
- Capacity constraint: for every edge, the flow through that edge cannot exceed its capacity, that is, ;
- Flow conservation: except at the source and sink, the net flow at every vertex is . Here, the net flow at is defined as .
For a network and a flow on it, define 's flow value as 's net flow . As a consequence of flow conservation, this is also the opposite of 's net flow, namely .
For a network , if is a partition of (that is, and ), and , then is called a cut of separating and . The capacity of the – cut is defined as .
Common Problems
Common network-flow problems include, but are not limited to, the following types.
- Maximum-flow problem: for a network , assign a flow to each edge to obtain a suitable flow and make 's flow value as large as possible. Such a flow is called a maximum flow of .
- Minimum-cut problem: for a network , find a suitable – cut and make the total capacity of as small as possible. This total capacity is called the minimum cut of .
- Minimum-cost maximum-flow problem: for a network , assign a weight to each edge, called its cost, meaning the cost paid for sending one unit of flow through . Among all possible maximum flows of , the one with minimum total cost is called a minimum-cost maximum flow.
We will introduce these problems in detail in later chapters.
Example: 24 Network-Flow Problems
The 24 network-flow problems are a widely circulated problem set on the Chinese internet (LibreOJ/Luogu); they existed at least around 2010. The set introduced classic techniques for modeling other problems as network-flow problems. Due to the limitations of its era, these problems may not be the most representative network-flow problems, but they are still worth reading for readers interested in algorithm competitions.