 networks(deprecated)/random - Maple Help

networks

 random
 creates a random graph on a given number of vertices Calling Sequence G:=random(n) G:=random(n, m) G:=random(n, 'prob'=x) Parameters

 G - graph or network n - number of vertices required m - number of edges (optional) x - real number in [0,1] (optional, specify only if m not used) Description

 • Important: The networks package has been deprecated.Use the superseding command GraphTheory[RandomGraphs] instead.
 • This procedure generates a variety of different types of random graphs. If only one argument n is specified, this is taken to be the number of vertices, and each edge of the complete graph on n vertices is assumed to be present with a probability of 1/2.
 • Extra arguments can be used to specify the number of edges m or the specific independent probability x with which a given edges occurs.
 • If m is specified, a random n-vertex m-edge simple undirected graph is constructed.
 • If x is specified, each undirected edge is chosen for inclusion "independently" with probability x.
 • This routine is normally loaded by using the command with(networks), but it may also be referenced by using the full name networks[random](...). Examples

Important: The networks package has been deprecated.Use the superseding command GraphTheory[RandomGraphs] instead.

 > $\mathrm{with}\left(\mathrm{networks}\right):$
 > $G≔\mathrm{random}\left(4\right):$
 > $\mathrm{ends}\left(G\right)$
 $\left\{\left\{{1}{,}{2}\right\}{,}\left\{{1}{,}{3}\right\}{,}\left\{{1}{,}{4}\right\}{,}\left\{{2}{,}{4}\right\}\right\}$ (1)
 > $G≔\mathrm{random}\left(4,\mathrm{prob}=1\right):$
 > $\mathrm{ends}\left(G\right)$
 $\left\{\left\{{1}{,}{2}\right\}{,}\left\{{1}{,}{3}\right\}{,}\left\{{1}{,}{4}\right\}{,}\left\{{2}{,}{3}\right\}{,}\left\{{2}{,}{4}\right\}{,}\left\{{3}{,}{4}\right\}\right\}$ (2)
 > $G≔\mathrm{random}\left(5,8\right):$
 > $\mathrm{ends}\left(G\right)$
 $\left\{\left\{{1}{,}{2}\right\}{,}\left\{{1}{,}{3}\right\}{,}\left\{{1}{,}{4}\right\}{,}\left\{{1}{,}{5}\right\}{,}\left\{{2}{,}{4}\right\}{,}\left\{{2}{,}{5}\right\}{,}\left\{{3}{,}{4}\right\}{,}\left\{{3}{,}{5}\right\}\right\}$ (3)