What is Backtracking?

Technology CommunityCategory: BacktrackingWhat is Backtracking?
VietMX Staff asked 5 months ago

Backtracking is a systematic way of trying out different sequences of decisions until we find one that “works.” Backtracking does not generate all possible solutions first and checks later. It tries to generate a solution and as soon as even one constraint fails, the solution is rejected and the next solution is tried.

Backtracking can be understood as as searching os a tree for a particular “goal” leaf node. Backtracking in that case is a depth-first search with any bounding function. All solution using backtracking is needed to satisfy a complex set of constraints.

 

what-is-backtracking