liveBook · Manning

Traversal

As explained in Optimization Algorithms: AI techniques for design, planning, and control problems

A graph-search technique that explores a tree or graph by visiting nodes according to a specified rule.

Graph traversal explores a tree or graph by visiting nodes according to a specific, well-defined rule. It seeks a path between nodes rather than optimizing the final route’s length. section 3.3

Common traversal rules include:

  • Breadth-first search examines every node at one level before moving to the next. section 3.2
  • Depth-first search follows one branch as far as possible, then backtracks to explore alternatives. section 3.6
  • Depth-limited search constrains DFS with a maximum depth, while iterative deepening increases that limit until reaching the goal. section 3.2
  • Bidirectional search explores forward from the start and backward from the goal at the same time. section 3.6

Where traversal helps

Apply traversal to explore a maze, solve an n-puzzle, determine relationships in a family or social graph, or find a route between an origin and destination. These searches can find feasible paths without necessarily selecting the shortest one. section 3.0 section 3.3

Figure 3.10 Graph search methods

Compare the main graph-search methods and their exploration patterns. section 3.2

How Optimization Algorithms: AI techniques for design, planning, and control problems covers it

How deep it goes
Defines traversal and distinguishes BFS, DFS, DLS, IDS, and bidirectional search, but stops short of route-length optimization.
Examples
Demonstrates traversal through mazes, n-puzzles, family trees, social graphs, and origin-to-destination routing.
What it assumes
Introduces graphs as vertices connected by edges and distinguishes traversal from shortest-path optimization.
What you can do after
Apply BFS, DFS, DLS, IDS, or bidirectional search to find paths through simple, well-defined graph problems.
How it connects
Connects graph traversal with graph search, blind search, shortest-path algorithms, breadth-first search, and depth-first search.

Also explained in

Compare how 3 books explain traversal →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Optimization Algorithms: AI techniques for design, planning, and control problems. The section links point to the parts of the book it draws on.