Return to graph traversal (idea)

A process that starts at [vertex] v and visits all vertices w for which there is a [path] between v and w. A [Mathematical definition of graph|graph] traversal visits every vertex in a graph [if and only if] the graph is [connected], regardless of where the traversal starts. The two basic graph-traversal [algorithm|algorithms], which apply to either [directed graph|directed] or undirected graphs, are the [depth-first search] and the [breadth-first search].