Teachers Paradise School Supplies Teacher Resources Free Encyclopedia
Teachers Paradise FREE Teaching Resources
Home Arts Crafts Audio Visual Equipment Office Supplies Teacher Resources
Main Page | Edit this page

Depth-first search

Depth First Search (DFS) is a way of traversing or searching a Tree_(graph_theory) or Tree structure. Intuitively, you start at the root and explore as far as possible along each branch before backtracking.

Formally, DFS is an uninformed search that progresses by expanding the first child node of the search tree that appears and thus going deeper and deeper until a goal state is found, or it hits a node that has no children. Then the search backtracks and starts off on the next node.

From an algorithmic point-of view, all freshly expanded nodes are placed at the front of the search queue for expansion.

Space complexity of DFS is much lower compared to BFS (Breadth-first search). It also lends itself much better to heuristic methods of choosing a likely-looking branch.


Compare Breadth-first search.



Pay for Educational Supplies & Teaching Supplies with Visa, Master Card, American Express, Discover or Paypal.
TeachersParadise.com HOME | Safe Shopping Guarantee | Help Desk
All trademarks & brands are the property of their respective owners.
Legal Notice 2000-2008 TeachersParadise.com, Inc. All Rights Reserved