Uniform-cost Search

In computer science, uniform-cost search (UCS) is a tree search algorithm used for traversing or searching a weighted tree, tree structure, or graph. The search begins at the root node. The search continues by visiting the next node which has the least total cost from the root. Nodes are visited in this manner until a goal state is reached.

Typically, the search algorithm involves expanding nodes by adding all unexpanded neighboring nodes that are connected by directed paths to a priority queue. In the queue, each node is associated with its total path cost from the root, where the least-cost paths are given highest priority. The node at the head of the queue is subsequently expanded, adding the next set of connected nodes with the total path cost from the root to the respective node. The uniform-cost search is complete and optimal if the cost of each step exceeds some positive bound ε. The worst-case time and space complexity is O(b1 + C*/ε), where C* is the cost of the optimal solution. When all step costs are equal, this becomes O(bd + 1).

Read more about Uniform-cost Search:  Pseudocode, Example, Relationship To Other Algorithms

Famous quotes containing the word search:

    Within us, the people of the United States, there is evident a serious and purposeful rekindling of confidence, and I join in the hope that when my time as your President has ended, people might say this about our Nation: That we had remembered the words of Micah and renewed our search for humility, mercy, and justice.
    Jimmy Carter (James Earl Carter, Jr.)