Backtracking Search: Look-Back
Backtracking Search: Look-Back
Chapter 6
Look-back: backjumping
Backjumping: Go
back to the most
recently culprit.
Learning: constraint-
recording, no-good
recording.
Backjumping, conflict sets
(X1=r,x2=b,x3=b,x4=b,x5=g,x6=r,x7={r,b})
(r,b,b,b,g,r) conflict set of x7
(r,-,b,b,g,-) c.s. of x7
(r,-,b,-,-,-,-) minimal c.s
Leaf deadend: (r,b,b,b,g,r)
Example
Conflict-set analysis
Gaschnig’s backjumping:
Culprit variable
If a_i is a leaf deadend and x_b its culprit variable, then a_b is a
safe backjump destination and a_j, j<b is not.
The culprit of x7 (r,b,b,b,g,r) is (r,b,b) x3
Gaschnig’s backjumping [1979]
Gaschnig uses a marking technique to compute the
culprit.
Each variable xj maintains a pointer (latset_j) to the
latest ancestor incompatible with any of its values.
While forward generating ai , keep array latest_i,
1<=j<-n, of pointers to the last value conflicted with
some value of x_j
The algorithm jumps from a leaf-dead-end x_{i+1}
back to latest_(i+1) which is its culprit.
Example of Gaschnig’s backjump
Properties
Gaschnig’s backjumping implements
only safe and maximal backjumps in
leaf-deadends.
Gaschnig jumps only at leaf-dead-ends
Internal dead-ends: dead-ends that are non-leaf
Example of graph-based backjumping scenarios
Scenario 1, deadend at x4: I4 (x4 ) = {x1}