GraphComplement
gives the graph complement of the graph g.
GraphComplement[{vw,…}]
uses rules vw to specify the graph g.
Details and Options
- GraphComplement is also known as edge-complementary graph.
- The graph complement has the same vertices and edges defined by two vertices being adjacent only if they are not adjacent in g.
- GraphComplement works with undirected graphs, directed graphs, multigraphs, and mixed graphs.
Examples
open allclose allScope (6)
GraphComplement works with undirected graphs:
Use rules to specify the graph:
GraphComplement works with large graphs:
Properties & Relations (7)
The complement of a CompleteGraph is an edgeless graph:
The complement of the complement is the original graph (for simple graphs):
The complement of the graph can be obtained from its adjacency matrix:
An independent vertex set of the graph is a clique of its complement graph:
The complement of the line graph of is a Petersen graph:
The graph union of any simple graph and its complement is a complete graph:
The graph intersection of any graph and its complement is an empty graph:
Text
Wolfram Research (2010), GraphComplement, Wolfram Language function, https://reference.wolfram.com/language/ref/GraphComplement.html (updated 2015).
CMS
Wolfram Language. 2010. "GraphComplement." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/GraphComplement.html.
APA
Wolfram Language. (2010). GraphComplement. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GraphComplement.html