Understanding the maximum flow problem


The max flow problem is another common class of problems that can be modeled as a graph. The goal is to find the maximum flow through a flow network, a directed graph in which each edge has a capacity and receives flow. The amount of flow in the edge is capped by its capacity. The flow network has two special nodes, the source and the sink, where the flow starts and terminates. For all nodes except the source and the sink, there is a conservation of flow, which means the amount of flow going into a node should be the same as the flow coming out of it. The following example shows a simple flow network with the source and sink nodes and the capacity of edges.

Loading Image

A flow network with source and sink nodes and the capacity of edges.

The goal of the maximum flow problem is to find the maximum flow that can go through the network from the source node to the sink node. To better understand why this is such an important problem, let's look at real-life examples that can be modeled as flow networks.

Liking the course? Check our discounted plans to continue learning.