If we modify Dijkstra algorithm from "single source to all nodes shortest path" to find the shortest path from "single source to a single destination point", then what will be the difference between this modified Dijkstra and uniform cost search? Any help will be appreciated. Thanks.
A very good dissection of the differences between both algorithms can be seen in Dijkstra’s Algorithm versus Uniform Cost Search or a Case Against Dijkstra’s Algorithm. I just quote you some of the conclusions from Arial Felner:
The two algorithms have many similarities and are logically equivalent. The most important similarity is that they expand exactly the same nodes and in exactly the same order.
As we suspect, both algorithms are equivalent from the theoretical point of view.
However, there are many differences between these algorithms as described in text books and taught in classes. The main difference is the identity of the nodes in the priority queue. In modified Dijkstra, all nodes are initially inserted into the queue. In UCS, nodes are inserted to the queue lazily during the search.
Thus,
In summary, UCS and modified Dijkstra are equivalent in their big O complexity, expand the same nodes and in the same order, but UCS should be preferred from a practical point of view and it is more widely used when approach the single source - single destination problem without heuristic information.