networks(deprecated)/flow - Maple Help

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

 • Important: The networks package has been deprecated.  Use the superseding command GraphTheory[MaxFlow] instead.
 • 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.

 > $\mathrm{with}\left(\mathrm{networks}\right):$
 > $G≔\mathrm{petersen}\left(\right):$
 > $\mathrm{flow}\left(G,1,2,\mathrm{eset},\mathrm{comp}\right)$
 ${3}$ (1)
 > $\mathrm{eset}$
 $\left\{\left\{{1}{,}{2}\right\}{,}\left\{{1}{,}{5}\right\}{,}\left\{{1}{,}{6}\right\}{,}\left\{{2}{,}{3}\right\}{,}\left\{{2}{,}{8}\right\}{,}\left\{{3}{,}{4}\right\}{,}\left\{{4}{,}{7}\right\}{,}\left\{{5}{,}{9}\right\}{,}\left\{{6}{,}{7}\right\}{,}\left\{{8}{,}{9}\right\}\right\}$ (2)
 > $\mathrm{comp}$
 $\left\{{1}{,}{2}{,}{4}{,}{5}{,}{6}{,}{7}{,}{8}{,}{9}\right\}$ (3)
 > $\mathrm{eset}≔'\mathrm{eset}':$$\mathrm{comp}≔'\mathrm{comp}':$
 > $\mathrm{flow}\left(G,1,5,\mathrm{eset},\mathrm{comp},\mathrm{maxflow}=1\right)$
 ${1}$ (4)
 > $\mathrm{eset}$
 $\left\{\left\{{1}{,}{5}\right\}\right\}$ (5)