Graph with same nodes as but complementary connections to another
The Petersen graph (on the left) and its complement graph (on the right)
In the mathematical field of graph theory, the complement or inverse of a graphG is a graph H on the same vertices such that two distinct vertices are adjacent in Hif and only if they are not adjacent in G. That is, to generate the complement of a graph, one fills in all the missing edges required to form a complete graph, and removes all the edges that were previously there.[1]
The complement of the graph is not the set complement of the graph: only the edges are complemented.
Definitions
Let G = (V, E) be a simple undirected graph and let P consist of all pairs of distinct vertices in V. Then the simple undirected graphH = (V, P \ E) is the complement of G,[2] where P \ E is the relative complement of E in P.
Let G = (V, A) be a simple directed graph and let O consist of all ordered pairs of distinct vertices in V. Then the simple directed graph H = (V, O \ A) is the complement of G.
Let G be a simple undirected / directed graph, let K be the complete simple undirected / directed graph on the same number of vertices (i.e., all entries are unity except the diagonal entries which are zero), let and respectively be the adjacency matrices of G and K. Then the adjacency matrix of the complement H of G is: .
For graphs that allow self-loops (but not multiple adjacencies), the complement of a graph G may be defined by adding a self-loop to every vertex that does not have one in G, removing its self-loop from every vertex that has one in G, and otherwise using the same formula as above. However, this operation is different from the one for simple graphs, since applying it to a graph with no self-loop results in a graph with self-loops on all vertices.
Applications and examples
Several graph-theoretic concepts are related to each other via complementation:
Any induced subgraph of the complement graph of a graph G is the complement of the corresponding induced subgraph in G.
An independent set in a graph is a clique in the complement graph, and vice versa. This is a special case of the previous two properties, as an independent set is an edgeless induced subgraph and a clique is a complete induced subgraph.
The automorphism group of a graph is the automorphism group of its complement.
Several classes of graphs are self-complementary, in the sense that the complement of any graph in one of these classes is another graph in the same class.
Cographs are defined as the graphs that can be built up from single vertices by disjoint union and complementation operations. They form a self-complementary family of graphs: the complement of any cograph is another, different, cograph. For cographs of more than one vertex, exactly one graph in each complementary pair is connected, and one equivalent definition of cographs is that each of their connected induced subgraphs has a disconnected complement. Another, self-complementary, definition is that cographs are the graphs with no four-vertex path as an induced subgraph.[5]
Another self-complementary class of graphs is the class of split graphs, the graphs in which the vertices can be partitioned into a clique and an independent set. The same partition gives an independent set and a clique in the complement graph.[6]
The threshold graphs are the graphs formed by repeatedly adding either an independent vertex (one with no neighbors) or a universal vertex (adjacent to all previously-added vertices). These two operations are complementary and they generate a self-complementary class of graphs.[7]
Algorithmic aspects
In the analysis of algorithms on graphs, the distinction between a graph and its complement is an important one, because a sparse graph (one with a small number of edges compared to the number of pairs of vertices) will in general not have a sparse complement, and so an algorithm that takes time proportional to the number of edges on a given graph may take a much larger amount of time if the same algorithm is run on an explicit representation of the complement graph. Therefore, researchers have studied algorithms that perform standard graph computations on the complement of an input graph, using an implicit graph representation that does not require the explicit construction of the complement graph. In particular, it is possible to simulate either depth-first search or breadth-first search on the complement graph, in an amount of time that is linear in the size of the given graph, even when the complement graph may have a much larger size.[8] It is also possible to use these simulations to compute other properties concerning the connectivity of the complement graph.[8][9]
↑Golumbic, Martin Charles; Jamison, Robert E. (2006), "Rank-tolerance graph classes", Journal of Graph Theory, 52 (4): 317–340, doi:10.1002/jgt.20163, MR2242832 .
↑Kao, Ming-Yang; Occhiogrosso, Neill; Teng, Shang-Hua (1999), "Simple and efficient graph compression schemes for dense and complement graphs", Journal of Combinatorial Optimization, 2 (4): 351–359, doi:10.1023/A:1009720402326, MR1669307 .
This page is based on this Wikipedia article Text is available under the CC BY-SA 4.0 license; additional terms may apply. Images, videos and audio are available under their respective licenses.