Artificial Intelligence/Search/Exhaustive search/Breadth-first search

Breadth-first search (BFS) technique is a systematic search strategy which begins at an initial node (an initial state) and from the initial node search actions are applied downward on a tree structure in a breadth-wise order.

In the car key example, the BFS search order follows node sequence: 1, 2, 3, 4, 5… and so on in breadth-first order.

The search algorithm involves the repeated testing and removing of the first node from the front of the list, and then finding and appending the node’s successors to the list.

Comparing BFS to depth-first search algorithm, BFS does not suffer from any potential infinite loop problem , which may cause the computer to crash whereas depth first search goes deep down searching.

On Thursday, March 21, 2019

Breadth First Search Algorithm

This is one of the important Graph traversal technique. BFS is based on Queue data structure. Analysis: The time complexity of BFS using Adjacency list is O(V + ...

Depth First Search Algorithm

This is one of the important Graph traversal technique. DFS is based on stack data structure. Analysis: The time complexity of DFS using Adjacency list is O(V + ...