Uniform Cost search algorithm is optimal because at every state the path with the least cost is chosen.
It does not care about the number of steps involve in searching and only concerned about the path cost due to which this algorithm may be stuck in an infinite loop.
Let C* is cost of the optimal solution, and ∈ is each step to get to the goal node. then the number of steps is =C*/∈+1, Here we have taken +1, as we start from state 0 and end to C*/∈. The worst-case time complexity of uniform-Cost Search is
The same logic is for space complexity.
Uniform-cost Search is complete, such as if there is a solution, UCS will find it.
Uniform Cost search is always optimal as it only selects a path with the lowest path cost.
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