5.4 Heuristics to Choose the Root Node
To improve further the performance of HD DBT we
introduce different heuristics based on the way the
nodes of the hypertree are explored. The nodes are
traversed in a depth-first order from one given root.
But the choice of the root is not unique, and a ratio-
nal choice of the root may considerably improve the
overall performance of the resolution. For choosing
the root node, the three following methods may be
distinguished: structural, semantic and hybrid heuris-
tics.
Structural Heuristics depend on the size of the
clusters at each node. We will consider the fol-
lowing structural heuristics:
• LC (Largest Cluster): the node with the largest
number of constraints.
• SC (Smallest Cluster): the node with the small-
est number of constraints.
• LNS (Largest Number of Sons): the node with
the largest number of sons.
• LS (Largest Separator): the node with the
largest separator with one of its sons.
Semantic Heuristics exploit the data properties (the
size of relations, the density of nodes, the hard-
ness of constraints ...). Here we consider that we
have already computed the number of solutions of
any node i denoted by Nbsol(i). This step is not
expensive thanks to the small number of variables
at each node. We will consider the following se-
mantic heuristics:
• MCN (Most Constrained Node): the node with
the smallest number of solutions.
• LCN (Least Constrained Node): the node with
the largest number of solutions.
• HN (Hardest Node): the “hardest node”.
Hardness of a node corresponds to
Nbsol
NbMax
where Nbsol is the exact number of solutions
and NbMax is the number of possible tuples
of a node (cartesian product of the variables
domains).
Hybrid Heuristics combine in different ways struc-
tural and semantic heuristics eg. HN & LNS , LG
& HN , HN & LC heuristics.
Table 3 shows the results for the different struc-
tural heuristics for the choice of the root. Recall this
choice induces an order σ on the nodes and the row
BE corresponds to the order induced by BE. We re-
mark that the best orders (for the hardest problems of
the test) are the one returned by BE and SC.
Table 3: Comparing different structural orders.
Problems Order
BE LC SC LNS LS
series− 6 − ext 0,09 0,07 0,43 0,07 0,12
series− 7 − ext 0,08 3,48 3,18 3,5 0,96
domino− 100− 100− ext 0,125 0,14 0,49 0,13 0,22
domino− 100− 200− ext 0,24 0,23 0,27 0,23 0,28
domino− 100− 300− ext 0,35 0,36 0,69 0,34 0,51
Langf ord 0,03 0,31 0,91 8,73 1,02
geom− 30a − 4− ext 0,03 0,03 5 0,23 1,02
pigeons− 7 − ext 4,34 4,19 3,5 12 4,23
haystacks − 06− ext 3,33 3,35 3,33 3,22 3,21
Renault1 3,38 3,02 4,41 3,03 3,31
Renault2 8,87 9,02 8,88 / /
Renault − Modified −6 32,07 / 36,09 / /
Renault − Modified −24 21,25 / 18,32 / /
Renault − Modified −30 24,28 / 22,05 / /
Renault − Modified −33 25,42 / 26,01 / /
Renault − Modified −47 19,64 / 21,02 / /
Table 4 shows the results for the different semantic
heuristics for the choice of the root. We remark that
the better choice is given by the MCN heuristic.
Table 4: Comparing different semantic orders.
Problems Size Orders
|V| |E| MCN LCS HN
series− 6 − ext 11 30 0,10 0,38 0,43
series− 7 − ext 12 41 0,55 3,48 0,13
domino− 100− 100− ext 100 100 0,12 0,70 0,49
domino− 100− 200− ext 100 100 0,23 2,32 0,76
domino− 100− 300− ext 100 100 0,36 5,14 0,75
Langf ord 8 32 0,14 0,36 0,09
geom− 30a − 4− ext 30 81 7 1,23 0,03
pigeons− 7 − ext 7 21 11 4,23 4,2
haystacks − 06
−
xt 36 96 6,96 3,32 3,31
Renault1 101 134 3,03 3,02 3,04
Renault2 101 113 7,90 8,36 8,34
Renault −Modi fied − 6 111 147 22,07 / /
Renault −Modi fied − 24 111 159 19,04 / /
Renault −Modi fied − 30 111 154 28,02 / /
Renault −Modi fied − 33 111 154 27,03 / /
Renault −Modi fied − 47 108 149 12,02 / /
Finally, we combine the best structural heuristic
with the best semantic one resulting in BE with MCN
hybrid heuristic. The results are given in Table 5
showing that execution times are always better with
an hybridation of heuristics.
5.5 Heuristics for Choosing Son Nodes
In this section, we experiment different heuristics to
choose the best successor node (function Succ of Al-
gorithm 2) to be solved from the sons of the current
node. We suppose here the root has been already cho-
sen and heuristics have only the choice for the first
son, and it may be considered statically or dynami-
cally.
• Static Choice: the first son to be chosen is the
one with the largest hypertree-width.
• Dynamic Choice: since the best strategy from the
static viewpoint is the one with the minimum of
number of tuples in its relations, we evaluate here
the impact of choosing the next son with the min-
imum number of tuples dynamically. Thus to be
SOLVING NON BINARY CONSTRAINT SATISFACTION PROBLEMS WITH DUAL BACKTRACKING ON
HYPERTREE DECOMPOSITION
153