Neighbours of a (subset of) vertex in a graph?

60 Views Asked by At

Introduction to Algorithms: A Creative Approach defines neighborhood of v as: $N(v) = {v} \ \bigcup \ \{w \in V | (v, w)\in E\}$.

shouldn't it be $N(v) = \{w \in V | (v, w)\in E\}$.

1

There are 1 best solutions below

0
On BEST ANSWER

Most commonly, graph theorists refer to the neighborhood set of a vertex $v$ as: $N(v) = \{ w \in V : vw \in E \}$. The closed neighborhood of a vertex, $N[v] = N(v) \cup \{v\}$. It looks like your book is referring to the closed neighborhood.

Note: Here, the terms open and closed are not in a topological context.