Complement graph
In the mathematical field of graph theory, the complement or inverse of a graph is a graph on the same vertices such that two distinct vertices are adjacent in if and only if they are not adjacent in. 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.
The complement of the graph is not the set complement of the graph: only the edges are complemented.
Definitions
Let be a simple undirected graph and let consist of all pairs of distinct vertices in. Then the simple undirected graph is the complement of, where is the relative complement of in.Let be a simple [directed graph] and let consist of all ordered pairs of distinct vertices in. Then the simple directed graph is the complement of.
Let be a simple undirected / directed graph, let be the complete simple undirected / directed graph on the same number of vertices, let and respectively be the adjacency matrices of and. Then the adjacency matrix of the complement of is:.
The complement is not defined for multigraphs.
For graphs that allow self-loops, the complement of a graph may be defined by adding a self-loop to every vertex that does not have one in, removing its self-loop from every vertex that has one in, 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:- The complement of an edgeless graph is a complete graph, and vice versa.
- Any induced subgraph of the complement graph of a graph is the complement of the corresponding induced subgraph in.
- 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.
- The complement of every triangle-free graph is a claw-free graph, but the reverse is not true.
Self-complementary graphs and graph classes
A self-complementary graph is a graph that is isomorphic to its own complement. Examples include the four-vertex path graph and five-vertex cycle graph. There is no known characterization of self-complementary graphs.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.
- Perfect graphs are the graphs in which, for every induced subgraph, the chromatic number equals the size of the maximum clique. The fact that the complement of a perfect graph is also perfect is the perfect graph theorem of László Lovász.
- 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.
- 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.
- The threshold graphs are the graphs formed by repeatedly adding either an independent vertex or a universal vertex. These two operations are complementary and they generate a self-complementary class of graphs.