networks
complement
find the complement of a graph
Calling Sequence
Parameters
Description
Examples
complement(G)
complement(G, H)
G
-
graph to be complemented
H
complement of G taken with respect to H
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](...).
with⁡networks:
G≔cycle⁡5:
H≔complement⁡G:
ends⁡H
1,3,1,4,2,4,2,5,3,5
K≔complete⁡5:
delete⁡edges⁡1,3,K,K:
Kc≔complement⁡G,K:
ends⁡Kc
1,4,2,4,2,5,3,5
See Also
GraphTheory
GraphTheory[GraphComplement]
networks(deprecated)[complete]
networks(deprecated)[cycle]
with
Download Help Document