enow.com Web Search

Search results

  1. Results from the WOW.Com Content Network
  2. Distance oracle - Wikipedia

    en.wikipedia.org/wiki/Distance_oracle

    A simple data structure that achieves this goal is a matrix which specifies, for each pair of nodes, the distance between them. This structure allows us to answer queries in constant time O ( 1 ) {\displaystyle O(1)} , but requires O ( n 2 ) {\displaystyle O(n^{2})} extra space.

  3. Distance (graph theory) - Wikipedia

    en.wikipedia.org/wiki/Distance_(graph_theory)

    A metric space defined over a set of points in terms of distances in a graph defined over the set is called a graph metric. The vertex set (of an undirected graph) and the distance function form a metric space, if and only if the graph is connected. The eccentricity ϵ(v) of a vertex v is the greatest distance between v and any other vertex; in ...

  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. Dijkstra's algorithm - Wikipedia

    en.wikipedia.org/wiki/Dijkstra's_algorithm

    Dijkstra's algorithm (/ ˈ d aɪ k s t r ə z / DYKE-strəz) is an algorithm for finding the shortest paths between nodes in a weighted graph, which may represent, for example, a road network.

  6. Johnson's algorithm - Wikipedia

    en.wikipedia.org/wiki/Johnson's_algorithm

    The first three stages of Johnson's algorithm are depicted in the illustration below. The graph on the left of the illustration has two negative edges, but no negative cycles. The center graph shows the new vertex q, a shortest path tree as computed by the Bellman–Ford algorithm with q as starting vertex, and the values h(v) computed at each other node as the length of the shortest path from ...

  7. Longest path problem - Wikipedia

    en.wikipedia.org/wiki/Longest_path_problem

    In graph theory and theoretical computer science, the longest path problem is the problem of finding a simple path of maximum length in a given graph.A path is called simple if it does not have any repeated vertices; the length of a path may either be measured by its number of edges, or (in weighted graphs) by the sum of the weights of its edges.

  8. Shortest-path tree - Wikipedia

    en.wikipedia.org/wiki/Shortest-path_tree

    The numbers beside the vertices indicate the distance from the root vertex. In mathematics and computer science, a shortest-path tree rooted at a vertex v of a connected, undirected graph G is a spanning tree T of G, such that the path distance from root v to any other vertex u in T is the shortest path distance from v to u in G.

  9. Travelling salesman problem - Wikipedia

    en.wikipedia.org/wiki/Travelling_salesman_problem

    For example, the minimum spanning tree of the graph associated with an instance of the Euclidean TSP is a Euclidean minimum spanning tree, and so can be computed in expected O(n log n) time for n points (considerably less than the number of edges). This enables the simple 2-approximation algorithm for TSP with triangle inequality above to ...