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:

    If ever the search for a tranquil belief should end,
    The future might stop emerging out of the past,
    Out of what is full of us; yet the search
    And the future emerging out of us seem to be one.
    Wallace Stevens (1879–1955)