Discrete Mathsfor Engineers

Structures, proofs, and intuition

EN | PT

Backtracking

Series overview — combinatorial search with exploration and undo

Series: Backtracking 8 parts
1 2 3 4 5 6 7 8

What Backtracking Solves

Backtracking is a general technique for exploring a combinatorial search space by incrementally building candidate solutions and abandoning partial states that cannot lead to a valid final answer.

Conceptually, backtracking performs a depth-first exploration of a search tree where each node represents a partial solution, each edge represents a choice, and failed branches are undone so the algorithm can try another possibility.

Reference: the presentation follows the classical treatment used in algorithm design and combinatorial search, connecting recursive exploration, pruning, and search trees.

Parts