networks(deprecated)/dinic - Help

networks

 dinic
 augmenting-path flow algorithm

 Calling Sequence dinic(G, s, t, eset, comp) dinic(G, s, t, eset, comp, n)

Parameters

 G - graph or network s - source vertex for the flow t - sink vertex for the flow eset - name to return the set of saturated edges comp - name to return the set of vertices in eset n - integer upper bound for the flow

Description

 • Important: The networks package has been deprecated.  Use the superseding package GraphTheory instead.
 • This routine returns the maximum flow from s to t in G.  It is normally called by the routine flow() which performs some setup and preliminary analysis based on edge-connectivity calculations.
 • Edge weights of G are interpreted as capacities.
 • If a non-negative integer upper bound n is specified for the flow then the routine terminates after a flow of n in G is found even if greater flows are possible.
 • This routine is normally loaded via the command with(networks) but may also be referenced using the full name networks[dinic](...).

Examples

Important: The networks package has been deprecated.  Use the superseding package GraphTheory instead.

 > $\mathrm{with}\left(\mathrm{networks}\right):$
 > $G≔\mathrm{petersen}\left(\right):$
 > $\mathrm{dinic}\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}\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)