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.
Shortest job next, also known as shortest job first or shortest process next, is a scheduling policy that selects for execution the waiting process with the smallest execution time.