Same:
1. Both methods are blind searches, which are feasible only when the search space is smaller than the computer memory.
2. Both methods include the open set and the closed set. The open set is used to store the nodes to be accessed, and the closed set stores the accessed nodes.
Point.
3. The average time complexity of the two methods is O (B ^ d), where B is the branch factor and D is the search depth.
4. Both methods involve checking whether a node has been accessed in the closed set, and adopting different data structures for the closed set.
Storage has different performance. linear search requires O (n) time complexity, while hash search requires constant time complexity.
Differences:
1. Obviously, the search strategy is different. One is depth, and the other is breadth ^-^. We all know that ~
2. Stack is used for deep priority search to store open sets. Adding and deleting operations only require constant time, while extended priority search requires teams.
Column to store the open set. Adding and deleting operations only require constant time.
3. In Deep Priority Search, only B * D state nodes need to be stored on the stack. For the breadth-first search, status nodes B ^ d are stored. So the two search methods
The storage scale is different.
4. Multiple paths in the target State can be found in the depth-first search. In the breadth-first search, the shortest path in the target State is found.
Note: If the search result is a tree, the deep search is equivalent to the first root traversal, and the extended search is equivalent to the first root traversal.