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:
GraphComplement of this graph :
Complement graphIn 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) }
2. Union of graph G and its complement G' will give a complete graph(Kn).
3. The intersection of two complement graphs has no edges, also known as null graph
4. If G is a disconnected graph then its complement G' would be a connected graph.
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.
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.
Similar Reads
What is Complete Graph
A complete graph is an undirected graph in which every pair of distinct vertices is connected by a unique edge. In other words, every vertex in a complete graph is adjacent to all other vertices. A complete graph is denoted by the symbol K_n, where n is the number of vertices in the graph. Character
3 min read
Coloring of Chordal Graphs
In mathematical graph theory, a chordal graph is one in which all cycles of four or more vertices have an edge called a chord. One of the most central structured representations used for network simplification is chordal or triangulated graphs. These graphs are subgraphs of complete graphs - and the
6 min read
Cliques in Graph
A clique is a collection of vertices in an undirected graph G such that every two different vertices in the clique are nearby, implying that the induced subgraph is complete. Cliques are a fundamental topic in graph theory and are employed in many other mathematical problems and graph creations. Des
7 min read
Biconnected graph
An undirected graph is called Biconnected if there are two vertex-disjoint paths between any two vertices. In a Biconnected Graph, there is a simple cycle through any two vertices. By convention, two nodes connected by an edge form a biconnected graph, but this does not verify the above properties.
15+ min read
Visualizing the complement of a graph using networkx
Given a graph G complement of the graph is obtained by removing the edges contained in G from the complete graph having the same number of nodes as G. Â Example: Initial Graph G: G The complement of G: G ComplementRealizing Complement using Python : We will use networkx.complement() function for our
2 min read
Types of Graphs with Examples
A graph is a mathematical structure that represents relationships between objects by connecting a set of points. It is used to establish a pairwise relationship between elements in a given set. graphs are widely used in discrete mathematics, computer science, and network theory to represent relation
9 min read
Dense Graph
Graphs are fundamental structures in computer science and mathematics used to model relationships between objects. Understanding the various types of graphs is essential for anyone working in fields like data analysis, networking, and algorithm design. One such type is the dense graph. In this artic
9 min read
Complete Graph using Networkx in Python
A complete graph also called a Full Graph it is a graph that has n vertices where the degree of each vertex is n-1. In other words, each vertex is connected with every other vertex. Example: Complete Graph with 6 edges: C_G6 Properties of Complete Graph: The degree of each vertex is n-1.The total nu
3 min read
Implementation of Graph in JavaScript
Implementing graphs in JavaScript is crucial for visualizing data structures and relationships. JavaScript provides various ways to create and manage graphs, including adjacency lists, adjacency matrices, and edge lists. This guide will cover the basics of graph implementation in JavaScript, demonst
6 min read
What is K-connected Graph?
A k-connected graph is a type of graph where removing k-1 vertices (and edges) from the graph does not disconnect it. In other words, there are at least k distinct paths between any two vertices in the graph, and the graph remains connected even if k-1 vertices or edges are removed. The parameter k
8 min read