Wolfram Language & System 10.3 (2015)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)


gives the weakly connected components of the graph g.

gives the weakly connected components that include at least one of the vertices , , .

gives the connected components that include a vertex that matches the pattern patt.

uses rules to specify the graph g.


  • WeaklyConnectedComponents returns a list of components , where each component is given as a list of vertices.
  • Vertices u and v are in the same component if there is a sequence of edges joining u and v.
  • Components are ordered by their length, with the largest component first.
  • WeaklyConnectedComponents works with undirected graphs, directed graphs, multigraphs, and mixed graphs.
Introduced in 2012
| Updated in 2015