networks[flow] - finds the maximum flow in a network
|
Calling Sequence
|
|
flow(G, s, t)
flow(G, s, t, 'maxflow'=n)
flow(G, s, t, eset, comp)
flow(G, s, t, eset, comp, 'maxflow'=n)
|
|
Parameters
|
|
G
|
-
|
graph or network
|
s
|
-
|
source vertex for flow
|
t
|
-
|
sink vertex for flow
|
n
|
-
|
non-negative integer, upper bound for flow
|
eset
|
-
|
name for the set of saturated edges
|
comp
|
-
|
name for vertices in eset
|
|
|
|
|
Description
|
|
•
|
It returns the maximum flow from s to t in G.
|
•
|
If 'maxflow' option is set then flow of at most n in G is found.
|
•
|
This routine is normally loaded via the command with(networks) but may also be referenced using the full name networks[flow](...).
|
|
|
Examples
|
|
Important: The networks package has been deprecated. Use the superseding command GraphTheory[MaxFlow] instead.
>
|
|
>
|
|
>
|
|
| (1) |
>
|
|
| (2) |
>
|
|
| (3) |
>
|
|
>
|
|
| (4) |
>
|
|
| (5) |
|
|
Download Help Document
Was this information helpful?