WeakComponents

As of Version 10, all the functionality of the GraphUtilities package is built into the Wolfram System. >>

WeakComponents[g]
gives a list of all weakly connected components in the undirected graph g.

DetailsDetails

  • WeakComponents functionality is now available in the built-in Wolfram Language function WeaklyConnectedComponents.
  • To use , you first need to load the Graph Utilities Package using Needs["GraphUtilities`"].
  • 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.

ExamplesExamplesopen allclose all

Basic Examples  (2)Basic Examples  (2)

In[1]:=
Click for copyable input

This shows that the following graph has two weakly connected components:

In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
Out[3]=

has been superseded by WeaklyConnectedComponents:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=