networks(deprecated)/complement - Maple Help

networks

 complement
 find the complement of a graph

 Calling Sequence complement(G) complement(G, H)

Parameters

 G - graph to be complemented H - complement of G taken with respect to H

Description

 • Important: The networks package has been deprecated.  Use the superseding command GraphTheory[GraphComplement] instead.
 • The complement of a graph is computed and returned as a new graph.  If one argument is used, then the complement is relative to the complete graph on the same number of vertices.  If a second argument is given then the complement is relative to the given graph.
 • This routine is normally loaded via the command with(networks) but can also be referenced using the full name networks[complement](...).

Examples

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

 > $\mathrm{with}\left(\mathrm{networks}\right):$
 > $G≔\mathrm{cycle}\left(5\right):$
 > $H≔\mathrm{complement}\left(G\right):$
 > $\mathrm{ends}\left(H\right)$
 $\left\{\left\{{1}{,}{3}\right\}{,}\left\{{1}{,}{4}\right\}{,}\left\{{2}{,}{4}\right\}{,}\left\{{2}{,}{5}\right\}{,}\left\{{3}{,}{5}\right\}\right\}$ (1)
 > $K≔\mathrm{complete}\left(5\right):$
 > $\mathrm{delete}\left(\mathrm{edges}\left(\left\{1,3\right\},K\right),K\right):$
 > $\mathrm{Kc}≔\mathrm{complement}\left(G,K\right):$
 > $\mathrm{ends}\left(\mathrm{Kc}\right)$
 $\left\{\left\{{1}{,}{4}\right\}{,}\left\{{2}{,}{4}\right\}{,}\left\{{2}{,}{5}\right\}{,}\left\{{3}{,}{5}\right\}\right\}$ (2)