November 2024
Intermediate to advanced
416 pages
11h 11m
English
A few natural questions arise when we consider the realm of graph search algorithms. Why do we want to search a graph? What are we looking for? Didn’t we already find all the nodes when we created the graph? To some extent, the term graph search undersells the generality of these algorithms. Graph search algorithms provide a mechanism for systematically traversing all the nodes in a graph. We could use this ability to search for a particular node, such as finding treasure hidden in a maze, or to otherwise enumerate and analyze the graph.
We’ll begin our exploration of graph search with depth-first search. This algorithm ...