Selected Reading

Graph Theory - Disconnected Graphs



Disconnected Graphs

In graph theory, a disconnected graph is a graph in which not all pairs of vertices are connected by a path. In other words, a graph is disconnected if there exist at least two vertices that cannot be reached by any sequence of edges.

This means that the graph consists of two or more disconnected subgraphs, also known as connected components.

Disconnected Graph

Characteristics of Disconnected Graphs

Following are the major characteristics of a disconnected graph −

  • No Path Between Some Vertices: In a disconnected graph, there are at least two vertices where no path exists between them.
  • Multiple Components: A disconnected graph consists of two or more components. Each component is itself a connected graph.
  • Zero or More Isolated Vertices: An isolated vertex is one that is not connected to any other vertex. A disconnected graph can contain isolated vertices.
  • Weak Connectivity in Directed Graphs: In directed graphs (digraphs), a graph is weakly disconnected if, by ignoring the direction of the edges, the graph becomes disconnected.

Properties of Disconnected Graphs

Disconnected graphs have several important properties that help in analyzing their structure −

  • Disconnected Components: The graph is divided into disconnected components, which are subgraphs where there is a path between every pair of vertices in the subgraph.
  • Articulation Points: Vertices whose removal can increase the number of disconnected components.
  • Bridges: Edges whose removal increases the number of disconnected components.
  • Graph with Isolated Vertices: A disconnected graph may contain isolated vertices, which do not connect to any other vertices in the graph.

Types of Disconnected Graphs

Disconnected graphs can be classified into several types based on their structure and the relationships between their components −

Disconnected Undirected Graph

An undirected graph is disconnected if it consists of two or more disconnected components. Each component is a connected graph, but there is no path between vertices of different components.

Disconnected Undirected Graph

Disconnected Directed Graph

A directed graph (digraph) is disconnected if it has two or more components, with no directed paths between them. These components are directed subgraphs, where each subgraph may or may not have directed paths within itself.

Disconnected Directed Graph

Disconnected Graph with Isolated Vertices

In some disconnected graphs, there may be isolated vertices that are not connected to any other vertex. These vertices form their own components but are not part of any larger connected subgraph.

Disconnected Graph Isolated Vertices

Algorithms to Check Disconnected Graphs

We can use various algorithms to check if a graph is disconnected −

  • Breadth-First Search (BFS)
  • Depth-First Search (DFS)
  • Union-Find Algorithm

Breadth-First Search (BFS)

In BFS, starting from a selected vertex, we explore all its neighbors and then move to the next level of neighbors. If some vertices are left unexplored, the graph is disconnected.

In the following example, we check for disconnectedness using BFS −

1 - 2   4
|
3

Starting from vertex A, BFS visits vertices 1, 2, and 3, but vertex 4 is left unvisited, indicating the graph is disconnected.

Depth-First Search (DFS)

In DFS, we explore as far along each branch as possible before backtracking. If DFS fails to visit all vertices, the graph is disconnected.

In the following example, we check for disconnectedness using DFS −

A - B   C
|
D

Starting from vertex A, DFS visits vertices A, B, and D, but vertex C is not visited, confirming the graph is disconnected.

Union-Find Algorithm

The Union-Find algorithm groups vertices into disjoint sets. If the graph has more than one set, it is disconnected.

In the following example, we check for disconnectedness using the Union-Find algorithm −

X - Y   K
|
Z

Union-Find detects two disjoint sets: {X, Y, Z} and {K}, confirming that the graph is disconnected.

Applications of Disconnected Graphs

Disconnected graphs have various applications across different fields −

  • Network Reliability: Analyzing the reliability of communication and transportation networks, where disconnection might indicate failure points or areas requiring improvement.
  • Social Networks: Identifying isolated communities or individuals within larger social networks.
  • Computational Biology: Studying biological networks where certain sub-networks may not be connected to others.
  • Computer Science: Algorithms for identifying disconnected components, analyzing sparse data structures, and studying distributed systems.
  • Geography: Identifying isolated regions or territories in geographical studies, such as regions cut off from the rest due to natural barriers.
Advertisements