Graph Theory37 sections · 1633 units
Open in Course

Real World Example - The Map

Cities and Roads

Think of cities connected by roads. Each city is a vertex, and each road between two cities is an edge. You can drive from city A to city B if there's a road connecting them.

This graph structure lets you ask questions like: What's the shortest route between two cities? Can I reach every city from my starting point? Which cities are isolated?

Maps were one of the first graph applications. Now you use graph algorithms every time you get driving directions.