# Category:Shortest path algorithms

From LiteratePrograms

A shortest path algorithm finds the shortest possible sequence of edges connecting two vertices in a graph. Here, "shortest" may refer to the number of edges, but more generally refers to the sum of the weights of the edges, where each edge has a numeric value denoted as its weight. There are three main kinds:

- Point-to-point shortest path: finds the shortest path between a single source vertex and a single destination vertex.
- Single-source shortest path: finds the shortest paths between a single source vertex and all other vertices in the graph simultaneously.
- All-pairs shortest path: finds the shortest paths between every pair of vertices in the graph simultaneously.