GraphTheory
GraphComplement
construct complement of graph
Calling Sequence
Parameters
Description
Examples
GraphComplement(G)
G
-
graph
GraphComplement returns the complement of a graph G, that is the graph with the same vertex set as G, but whose edge (arc) set consists of the edges (arcs) not present in G.
withGraphTheory:
C≔CycleGraph5
C≔Graph 1: an undirected graph with 5 vertices and 5 edge(s)
G≔GraphComplementC
G≔Graph 2: an undirected graph with 5 vertices and 5 edge(s)
EdgesC
1,2,1,5,2,3,3,4,4,5
EdgesG
1,3,1,4,2,4,2,5,3,5
DrawGraphC
DrawGraphG
See Also
CycleGraph
Edges
Download Help Document