This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

WeakComponents

WeakComponents[g]
gives a list of all weakly connected components in the undirected graph g.
  • A weakly connected component of a directed graph is a set of vertices such that for each pair of vertices, there is a path between them. The graph g is considered as undirected.
This shows that the following graph has 2 weakly connected components:
Needs["GraphUtilities`"]
This shows that the following graph has 2 weakly connected components:
In[2]:=
Click for copyable input
Out[2]=
This defines a small graph:
StrongComponents finds connected components of a directed graph:
finds connected components, assuming that the graph is undirected: