Flow: how does it work?

162 Views Asked by At

How does flow work ? I don't understand what they did. For example, why in the edged marked by 3, in the solution it's written 1 ? Morover, a maximum flow is the number a flow or the then longest flow ?

enter image description here

1

There are 1 best solutions below

7
On BEST ANSWER

A flow from $s$ to $t$ is an assignment of values to the edges of the graph, but the flow has a value that indicates how much is flowing from $s$ to $t$.

There are algorithms you can run to calculate the flow network, and then see what the value is.

In your example, the top graph shows the capacities of each edge, and the bottom graph shows a max flow. The edge with 3 on it has a capacity of three, but in the given max flow, it can only transmit 1. We could come up with another max flow where it transmits two, but since $t$ only has an incoming capacity of 2, there's no max flow where that edge can transmit 3.

To think about capacities, imagine edges as pipes, with a size defined by their capacity. An edge with a capacity of 3 can transmit three units of stuff from one vertex to another. So if there's only one unit of stuff going through that edge in a max flow, it means that capacity in the network is limited somewhere else.

Wikipedia has decent writeups on flow networks and max flow problems.