IJCAI Russian Doll Search with Tree Decomposition Martí Sànchez, David Allouche, Simon de Givry, and Thomas Schiex INRA Toulouse, FRANCE
IJCAI Real applications with a structure SPOT5 #509 (Constraints 4(3), 1999) langladeM7 sheep pedigree (Constraints 13(1), 2008) CELAR SCEN-07r (Constraints 4(1), 1999) Earth Observation Satellite Management Radio Link Frequency Assignment Mendelian Error Detection Tag SNP Selection HapMap chr01 r 2 ≥0.8 #14481
IJCAI Framework: Weighted CSP k(X,D,F,k) n –X={X 1,..., X n } n variables nd –D={D 1,..., D n } n finite domains of maximum size d m –F={f 1,…,f m }, a set of m cost functions f S with scope S, assigns a positive cost to any assignment of S f ∅ f ∅ problem lower bound (obtained by enforcing local consistency by Equivalence Preserving Transformations) –k –k, maximum cost and global upper bound Find an assignment A of all the variables which minimizes ∑ f S F f S ( A[S] ) NP-hard problem Improve bounds computation compared to BTD (Jégou&Terrioux, ECAI 2004; de Givry et al., AAAI 2006)
IJCAI Soft 2-Coloring example A D BC E F G J I H K XiXi XjXj f ij
IJCAI Soft 2-Coloring example A D BC E F G J I H K 5 Optimal solution of cost 5
IJCAI C5 C4 C3 C2 C1 Tree Decomposition C3 C1 C4 C2 C5 A D BC E F G J I H K {D} {E,F} {D,I,J} The set of clusters covers the set of variables and the set of cost functions Separator = intersection between two connected clusters
IJCAI C4 C3 C2 C1 Search with Tree Decomposition C5 A D BC E F G J I H K The assignment of a separator disconnects the problem into two independent subproblems C3 C1 C4 C2 C5 {D} {E,F} {D,I,J}
IJCAI C4 C5 C3 C E G F D 01 A D BC E F G J I H K Search with Tree Decomposition K J I H P2 / {(D=red)} C3 C1 C4 C2 C5 P4 / {(D=red)} P2 / {(D=green)} P4 / {(D=green)} {D} {E,F} {D,I,J}
IJCAI Search with Tree Decomposition F G E D 0 P2 / {(D=red)} C4 C5 C3 C2 A D BC E F G J I H K
IJCAI Search with Tree Decomposition F G E D 0 Record the optimum of P2 / {(D=red)} LB P2 / {(D=red)} = 1 OPT P2 / {(D=red)} = true P2 / {(D=red)} k Assume a global upper bound k = 5. It may be useless to compute the optimum of P2 / {(D=red)}, only a lower bound is needed! C4 C5 C3 C2 A D BC E F G J I H K
IJCAI Backtrack bounded by Tree Decomposition F G E D 0 P2 / {(D=red)} k Assume a global upper bound k = 5. It may be useless to compute the optimum of P2, only a lower bound is needed! Add a local upper bound: k UB P2 / {(D=red)} = k – 3 – LB P4 / {(D=red)} k UB P2 / {(D=red)} = k – 3 – max ( f C4 + f C5, LB P4 / {(D=red)} ) Maintaining local consistencyRecorded during search C3 C1 C4 C2 C5 BTD C4 C5 C3 C2 A D BC E F G J I H K (Jégou & Terrioux, ECAI 2004) (de Givry et al., AAAI 2006)
IJCAI Russian Doll Search with Tree Decomposition k UB P2 / {(D=red)} = k – 3 – max ( f C4 + f C5, LB P4 / {(D=red)}, LB P4 RDS ) Found during searchObtained in preprocessing RDS-BTD lower bound is a maximum between Local Consistency Local Consistency Recorded lower bounds Recorded lower bounds RDS lower bounds RDS lower bounds –Pi RDS is a relaxation of Pi / A by removing separator variables and cost functions on them –For all i, solves Pi RDS in a bottom-up order using BTD exploiting RDS lb C3 C1 C4 C2 C5 The optimum of Pi RDS is a lower bound of Pi / A for any separator assignment A
IJCAI Russian Doll Search with Tree Decomposition A D BC E F G J I H K P3 RDS A D BC E F G J I H K P2 RDS A D BC E F G J I H K P5 RDS A D BC E F G J I H K P4 RDS P1=P1 RDS A D BC E F G J I H K Same complexities as BTD: Time: O(exp(w+1)) Space: O(exp(s)) s w = tree-width = largest cluster size –1, s = largest separator size LB P3 RDS =0 LB P2 RDS =1 LB P5 RDS =0 LB P4 RDS =1 LB P1 RDS =5 LB P3 / {(E=red),(F=green)} =1, …
IJCAI Related Work A D BC E F G J H K I C6 C2 C3 C5 C4 C11 C7 C8 C10 C9 C1 RDS (Verfaillie et al, AAAI 1996) C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11
IJCAI Related Work A D BC E F G J H K I Pseudo-Tree RDS (Larrosa et al, ECAI 2002) AND/OR graph search (Marinescu & Dechter, AAAI 2006) C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C6 C2 C3 C5 C4 C11 C7 C8 C10 C9 C1
IJCAI Exploiting small separators only Merge clusters i and father(i) p if |sep i,father(i) | > p Gives more freedom for the dynamic variable ordering heuristic C5 C4 C3 C2 C1 A D BC E F G J I H K C3 C1 C4 C2 C5 {D} {E,F} {D,I,J} p p = 2 C3 C1 C4 U C5 C2 {D} {E,F} C4 U C5 (Jégou et al., CP 2007)
IJCAI Exploiting small separators only A D BC E F G J H K I DFBB C1 p p = 0
IJCAI Tag SNP Selection Set covering problem with additional coverage quadratic criteria
IJCAI Tag SNP Selection ∞ 4 DFBB BTD RDS-BTD 25 largest instances from HapMap human chr01 (r 2 ≥ 0.5) 171 ≤ n/2 ≤ ≤ d ≤ 266 6% ≤ m ≤ 37% 14% ≤ w ≤ 23% Solved by toulbar2 toulbar2 v.0.8 with initial upper bound found by FESTA and with MCS tree decomposition Time limit: 2 hours p
IJCAI Radio Link Frequency Assignment CELAR SCEN-07r (Constraints 4(1), 1999)
IJCAI Radio Link Frequency Assignment Maximum Cardinality Search tree decomposition heuristic Root selection: largest (SCEN-06) / most costly (SCEN-07r) cluster Last-conflict variable ordering (Lecoutre et al., 20006) and dichotomic binary branching Closing 1 open problem by exploiting tree decompostion CELARndmkpwDFBBBTD RDS- BTD SCEN ∞∞ sec.221 sec. 316 sec. SCEN-07r (> 50 days) 6 days 4.5 days RECORDS : SCEN-07r p = 3 BTD recorded LB (20 %) RDS-BTD recorded LB (6.4 %) RECORDS : SCEN-06 p = ∞ BTD 5633 recorded LB RDS-BTD 7145 recorded LB
IJCAI Conclusion and perspectives RDS-BTDRDS-BTD generalizes DFBB, RDS, PT-RDS, BTD,… exploiting better bounds Needs only linear extra space But there are not obtained in polynomial time small separatorsRestriction to small separators gives more robustness Give more freedom to dynamic variable ordering inside clusters Perspectives Produce any-time lower bounds (Iterative Deepening) p Dedicated heuristics to find small separators, p auto-tuning toulbar2 toulbar2 C++ solver version 0.8 ( )
IJCAI Enforcing local consistency by Equivalence Preserving Transformations AB f =0 1 1 Cost extension from a unary to a binary cost function AB f =0 Cost projection from a binary to a unary cost function AB 2 f = AB f =1 2 Cost projection from a unary cost function to f to f
IJCAI A1 A2 B1 B2 T|F a c d b b a D C B AE Weighted CSP model B2Representativity b0 a10 c100 d0 A1B2Constraint2 False a .. 0 B1Tagsnp TrueM False0 A1A2Constraint1 Falsea Truea0 Falseb0.. 0 A1B1Dispersion True 90 TrueFalse0 True0 False 0 a a