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

VertexComponent

VertexComponent
gives the vertices in the graph g that have a path to at least one of , , ....
VertexComponent
gives the vertices with a path to at least one of , , ... of at most length k.
Find the component containing vertex 7:
Find the vertices connected to any of :
Find the component containing vertex 7:
In[1]:=
Click for copyable input
Out[1]=
 
Find the vertices connected to any of :
In[1]:=
Click for copyable input
Out[1]=
VertexComponent works with undirected graphs:
Works with large graphs:
New in 8