enow.com Web Search

Search results

  1. Results from the WOW.Com Content Network
  2. Breadth-first search - Wikipedia

    en.wikipedia.org/wiki/Breadth-first_search

    The parent attribute of each node is useful for accessing the nodes in a shortest path, for example by backtracking from the destination node up to the starting node, once the BFS has been run, and the predecessors nodes have been set. Breadth-first search produces a so-called breadth first tree.

  3. Dijkstra's algorithm - Wikipedia

    en.wikipedia.org/wiki/Dijkstra's_algorithm

    Dijkstra's algorithm finds the shortest path from a given source node to every other node. [7]: 196–206 It can be used to find the shortest path to a specific destination node, by terminating the algorithm after determining the shortest path to the destination node. For example, if the nodes of the graph represent cities, and the costs of ...

  4. Shortest path problem - Wikipedia

    en.wikipedia.org/wiki/Shortest_path_problem

    Shortest path (A, C, E, D, F) between vertices A and F in the weighted directed graph. In graph theory, the shortest path problem is the problem of finding a path between two vertices (or nodes) in a graph such that the sum of the weights of its constituent edges is minimized.

  5. Brandes' algorithm - Wikipedia

    en.wikipedia.org/wiki/Brandes'_algorithm

    The number of shortest paths between and every vertex is calculated using breadth-first search. The breadth-first search starts at s {\displaystyle s} , and the shortest distance d ( v ) {\displaystyle d(v)} of each vertex from s {\displaystyle s} is recorded, dividing the graph into discrete layers.

  6. Maze-solving algorithm - Wikipedia

    en.wikipedia.org/wiki/Maze-solving_algorithm

    One such algorithm finds the shortest path by implementing a breadth-first search, while another, the A* algorithm, uses a heuristic technique. The breadth-first search algorithm uses a queue to visit cells in increasing distance order from the start until the finish is reached. Each visited cell needs to keep track of its distance from the ...

  7. Graph traversal - Wikipedia

    en.wikipedia.org/wiki/Graph_traversal

    A depth-first search (DFS) is an algorithm for traversing a finite graph. DFS visits the child vertices before visiting the sibling vertices; that is, it traverses the depth of any particular path before exploring its breadth. A stack (often the program's call stack via recursion) is generally used when implementing the algorithm.

  8. Pathfinding - Wikipedia

    en.wikipedia.org/wiki/Pathfinding

    Two primary problems of pathfinding are (1) to find a path between two nodes in a graph; and (2) the shortest path problem—to find the optimal shortest path. Basic algorithms such as breadth-first and depth-first search address the first problem by exhausting all possibilities; starting from the given node, they iterate over all potential ...

  9. Shortest-path tree - Wikipedia

    en.wikipedia.org/wiki/Shortest-path_tree

    Construct the shortest-path tree using the edges between each node and its parent. The above algorithm guarantees the existence of shortest-path trees. Like minimum spanning trees, shortest-path trees in general are not unique. In graphs for which all edge weights are equal, shortest path trees coincide with breadth-first search trees.