Time complexity of DFS will be equivalent to the node traversed by the algorithm. It is given by: , Where, m= maximum depth of any node and this can be much larger than d (Shallowest solution depth).
T(n)=1+n2+n3+....+nn=O(nm)
DFS algorithm needs to store only single path from the root node, hence space complexity of DFS is equivalent to the size of the fringe set, which is O(bm).
DFS search algorithm is complete within finite state space as it will expand every node within a limited search tree.
DFS search algorithm is non-optimal, as it may generate a large number of steps or high cost to reach to the goal node.
Silan Software is one of the India's leading provider of offline & online training for Java, Python, AI (Machine Learning, Deep Learning), Data Science, Software Development & many more emerging Technologies.
We provide Academic Training || Industrial Training || Corporate Training || Internship || Java || Python || AI using Python || Data Science etc