SLIDE 17 17
Combination with Search Combination with Search
To exploit decomposition in search, the order in
which variables are assigned must be “compatible” with the order in which variables are eliminated
More precisely, if variables are assigned in order
, variables have to be eliminated in reverse (partial) order:
Construct (super-)buckets (tree decomposition
scheme) from this reverse order
Combination with Search (Cont Combination with Search (Cont’ ’d) d)
A tree decomposition with compatible elimination
- rder can be exploited during search as follows:
– Let separator(vj) denote the separator of tree node vj (the set of variables that vj shares with its parent, vi) – Once a complete assignment has been found for a subtree, record it as a good at the separator (same for nogoods) – By checking the goods/nogoods during search, we can then avoid descending into the same subtree again and again
This algorithm is called BTD (backtracking with tree
decompositions) (Jégou Terrioux AIJ03)
BTD ( BTD (J Jé égou gou Terrioux Terrioux AIJ03) AIJ03)
Input: (Partial) assignment , tree node , set of
variables to be assigned
Output: “True” if assignment is consistent with all
constraints in subtree of , “false” otherwise
Initial call: BTD( )
BTD BTD Pseudocode Pseudocode
If Xvi = ∅ Then Consistent ← True F ← children(vi) While F ≠ ∅ And Consistent Do Choose vj ∈ F F ← F \ {vj} If A ↓ separator(vi) is a good of vi/vj Then Consistent ← True Else If A ↓ separator(vj) is a nogood of vi/vj Then Consistent ← False Else Consistent ← BTD(A,vj,vars(vj) \ separator(vj)) If Consistent Then Record the good A ↓ separator(vj) for vi/vj Else Record the nogood (A ↓ separator(vj)) for vi/vj End If End If End if End While Return Consistent (continued on next slide)
BTD BTD Pseudocode Pseudocode (Cont (Cont’ ’d) d)
Else Choose x ∈ Xvi dom ← Dx Consistent ← False While dom ≠ ∅ And Not Consistent Do Choose val ∈ dom dom ← dom \ {val} If (A ∧ {x ← val}) semijoin {c: c ∈ C ∧ var(c) ⊆ (var(A)∪{x})} ≠ ∅ Then Consistent ← BTD(A ∧ {x ← val}, vi, Xvi \ {x}) End If End While Return Consistent End If
Note: Computes a full assignment, but returns only true/false.
Generalization to Domain Splitting Generalization to Domain Splitting
Incorporate domain splitting into BTD, that is, search
Yields new algorithm BTDS (backtracking with tree
decompositions and domain splitting)
Like BTD, BTDS records set of good tuples and
nogood tuples for each separator
Unlike BTD, BTDS maintains only assignments to
(instead of full assignment)
Unlike BTD, BTDS returns assignments to
separator of (instead of only true/false)