Uniform-cost search

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. Intuitively, 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 ε. [Russell Norvig 2003]

Dijkstra's algorithm, which is perhaps better-known, can be regarded as a variant of uniform-cost search, where there is no goal state and processing continues until all nodes have been removed from the priority queue. As in Dijkstra's algorithm, UCS guarantees that (if all edge weights are non-negative) the shortest path to a particular node has been found once the node is extracted from the priority queue.

Uniform-cost search is a special case of the A* search algorithm if its heuristic is a constant function. Breadth-first search (BFS) is a special case of uniform-cost search when all edge costs are positive and identical. Where BFS first visits the node with the shortest path length (number of nodes) from the root node, UCS first visits the node with the shortest path costs (sum of edge weights) from the root node.

References

External links

* [http://www.codecodex.com/wiki/index.php?title=Uniform-cost_search CodeCodex: Source code for uniform-cost search implementations]


Wikimedia Foundation. 2010.

Игры ⚽ Нужно сделать НИР?

Look at other dictionaries:

  • Search algorithm — In computer science, a search algorithm, broadly speaking, is an algorithm that takes a problem as input and returns a solution to the problem, usually after evaluating a number of possible solutions. Most of the algorithms studied by computer… …   Wikipedia

  • Breadth-first search — Infobox Algorithm class=Search Algorithm Order in which the nodes are expanded data=Graph time=O(|V|+|E|) = O(b^d) space=O(|V|+|E|) = O(b^d) optimal=yes (for unweighted graphs) complete=yesIn graph theory, breadth first search (BFS) is a graph… …   Wikipedia

  • Iterative deepening depth-first search — Graph and tree search algorithms Alpha beta pruning A* B* Beam Bellman–Ford algorithm Best first Bidirectional …   Wikipedia

  • Depth-first search — Order in which the nodes are visited Class Search algorithm Data structure Graph Worst case performance …   Wikipedia

  • Depth-limited search — Class Search Algorithm Data structure Graph Worst case performance O( | V | + | E | ) …   Wikipedia

  • No free lunch in search and optimization — This article is about mathematical analysis of computing. For associated folklore, see No free lunch theorem. The problem is to rapidly find a solution among candidates a, b, and c that is as good as any other, where goodness is either 0 or 1.… …   Wikipedia

  • Interpolation search — is an algorithm for searching for a given key value in an indexed array that has been ordered by the values of the key. It parallels how humans search through a telephone book for a particular name, the key value by which the book s entries are… …   Wikipedia

  • School uniform — School uniforms are common in primary and secondary schools in many nations. They are the most widely known form of student uniform; other types of which include uniforms worn by students participating in higher vocational training, such as in… …   Wikipedia

  • Desert Battle Dress Uniform — These pants have the chocolate chip camouflage pattern. Desert Battle Dress Uniform[1] (abbreviated DBDU, often called Chocolate Chip Camouflage, Cookie Dough Camouflage, or the Six Color Desert Pattern) was the camouflage used by the United… …   Wikipedia

  • Object categorization from image search — In computer vision, the problem of object categorization from image search is the problem of training a classifier to recognize categories of objects, using only the images retrieved automatically with an Internet search engine. Ideally,… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”