Open In App

Complement of Graph

Last Updated : 26 Feb, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

Consider a set A and let U represent the universal set. The complement of set A is defined as:

Ac = U - A

But what about graphs? A graph G ( V, E), which consists of a set of vertices V and edges E, can also have a complement. Is it possible to find the complement of a graph? The complement of a graph G, denoted as G′, shares the same set of vertices as G. However, the edges of G′ connect vertices that are not directly connected in G. In other words:

  • An edge between two vertices (v, e) exists in G′ if and only if there is no edge between (v, e) in G.

Thus, the complement of a graph G ( V, E) is denoted as G′ ( V, E′), where:

  • V is the set of vertices (remains unchanged),
  • E′ is the set of edges in the complement graph.

Key Point:

The number of vertices in the complement of a graph remains unchanged. Only the edges differ.

Example:

connect
Graph

Complement of this graph :

conn
Complement graph

In the above example in graph G there is a edge between (a, d),(a, c),(a, d).
Complement of Graph G is G' having edges between (a, b),(b, c),(b, d).

Properties of Complement of Graph

1. If E be the set of edges of graph G' then E(G')={ (u, v) | (u, v) ∉ E(G) }

connect


2. Union of graph G and its complement G' will give a complete graph(Kn).

connect

3. The intersection of two complement graphs has no edges, also known as null graph

conne

4. If G is a disconnected graph then its complement G' would be a connected graph.

conne

5. Order of a Graph and its Complement are Same. The order of the graph is the number of vertices in it.

Example:

Order of a graph G on a set of vertices is given by G={a, b, c, d, e} is number of vertices in the graph G i.e., 5.

6. Size of a Graph and its complement cannot be the same. The size of a graph is the number of edges in it.

Example:

Size of a graph G on the set of edges is G= {(b, d), (c, e) } is the number of edges in the graph i.e., 2.

Note:

1. If G be a graph with edges E and Kn denoting the complete graph, then the complement of graph G can be given by

E(G') = E(Kn)-E(G).

2. The sum of the Edges of a Complement graph and the main graph is equal to the number of edges in a complete graph, n is the number of vertices.

E(G')+E(G) = E(Kn) = n(n-1)÷2.

Self-Complementary Graphs

A self-complementary graph is a graph that is isomorphic to its own complement, meaning it has the same structure as its complement. In other words, the complement of the graph, where edges are swapped with non-edges, results in a graph that is identical to the original graph.

Examples of Self-Complementary Graphs:

  • The four-vertex path graph.
  • The five-vertex cycle graph.
four-vertex-path_

Despite these examples, there is no known general characterization for all self-complementary graphs.
This concept is useful in various areas of graph theory, though it remains an area of ongoing research.

Solved Questions on Complement of Graph

Question 1. Consider a simple graph G, where E denotes the edges and V denotes the vertices |E(G)|= 30, |E(G')|= 36. Find |V(G)|=?

Solution

We know,
E(G')+E(G)=E(Kn)=n(n-1)÷2.
⇒ 36+30=n(n-1)÷2
⇒ 66=n(n-1)÷2
⇒ 66×2=n2-n
⇒ n2-n-132=0
⇒ n2-12n+11n-132=0
⇒ n(n-12)+11(n-12)=0
⇒ (n-12)(n+11)=0
Therefore, n=12 and n=-11.
Since vertices cannot be negative
n=12.

Question 2. Consider a simple graph G, where E denotes the edges and V denotes the vertices |E(G)|= 12, |V(G)|= 8. Find the number of edges in complement graph |E(G')|= ?.

Solution

We know,
E(G')+E(G)=E(Kn)=n(n-1)÷2.
⇒ E(G') + 12 =8(8-1)÷2 [here n denotes number of vertices, i.e. given 8]
⇒ E(G')+12 = 8(7)÷2
⇒ E(G')+12= 4×7
⇒ E(G')+12=28
⇒ E(G')=28-12
⇒ E(G')=16.

Related article : Visualizing the complement of a graph using networkx


Next Article
Practice Tags :

Similar Reads