This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
 GRAPH UTILITIES PACKAGE SYMBOL

# NeighborhoodSubgraph

 gives a subgraph consists of vertices that can be reached from vertex i within r hops. gives a subgraph consists of vertices that can be reached from vertex i.
• returns a subgraph consists of vertices that can be reached from a given vertex within certain hops.
This defines a simple directed graph:
This finds a subgraph from vertices that can be reached from vertex 2 within 3 hop:
This finds a subgraph consists of all vertices that can be reached from vertex 2:
Needs["GraphUtilities`"]
This defines a simple directed graph:
 Out[4]=
This finds a subgraph from vertices that can be reached from vertex 2 within 3 hop:
 Out[5]=
 Out[6]=
This finds a subgraph consists of all vertices that can be reached from vertex 2:
 Out[7]=
 Out[8]=
 Applications   (1)
This generate a graph by linking a number to itself but with last bit dropped:
This layout the graph:
This shows the subgraphs that can be reached from vertex 1 within 1 to 4 hops: