Connected component definition & meaning in DSA
Connected component in an undirected graph refers to a group of vertices that are connected to each other through edges, but not connected to other vertices outside the group.
For example in the graph shown below, {0, 1, 2} form a connected component and {3, 4} form another connected component.
Characteristics of Connected Component:
- A connected component is a set of vertices in a graph that are connected to each other.
- A graph can have multiple connected components.
- Inside a component, each vertex is reachable from every other vertex in that component.
How to identify Connected Component:
There are several algorithms to identify Connected Components in a graph. The most popular ones are:
Applications of Connected Component:
- Graph Theory: It is used to find subgraphs or clusters of nodes that are connected to each other.
- Computer Networks: It is used to discover clusters of nodes or devices that are linked and have similar qualities, such as bandwidth.
- Image Processing: Connected components also have usage in image processing.