AI engineering glossary · Data structures algorithms

What is weighted graph?

Weighted graph: A graph in which each edge has a number attached, such as cost, distance or time. Algorithms on weighted graphs typically find paths or trees with the smallest total weight.

Level: intermediateTopic: Data structures algorithms

Weighted graph: an example

In a road network, the edge Pune-Mumbai may carry weight 150 (kilometres), and the shortest route minimises the sum of weights.

Related terms

More Data structures algorithms terms

Where you learn it

Weighted graph 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.