Subject  Algorithm Design 

NU Year  Set: 4.(a) Marks: 5 Year: 2008 
ADVANTAGES OF BREADTHFIRST SEARCH
 Breadthfirst
search will never get trapped exploring the useless path forever.

If there is a solution, BFS will definitely find it out.

If there is more than one solution then BFS can find the minimal one that requires less number of steps.
DISADVANTAGES OF BREADTHFIRST SEARCH

The main drawback of Breadthfirst search is its memory requirement. Since each level of the tree must be saved in order to generate the next level, and the amount of memory is proportional to the number of nodes stored, the space complexity of BFS is O(b^{d}). As a result, BFS is severely spacebound in practice so will exhaust the memory available on typical computers in a matter of minutes.

If the solution is farther away from the root,
breadthfirstsearch will consume a lot of time.
Advantages of Depth First Search:

Consumes less memory

Finds the larger distant element(from source vertex) in less time.
Disadvantages of BFS:

May not find
optimalsolution to the problem.

May get trapped in searching useless path.