Note: This page has been translated by MathWorks. Click here to see

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Maximum flow in graph

`mf = maxflow(G,s,t)`

`mf = maxflow(G,s,t,algorithm)`

```
[mf,GF]
= maxflow(___)
```

```
[mf,GF,cs,ct]
= maxflow(___)
```

returns the maximum flow between
nodes `mf`

= maxflow(`G`

,`s,t`

)`s`

and `t`

. If graph `G`

is unweighted (that is, `G.Edges`

does not contain the variable
`Weight`

), then `maxflow`

treats all graph
edges as having a weight equal to 1.