
- Graph Theory - Home
- Graph Theory - Introduction
- Graph Theory - History
- Graph Theory - Fundamentals
- Graph Theory - Applications
- Types of Graphs
- Graph Theory - Types of Graphs
- Graph Theory - Simple Graphs
- Graph Theory - Multi-graphs
- Graph Theory - Directed Graphs
- Graph Theory - Weighted Graphs
- Graph Theory - Bipartite Graphs
- Graph Theory - Complete Graphs
- Graph Theory - Subgraphs
- Graph Theory - Trees
- Graph Theory - Forests
- Graph Theory - Planar Graphs
- Graph Theory - Hypergraphs
- Graph Theory - Infinite Graphs
- Graph Theory - Random Graphs
- Graph Representation
- Graph Theory - Graph Representation
- Graph Theory - Adjacency Matrix
- Graph Theory - Adjacency List
- Graph Theory - Incidence Matrix
- Graph Theory - Edge List
- Graph Theory - Compact Representation
- Graph Theory - Incidence Structure
- Graph Theory - Matrix-Tree Theorem
- Graph Properties
- Graph Theory - Basic Properties
- Graph Theory - Coverings
- Graph Theory - Matchings
- Graph Theory - Independent Sets
- Graph Theory - Traversability
- Graph Theory Connectivity
- Graph Theory - Connectivity
- Graph Theory - Vertex Connectivity
- Graph Theory - Edge Connectivity
- Graph Theory - k-Connected Graphs
- Graph Theory - 2-Vertex-Connected Graphs
- Graph Theory - 2-Edge-Connected Graphs
- Graph Theory - Strongly Connected Graphs
- Graph Theory - Weakly Connected Graphs
- Graph Theory - Connectivity in Planar Graphs
- Graph Theory - Connectivity in Dynamic Graphs
- Special Graphs
- Graph Theory - Regular Graphs
- Graph Theory - Complete Bipartite Graphs
- Graph Theory - Chordal Graphs
- Graph Theory - Line Graphs
- Graph Theory - Complement Graphs
- Graph Theory - Graph Products
- Graph Theory - Petersen Graph
- Graph Theory - Cayley Graphs
- Graph Theory - De Bruijn Graphs
- Graph Algorithms
- Graph Theory - Graph Algorithms
- Graph Theory - Breadth-First Search
- Graph Theory - Depth-First Search (DFS)
- Graph Theory - Dijkstra's Algorithm
- Graph Theory - Bellman-Ford Algorithm
- Graph Theory - Floyd-Warshall Algorithm
- Graph Theory - Johnson's Algorithm
- Graph Theory - A* Search Algorithm
- Graph Theory - Kruskal's Algorithm
- Graph Theory - Prim's Algorithm
- Graph Theory - Borůvka's Algorithm
- Graph Theory - Ford-Fulkerson Algorithm
- Graph Theory - Edmonds-Karp Algorithm
- Graph Theory - Push-Relabel Algorithm
- Graph Theory - Dinic's Algorithm
- Graph Theory - Hopcroft-Karp Algorithm
- Graph Theory - Tarjan's Algorithm
- Graph Theory - Kosaraju's Algorithm
- Graph Theory - Karger's Algorithm
- Graph Coloring
- Graph Theory - Coloring
- Graph Theory - Edge Coloring
- Graph Theory - Total Coloring
- Graph Theory - Greedy Coloring
- Graph Theory - Four Color Theorem
- Graph Theory - Coloring Bipartite Graphs
- Graph Theory - List Coloring
- Advanced Topics of Graph Theory
- Graph Theory - Chromatic Number
- Graph Theory - Chromatic Polynomial
- Graph Theory - Graph Labeling
- Graph Theory - Planarity & Kuratowski's Theorem
- Graph Theory - Planarity Testing Algorithms
- Graph Theory - Graph Embedding
- Graph Theory - Graph Minors
- Graph Theory - Isomorphism
- Spectral Graph Theory
- Graph Theory - Graph Laplacians
- Graph Theory - Cheeger's Inequality
- Graph Theory - Graph Clustering
- Graph Theory - Graph Partitioning
- Graph Theory - Tree Decomposition
- Graph Theory - Treewidth
- Graph Theory - Branchwidth
- Graph Theory - Graph Drawings
- Graph Theory - Force-Directed Methods
- Graph Theory - Layered Graph Drawing
- Graph Theory - Orthogonal Graph Drawing
- Graph Theory - Examples
- Computational Complexity of Graph
- Graph Theory - Time Complexity
- Graph Theory - Space Complexity
- Graph Theory - NP-Complete Problems
- Graph Theory - Approximation Algorithms
- Graph Theory - Parallel & Distributed Algorithms
- Graph Theory - Algorithm Optimization
- Graphs in Computer Science
- Graph Theory - Data Structures for Graphs
- Graph Theory - Graph Implementations
- Graph Theory - Graph Databases
- Graph Theory - Query Languages
- Graph Algorithms in Machine Learning
- Graph Neural Networks
- Graph Theory - Link Prediction
- Graph-Based Clustering
- Graph Theory - PageRank Algorithm
- Graph Theory - HITS Algorithm
- Graph Theory - Social Network Analysis
- Graph Theory - Centrality Measures
- Graph Theory - Community Detection
- Graph Theory - Influence Maximization
- Graph Theory - Graph Compression
- Graph Theory Real-World Applications
- Graph Theory - Network Routing
- Graph Theory - Traffic Flow
- Graph Theory - Web Crawling Data Structures
- Graph Theory - Computer Vision
- Graph Theory - Recommendation Systems
- Graph Theory - Biological Networks
- Graph Theory - Social Networks
- Graph Theory - Smart Grids
- Graph Theory - Telecommunications
- Graph Theory - Knowledge Graphs
- Graph Theory - Game Theory
- Graph Theory - Urban Planning
- Graph Theory Useful Resources
- Graph Theory - Quick Guide
- Graph Theory - Useful Resources
- Graph Theory - Discussion
Graph Theory - Complement Graphs
Complement Graph
In graph theory, the complement graph is derived from a given graph that has the same set of vertices as the original graph, but the edges are different. In the complement graph, there is an edge between two vertices if and only if there is no edge between those two vertices in the original graph.
Specifically, the complement graph of a given graph −
G=(V,E) is a graph G =(V,E )
where,
- The vertex set V is the same in both graphs.
- The edge set E contains exactly the edges that are not present in the original graph E, but would exist if they were added to the graph.
In other words, if there is an edge between two vertices in the original graph G, then there is no edge between them in the complement graph G, and vice versa.

