VertexInComponent

VertexInComponent[g, {v1, v2, ...}]
gives the vertices in the graph g that have a directed path to at least one of , , ....

VertexInComponent[g, {v1, v2, ...}, k]
gives the vertices with a directed path to at least one of , , ... of at most length k.

DetailsDetails

ExamplesExamplesopen allclose all

Basic Examples (2)Basic Examples (2)

Find the in-component of a vertex:

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

Find the in-component of a set of vertices:

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