What is the state space search tree, what is the backtracking paradigm, and how does bounding function evaluation prune combinatorial search spaces?
Combinatorial search is the process of finding one or more configurations of discrete decision variables that satisfy a specified set of constraints.
1. State Space Tree Formalism:
A state space tree organizes combinatorial exploration hierarchically:
- Root: The uninstantiated problem state with zero variable assignments;
- Level k Nodes: Represent partial candidate solutions where variables (x₁, x₂, ..., x_k) have been assigned values from their respective domains;
- Leaves: Represent either complete candidate solutions or dead-end states where no further legal assignments exist.
2. Naive Brute-Force vs. Systematic Backtracking:
In naive brute-force search, every leaf of depth N is generated and checked against problem constraints, incurring an intractable complexity of O(b^N) where b is the domain branching factor. Backtracking systematically avoids this exponential explosion by evaluating a bounding predicate P(x₁, x₂, ..., x_k) at interior nodes:
- If P(x₁, ..., x_k) evaluates to False, the partial solution is provably invalid. Because no extension of an invalid prefix can satisfy monotonic constraints, the entire subtree rooted at that node is immediately pruned;
- The search terminates the current branch and backtracks to the parent node, advancing to the next alternative in the domain of x_k.
3. Quantitative Pruning Impact:
In the 8-Queens problem, the unrestricted state space contains 4.426 × 10⁹ configurations. Enforcing row uniqueness reduces this to 8⁸ = 16.78 × 10⁶. Backtracking with diagonal constraint checking prunes over 99.98% of the tree, visiting only 2,057 nodes to discover all 92 valid solutions.