WeaklyConnectedGraphQ

WeaklyConnectedGraphQ[g]
yields True if the graph g is weakly connected, and False otherwise.

DetailsDetails

  • WeaklyConnectedGraphQ works for any graph object.
  • A graph is weakly connected if there is a sequence of edges joining every pair of vertices.

ExamplesExamplesopen allclose all

Basic Examples (2)Basic Examples (2)

Test whether a graph is weakly connected:

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

A graph with isolated vertices is not weakly connected:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
Out[3]=
New in 9
New to Mathematica? Find your learning path »
Have a question? Ask support »