By the Shortest Path?

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.

What is meant by shortest path?

(classic problem) Definition: The problem of finding the shortest path in a graph from one vertex to another. "Shortest" may be least number of edges, least total weight, etc. Also known as single-pair shortest-path problem.

How do you find the shortest path?

Dijkstra's Algorithm
  1. Mark the ending vertex with a distance of zero. Designate this vertex as current.
  2. Find all vertices leading to the current vertex. Calculate their distances to the end. ...
  3. Mark the current vertex as visited. ...
  4. Mark the vertex with the smallest distance as current, and repeat from step 2.
James H. Sterling

James H. Sterling

Environmental Science & Climate Journalist

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.