An algorithm to solve the shortest path problem. In essence it is a procedure which labels vertices with a minimum distance from the starting position, in order of ascending minimum distances. At each stage therefore you do not have to consider the multiple possible routes to get to any of the vertices already labelled. The procedure stops once the finish point has been labelled in this manner, even though there may be other points not yet labelled—for which the shortest path would be longer than the one of interest.