Selected Reading

Graph Theory - Connected Graphs



Connected Graphs

In graph theory, a connected graph is one where there is a path between every pair of vertices. This means that, for any two vertices u and v in the graph, you can find a sequence of edges that connects them. Connected graphs can be undirected or directed.

Connected Graph

This graph is connected because there is a path between every pair of vertices.

Characteristics of Connected Graphs

Following are the major characteristics of a connected graph −

  • Path Existence: For any two vertices "u" and "v" in the graph, there exists at least one path connecting them. This is the fundamental property of connected graphs
  • Single Component: A connected graph consists of a single component, meaning all vertices are reachable from any other vertex within the same graph. In other words, there are no isolated vertices or disconnected subgraphs.
  • Connectivity in Directed Graphs: In directed graphs (digraphs), a graph is considered strongly connected if there is a directed path from any vertex to every other vertex. It is considered weakly connected if replacing all directed edges with undirected edges makes the graph connected.

Properties of Connected Graphs

Connected graphs have several important properties that are useful in graph analysis −

  • Connectivity: The minimum number of vertices or edges that need to be removed to disconnect the graph.
  • Connected Components: The maximal connected subgraphs of a graph.
  • Articulation Points: Vertices whose removal increases the number of connected components.
  • Bridges: Edges whose removal increases the number of connected components.

Types of Connected Graphs

In graph theory, connected graphs can be further classified based on specific properties and levels of connectivity. Following are the main types of connected graphs −

Strongly Connected Graph

A strongly connected graph is a directed graph in which there is a directed path from any vertex to every other vertex. This means that for any two vertices u and v in the graph, there are paths uv and vu.

Strongly Connected Graph

Weakly Connected Graph

A weakly connected graph is a directed graph where, if all the directed edges are replaced with undirected edges, the resulting undirected graph is connected. In other words, the graph is weakly connected if there is a path between any pair of vertices when direction is ignored.

Weakly Connected Graph

Biconnected Graph

A biconnected graph (also known as a 2-connected graph) is an undirected graph that remains connected after the removal of any single vertex. In other words, there are no articulation points (vertices whose removal disconnects the graph).

Biconnected Graph

K-Connected Graph

A k-connected graph is an undirected graph in which there are at least k vertex-disjoint paths between any two vertices. This means that the graph remains connected even after the removal of k1 vertices. The higher the value of k, the more connected the graph is.

K-Connected Graph

In this graph, there are three vertex-disjoint paths between any pair of vertices. Here, the nodes A, B, C, and D form a complete subgraph (K4), and the nodes D, E, F, and G form another complete subgraph (K4), sharing node D to ensure 3-connectivity.

Tree

A tree is a type of connected, undirected graph that has no cycles. Trees have the property that there is exactly one path between any pair of vertices, making them minimally connected. A tree with n vertices has exactly n1 edges.

Tree Graph

Algorithms for Checking Connectivity

We can use various algorithms to check the connectivity of a graph, such as −

  • Breadth-First Search (BFS)
  • Depth-First Search (DFS)
  • Tarjan's Algorithm
  • Kosaraju's Algorithm

Breadth-First Search (BFS)

Breadth-First Search is used to traverse the graph and check connectivity in an undirected graph. BFS starts from a selected node, explores all its neighbors, and then moves to the next level of neighbors. If all nodes are reachable from the starting node, the graph is connected.

In the following example, we use BFS to check the connectivity of an undirected graph −

A - B - C
|   |   |
D - E - F

BFS starting from vertex A visits all vertices, confirming the graph is connected.

Depth-First Search (DFS)

Depth-First Search is used to explore all possible paths and check connectivity in both directed and undirected graphs. DFS starts from a selected node and explores as far along each branch as possible before backtracking. If all nodes are reachable from the starting node, the graph is connected.

In the following example, we use DFS to check the connectivity of an undirected graph −

A - B - C
|   |   |
D - E - F

DFS starting from vertex A visits all vertices, confirming the graph is connected.

Tarjan's Algorithm

Tarjan's Algorithm is used to find strongly connected components in a directed graph. This algorithm performs a DFS while keeping track of nodes using a stack, allowing it to identify cycles and strongly connected components.

In the following example, we use Tarjan's algorithm to find strongly connected components in a directed graph −

A  B  C
      
D  E  F

Tarjan's algorithm identifies the strongly connected components: {A, B, E, D} and {C, F}.

Kosaraju's Algorithm

Kosaraju's Algorithm is used to find strongly connected components in a directed graph. This algorithm involves two passes of DFS. The first pass processes nodes in reverse topological order, and the second pass finds strongly connected components by processing nodes in the order defined by the first pass.

Applications of Connected Graphs

Connected graphs have various applications across various fields −

  • Network Design: Designing communication and transportation networks to ensure all nodes are connected.
  • Social Networks: Analyzing the connectivity of individuals or groups.
  • Biology: Studying the connectivity of biological networks such as neural or ecological networks.
  • Computer Science: Solving problems related to graph traversal, optimization, and data structures.
  • Urban Planning: Designing road and utility networks to ensure connectivity.
Advertisements