Discrete Mathsfor Engineers

Structures, proofs, and intuition

EN | PT

Breadth-First Search (BFS)

Series overview — shortest paths in unweighted graphs

Series: Breadth-First Search (BFS) 8 parts
1 2 3 4 5 6 7 8

What BFS Solves

Given a graph G = (V, E) and a source vertex s, BFS computes shortest-path distances in terms of the number of edges. It is the canonical shortest-path algorithm for unweighted graphs.

Reference: the presentation follows the classic treatment in Introduction to Algorithms (CLRS).

Parts