0% found this document useful (0 votes)
52 views1 page

Search Algorithm Comparison 10 Points

The document compares various search algorithms including DFS, DLS, BFS, Best-First Search, IDDFS, and Bidirectional Search across ten points such as search style, completeness, optimality, and complexity. Each algorithm has distinct characteristics in terms of memory usage, pathfinding, and handling loops. The comparison highlights the strengths and weaknesses of each algorithm in different scenarios.

Uploaded by

Amit Das
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views1 page

Search Algorithm Comparison 10 Points

The document compares various search algorithms including DFS, DLS, BFS, Best-First Search, IDDFS, and Bidirectional Search across ten points such as search style, completeness, optimality, and complexity. Each algorithm has distinct characteristics in terms of memory usage, pathfinding, and handling loops. The comparison highlights the strengths and weaknesses of each algorithm in different scenarios.

Uploaded by

Amit Das
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Search Algorithm Comparison

Example Graph

Example Graph:

A
/|\
B C D
/ \
E F

Start node: A
Goal node: F
All edge costs = 1

10-Point Comparison Table

Point DFS DLS BFS Best-First Search IDDFS Bidirectiona

1. Search Style Goes deep into branches


DFS but stops at a depth
Explores levelChooses
by level node closest to goal
DFS (heuristic)
with increasingSearch
depth limit
from start andRec
go

2. Completeness Not always (may loop)


Yes if limit is high enough Yes Not always Yes Yes

3. Optimality No No Yes if costs are equal No Yes if step cost =Yes


1 if both directions

4. Time Complexity O(b^d) O(b^l) O(b^d) O(b^d) O(b^d) O(b^(d/2))

5. Space Complexity O(d) O(l) O(b^d) O(b^d) O(d) O(b^(d/2))

6. Memory Usage Very low Low Very high High Low Medium

7. Path Found (example to F) A->D->F A->D->F (if limit >= 2) A->B->C->D->FA->D->F (if heuristic is good)
A->B->C...->F (gradually) A <-> F meet at

8. Loops Handling May get stuck Avoids looping with limit No loops if tracked May loop if heuristic fails No loop risk Depends on both dir

9. Heuristic Use No No No Yes No No

10. Best For When memory is limited Controlled DFS Finding shortest pathFast guess-based search
Balanced and safe search
Fast on large spa
In

You might also like