Module II (Part 2)
Module II (Part 2)
S---> A--->B---->C--->D---->G--->H--->E---->F---->I---->K
Time Complexity: Time Complexity of BFS algorithm can be
obtained by the number of nodes traversed in BFS until the
shallowest Node. Where the d= depth of shallowest solution
and b is a node at every state.
T (b) = 1+b2+b3+.......+ bd= O (bd)
Space Complexity: Space complexity of BFS algorithm is
given by the Memory size of frontier which is O(bd).
Completeness: BFS is complete, which means if the
shallowest goal node is at some finite depth, then BFS will
find a solution.
Optimality: BFS is optimal if path cost is a non-decreasing
function of the depth of the node.
2. Depth-first Search
If the heuristic function is admissible, then A* tree search will always find the least
cost path.
Time Complexity: The time complexity of A* search algorithm depends on
heuristic function, and the number of nodes expanded is exponential to the
depth of solution d. So the time complexity is O(b^d), where b is the branching
factor.
Space Complexity: The space complexity of A* search algorithm is O(b^d)
Heuristic Method
This method consumes less time. This method consumes more time.