Backtracking
The short answer · 23 words
In short
Algorithmic search technique that reverses a partial decision as soon as it is apparent that it does not lead to a valid solution.
Flow-alerta.cab (2026): Backtracking. https://flow-alerta.cab/en/glossar/backtracking. Editorially reviewed on: 09 October 2026.
How much detail would you like?
Practical
Basic engineering for combinatorial problems such as assignment, configuration, puzzles, constraint satisfaction and certain planning tasks.
Example scenario: In a deployment planning, an impermissible assignment is discarded and the previous decision is attempted again with another resource.
Useful for small or well-limited configuration problems; for large search spaces, check additional heuristics, constraints or other optimization methods.
At a glance
- Core
- Backtracking builds a solution step by step. If a choice leads to an impasse, the procedure jumps back to the last decision point and tries an alternative. Conceptually, this often corresponds to a depth-first search in the tree of possible partial solutions.
- Use
- Basic engineering for combinatorial problems such as assignment, configuration, puzzles, constraint satisfaction and certain planning tasks.
- Example
- Example scenario: In a deployment planning, an impermissible assignment is discarded and the previous decision is attempted again with another resource.
- Limits
- Confuse backtracking with dynamic programming; do not use early exclusion conditions; underestimate exponential runtime; and present all search problems as efficiently solvable.
Questions about this term
Does backtracking always find a solution quickly?
No.
Is it the same as Brute Force?
It also searches through possibilities, but can discard unusable branches early on.
Can it be implemented recursively?
Often yes.
All details and background
Backtracking builds a solution step by step. If a choice leads to an impasse, the procedure jumps back to the last decision point and tries an alternative. Conceptually, this often corresponds to a depth-first search in the tree of possible partial solutions.
ELI5 – Explained simply
You're trying one way. If it doesn’t work, you go back to the last turn and take the next path.
Why it matters in practice
Basic engineering for combinatorial problems such as assignment, configuration, puzzles, constraint satisfaction and certain planning tasks.
Example
Example scenario: In a deployment planning, an impermissible assignment is discarded and the previous decision is attempted again with another resource.
Pitfalls and limits
- Confuse backtracking with dynamic programming; do not use early exclusion conditions; underestimate exponential runtime; and present all search problems as efficiently solvable.
Origin & history
Backtracking was described as a general programming technique early on in computer science. A well-known early depiction is by Golomb and Baumert from 1965.
Use in mid-sized companies
- Useful for small or well-limited configuration problems; for large search spaces, check additional heuristics, constraints or other optimization methods.
Related terms
- Depth search
- Recursion
Matching Flow-alerta service
Websites & web applicationsWebsites & web applications: technical implementation and testing of a suitable web application.Matching tool / use case
View use casesUse Case: Rule-compliant combination of options in a configurator.Sources
- xlinux.nist.govNIST Dictionary of Algorithms and Data Structures, Backtracking
Quellenprüfung: 09.10.2026. Definition und dokumentierte Einordnung abgeglichen; Beispiele beschreiben mögliche Anwendungen.
Editorially reviewed on: