GraphTheory
Neighborhood
neighborhood of vertex
Calling Sequence
Parameters
Description
Examples
Neighborhood(G, v, s)
G
-
graph
v
vertex
s
(optional) the type of neighborhood, either open or closed
Neighborhood('G','v') returns the list of neighbors of v in G. If G is directed the directions of arcs are ignored. An optional third argument, either open or closed, specifies whether to include the vertex v. The default is open, which does not include v.
with⁡GraphTheory:
with⁡SpecialGraphs:
Q3≔HypercubeGraph⁡3
Q3≔Graph 1: an undirected graph with 8 vertices and 12 edge(s)
Neighborhood⁡Q3,000
001,010,100
Neighborhood⁡Q3,000,closed
000,001,010,100
See Also
AdjacencyMatrix
Degree
Neighbors
Download Help Document