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

# NeighborhoodGraph

 NeighborhoodGraphgives the graph neighborhood vertex v in the graph g. NeighborhoodGraphgives the graph neighborhood of the that can be vertices, edges, or subgraphs of g. NeighborhoodGraphgives the graph neighborhood of the vertices and edges that match the pattern patt. NeighborhoodGraphgives the neighborhood up to distance k.
• The neighborhood graph for a vertex v is given by vertices adjacent to v and the edges connecting them.
• The neighborhood graph for an edge e is the neighborhood graph for the vertices of e.
• The neighborhood graph for a subgraph h is the neighborhood graph for the vertices in h.
• The neighborhood graph at distance k is the neighborhood graph for the vertices of the neighborhood graph at distance k-1.
• The default value for k is .
Give the neighborhood from vertex 1 in a graph:
From a set of vertices:
Give the neighborhood up to distance k from the vertices:
Give the neighborhood from vertex 1 in a graph:
 Out[1]=
 Out[2]=
From a set of vertices:
 Out[3]=

Give the neighborhood up to distance k from the vertices:
 Out[1]=
 Out[2]=
 Scope   (5)
NeighborhoodGraph works with undirected graphs:
Directed graphs:
NeighborhoodGraph works with vertices:
Edges:
Use patterns to specify a set of vertices:
Works with large graphs:
 Applications   (2)
Highlight the neighborhood from the vertices in CompleteGraph:
Manipulate the neighborhood of vertices:
The neighborhood of a vertex in a complete graph is the graph itself:
Pick out random neighborhoods from a grid:
Subtract random neighborhoods from a grid:
New in 8