Properties of Complement Graphs
The complement graph has several properties that make it a useful concept in graph theory. These properties are −
- Vertex Correspondence: The vertex set of the complement graph is identical to the vertex set of the original graph.
- Edge Connection: There is an edge between two vertices in the complement graph if and only if there is no edge between them in the original graph.
- Number of Edges: If a graph G has m edges and n vertices, the complement graph G' will have n(n-1)/2 - m edges, since this is the total number of possible edges in a complete graph minus the edges in G.
- Complements of Complements: The complement of the complement of a graph G is the original graph G, i.e., (G')'' = G.
Constructing a Complement Graph
To construct the complement graph of a given graph G, follow these steps −
-
Identify the vertex set V and edge set E of the original graph G:
Let G = (V, E) be a graph with vertex set V = {v1, v2, ..., vn} and edge set E consisting of pairs of vertices connected by edges.
-
Create the complement graph G' by including all possible edges between the vertices that are not present in the original graph:
In the complement graph G', for each pair of vertices (vi, vj) that do not have an edge in G, include the edge (vi, vj) in G'.
-
Ensure that the complement graph contains no self-loops (edges between a vertex and itself). These are not included in either the original graph or the complement graph:
Thus, for each vertex vi, there will be no edge (vi, vi) in the complement graph.
Example
Consider the following graph G:

- Step 1: Identify the vertex set and edge set of G: V = {A, B, C, D}, E = {(A, B), (B, C), (C, D)}
- Step 2: Construct the complement graph G': The complement graph will have the same vertices, but the edges will be those that are not in E. In this case, G' will have edges (A, C), (A, D), (B, D).
Thus, the complement graph G' would look like this:

In this example, edges are added between vertices that do not share an edge in the original graph G.
Applications of Complement Graphs
Complement graphs have various applications in graph theory and computer science, they are −
- Finding Independent Sets: In the complement graph, a clique corresponds to an independent set in the original graph. This can be useful for problems involving finding independent sets.
- Coloring Problems: The complement graph can be used to study the coloring properties of the original graph, especially in algorithms involving graph coloring.
- Network Design: Complement graphs can be used in network design problems where the complement graph represents alternative pathways or connections in a network.
- Graph Isomorphism: The complement graph can help in solving graph isomorphism problems by comparing the structure of the complement graphs.
In graph theory, a clique is a subset of vertices in a graph such that every two vertices in the subset are connected by an edge. In other words, a clique is a complete subgraph, where every possible edge exists between the vertices in the subset.
Special Types of Complement Graphs
Some special types of complement graphs arise from particular properties of the original graph. These are −
- Complement of a Complete Graph: The complement of a complete graph is an empty graph, as all vertices are already connected by edges.
- Complement of a Cycle Graph: The complement of a cycle graph forms a disconnected graph with multiple components.
- Complement of a Bipartite Graph: The complement of a bipartite graph is a complete bipartite graph, where each vertex in one set is connected to all vertices in the other set.
Complement of a Complete Graph
The complement of a complete graph Kn is an empty graph because every pair of vertices in a complete graph is connected by an edge. Therefore, the complement graph has no edges.
If the original graph G is a complete graph with n vertices, the complement graph G' will have no edges, as all pairs of vertices are already connected in G.
Complement of a Cycle Graph
The complement of a cycle graph Cn is a disconnected graph with multiple components. In a cycle graph, each vertex is connected to two other vertices, but the complement graph will connect vertices that are not adjacent in the cycle graph.
For example, the complement of a cycle graph with four vertices C4 will consist of two disconnected edges.

Complement of a Bipartite Graph
The complement of a bipartite graph G = (V1, V2, E) is a complete bipartite graph. In a bipartite graph, vertices are divided into two disjoint sets, and edges connect vertices in different sets. The complement graph will have all possible edges between the two sets, forming a complete bipartite graph.
