learngraphtheory.org

Guest

Sign in to keep your graphs and progress.

Course syllabus

Learning Path

Master graph theory through interactive lessons

12 lectures4 units

0 of 12 completed0%

Progress is kept in this browser.

Available Lessons

Unit IFoundations
0/3
  1. 01Introduction to GraphsA comprehensive introduction to graph theory fundamentals, covering definitions, terminology, types, theorems, and applications.Beginner45 minutes
  2. 02Fundamental Structures in GraphsExplore the essential structures in graphs including paths, walks, trails, cycles, connectivity, components, and the handshaking lemma.Beginner25 minutes
  3. 03Trees and Their ApplicationsExplore trees as fundamental graph structures and their wide-ranging applications in computer science, data organization, and real-world systems.Beginner30 minutes
Unit IITraversal and Paths
0/3
  1. 04Graph Traversal AlgorithmsMaster the fundamental graph traversal techniques and their systematic methods for exploring graph structures.Beginner35 minutes
  2. 05Shortest Path AlgorithmsMaster the fundamental algorithms for finding shortest paths in weighted graphs, including Dijkstra's, Bellman-Ford, A*, and Floyd-Warshall algorithms.Intermediate40 minutes
  3. 06Eulerian and Hamiltonian PathsNewTwo classical traversal questions: when can a walk use every edge exactly once, and when can it visit every vertex exactly once? One is solved in linear time, while the other is NP-complete.Intermediate45 minutes
Unit IIIConnectivity and Optimization
0/3
  1. 07Minimum Spanning TreesLearn about minimum spanning trees and the algorithms to find them: Prim's, Kruskal's, and Borůvka's algorithms.Intermediate30 minutes
  2. 08Graph Connectivity and ComponentsA comprehensive exploration of graph connectivity, components, and their applications in network analysis and system design.Advanced40 minutes
  3. 09Network Flow AlgorithmsMaster network flow problems including maximum flow, minimum cut, and their applications in optimization and resource allocation.Advanced45 minutes
Unit IVGraph Structure
0/3
  1. 10Matchings in GraphsNewPairing vertices along edges: augmenting paths and Berge’s theorem, bipartite matching algorithms, Hall’s marriage theorem, König’s theorem and the assignment problem.Advanced50 minutes
  2. 11Graph ColoringNewProper colorings and the chromatic number: bipartite graphs, the bounds ω ≤ χ ≤ Δ + 1, Brooks’ theorem, greedy and DSatur algorithms, edge coloring, and applications to timetabling and register allocation.Intermediate45 minutes
  3. 12Planar GraphsNewGraphs that can be drawn without crossings: Euler’s formula, edge bounds, why K₅ and K₃,₃ are not planar, Kuratowski’s theorem, duality and the five and four color theorems.Advanced50 minutes
Lecture 05Unit II — Traversal and Paths

Shortest Path Algorithms

Master the fundamental algorithms for finding shortest paths in weighted graphs, including Dijkstra's, Bellman-Ford, A*, and Floyd-Warshall algorithms.

Duration
40 minutes
Level
Intermediate
Contents
7 sections
Lessons
0 of 7 sections read

Lecture overview

Learning objectives

After this lecture you should be able to:

  1. 1.Formulate the single-source and all-pairs shortest-path problems.
  2. 2.Run Dijkstra’s algorithm and explain why it fails with negative edge weights.
  3. 3.Use Bellman–Ford to handle negative edges and detect negative cycles.
  4. 4.Select among BFS, Dijkstra, Bellman–Ford, A*, Floyd–Warshall and Johnson for a given setting.

Key Concepts

Dijkstra · Bellman-Ford · A* Algorithm · Floyd-Warshall · BFS · Johnson's Algorithm · Shortest Path · Weighted Graphs · Negative Cycles

1Introduction

1.1Introduction

The shortest path problem seeks the minimum-cost path between points in a graph, where cost can represent distance, time, or any numerical metric. This problem underpins critical applications in navigation, computer networks, robotics, logistics, social network analysis, and many other fields.

Problem Definition

Given a weighted graph G = (V, E) and vertices s (source) and t (target), find the path from s to t with minimum total weight.

Types of Shortest Path Problems

  1. Single-Source Shortest Path: From one vertex to all others
  2. Single-Destination Shortest Path: From all vertices to one target
  3. Single-Pair Shortest Path: Between two specific vertices
  4. All-Pairs Shortest Path: Between every pair of vertices

Section 1 of 7