Earlier we stated that
- A path connects its origin and destination nodes
- Two nodes are connected if there is at least one path that connects them
- A graph is connected if each of its nodes is connected to all the others
"Connected nodes" defined more formally:
Given an undirected graph G=(V,E), two nodes x and y (i.e., x∈V and y∈V) are connected if and only if one of the following is true:
- x=y, or
- there is at least one path in G with origin x and destination y
The most important clarification in our formal definition of connected nodes is that any node is by definition connected to itself.