AI engineering glossary · Data structures algorithms

What is shortest path?

Shortest path: The problem of finding a route between two vertices in a graph with the smallest number of edges or the smallest total edge weight. Different algorithms apply depending on whether edges are weighted and whether weights can be negative.

Level: intermediateTopic: Data structures algorithms

Shortest path: an example

Finding the quickest bus route from Kolkata's Howrah to Salt Lake by minimising travel time across a weighted graph of stops.

Related terms

More Data structures algorithms terms

Where you learn it

Shortest path is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.