networks(deprecated)/graphical - Maple Help

networks

 graphical
 tests whether a list of integers is graphical

 Calling Sequence graphical(intlist) graphical(intlist, 'MULTI')

Parameters

 intlist - list of non-negative integers 'MULTI' - specifies that multigraph is permitted

Description

 • Important: The networks package has been deprecated.  Use the superseding package GraphTheory instead.
 • This procedure tests whether intlist is the degree sequence of a simple graph (or multigraph with no loops if 'MULTI' is specified).
 • If intlist is graphical (multigraphical) the procedure call returns a list of edges for one realization of intlist as a graph. Otherwise it returns FAIL.
 • This routine is normally loaded via the command with(networks) but may also be referenced using the full name networks[graphical](...).

Examples

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

 > $\mathrm{with}\left(\mathrm{networks}\right):$
 > $\mathrm{new}\left(G\right):$
 > $\mathrm{addvertex}\left(1,2,3,4,5,6,7,G\right):$
 > $\mathrm{graphical}\left(\left[6,4,6,4,4,4,6\right]\right)$
 $\left[\left\{{1}{,}{7}\right\}{,}\left\{{1}{,}{3}\right\}{,}\left\{{1}{,}{5}\right\}{,}\left\{{1}{,}{4}\right\}{,}\left\{{1}{,}{6}\right\}{,}\left\{{1}{,}{2}\right\}{,}\left\{{3}{,}{7}\right\}{,}\left\{{6}{,}{7}\right\}{,}\left\{{4}{,}{7}\right\}{,}\left\{{5}{,}{7}\right\}{,}\left\{{2}{,}{7}\right\}{,}\left\{{2}{,}{3}\right\}{,}\left\{{3}{,}{5}\right\}{,}\left\{{3}{,}{4}\right\}{,}\left\{{3}{,}{6}\right\}{,}\left\{{2}{,}{6}\right\}{,}\left\{{4}{,}{5}\right\}\right]$ (1)
 > $\mathrm{addedge}\left(,G\right):$
 > $\mathrm{degreeseq}\left(G\right)$
 $\left[{4}{,}{4}{,}{4}{,}{4}{,}{6}{,}{6}{,}{6}\right]$ (2)
 > $\mathrm{new}\left(H\right):$
 > $\mathrm{addvertex}\left(1,2,3,4,5,6,7,H\right):$
 > $\mathrm{graphical}\left(\left[3,3,6,6,6,3,3\right],'\mathrm{MULTI}'\right)$
 $\left[\left\{{3}{,}{4}\right\}{,}\left\{{3}{,}{5}\right\}{,}\left\{{3}{,}{4}\right\}{,}\left\{{3}{,}{5}\right\}{,}\left\{{3}{,}{4}\right\}{,}\left\{{3}{,}{5}\right\}{,}\left\{{4}{,}{5}\right\}{,}\left\{{4}{,}{7}\right\}{,}\left\{{4}{,}{6}\right\}{,}\left\{{1}{,}{2}\right\}{,}\left\{{2}{,}{5}\right\}{,}\left\{{1}{,}{2}\right\}{,}\left\{{6}{,}{7}\right\}{,}\left\{{1}{,}{7}\right\}{,}\left\{{5}{,}{6}\right\}\right]$ (3)
 > $\mathrm{addedge}\left(,H\right):$
 > $\mathrm{vdegree}\left(3,H\right)$
 ${6}$ (4)
 > $\mathrm{graphical}\left(\left[5,4,3,2,1,1\right]\right)$
 ${\mathrm{FAIL}}$ (5)