A process that starts at vertex *v* and visits all vertices *w* for which there is a path between *v* and *w*. A 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 algorithms, which apply to either directed or undirected graphs, are the depth-first search and the breadth-first search.