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:

    His life itself passes deeper in nature than the studies of the naturalist penetrate; himself a subject for the naturalist. The latter raises the moss and bark gently with his knife in search of insects; the former lays open logs to their core with his axe, and moss and bark fly far and wide. He gets his living by barking trees. Such a man has some right to fish, and I love to see nature carried out in him.
    Henry David Thoreau (1817–1862)