q
0,0
start
M
1
=
q
1,0
1,2,3
q
2,0
1,2,3
q
3,0
1,2,3
x
1
x
2
x
3
T
1
= {{1, 1,1},{1, 1,2}, {1,1, 3},{1,2, 1},{1, 2,2},
{1,2, 3},{1, 3,1}, {1,3,2}, {1,3, 3},{2,1, 1},
{2,1, 2},{2, 1,3}, {2,2,1}, {2,2, 2},{2,2, 3},
{2,3, 1},{2, 3,2}, {2,3,3}.{3, 1,1}, {3,1,2},
{3,1, 3},{3, 2,1}, {3,2,2}, {3,2, 3},{3,3, 1},
{3,3, 2},{3, 3,3}}
Figure 1: The tuple set T
1
and the automaton M
1
for
two equivalent constraints c
1
t
= (x
1
,x
2
,x
3
,T ) and c
1
r
=
(x
1
,x
2
,x
3
,M), with a compact automaton M.
this ratios CiT (compactness in transitions) resp. CiW
(compactness in width):
CiT = |T |/|M.∆|, (4)
CiW = |T |/width(M). (5)
Hypothesis 1. Given a regular constraint c
r
= (X ,M)
and an equivalent positive table constraint c
t
= (X ,T ).
If the CiT value for these constraints exceeds a certain
threshold, then using the regular constraint c
r
is more
promising than the table constraint c
t
, and otherwise
vice versa.
Hypothesis 2. Given a regular constraint c
r
=
(X,M) and an equivalent positive table constraint c
t
=
(X,T ). If the CiW value for these constraints exceeds
a certain threshold, then using the regular constraint
c
r
is more promising than the table constraint c
t
, and
otherwise vice versa.
Both hypotheses are motivated by the fact that for
finding one solution a table constraint has to unselect
all tuples but one via the supports and the regular con-
straint has to remove all transitions of all paths from
the initial state to the final state of the automaton but
one (if using the mentioned propagators).
The Figures 1 and 2 show the automatons M
1
and
M
2
of regular constraints c
1
r
and c
2
r
, and the tuples T
1
and T
2
of equivalent table constraints c
1
t
and c
2
t
. The
constraints c
1
r
and c
1
t
represented in Figure 1 allow all
possible combinations of the values 1, 2, and 3 for
the variables x
1
,x
2
, and x
3
, whereas, the constraints
c
2
r
and c
2
t
shown in Figure 2 allow all possible combi-
nations of the values 1, 2, and 3 for the variables x
1
,x
2
and x
3
, where the sum of the variables x
1
,x
2
and x
3
is
equal to a variable x
4
∈ {3,...,9}.
In both cases, there are 27 solutions, but in the
first case it’s a very compact automaton (with only 9
transitions) and in the second case a bigger automaton
(with 34 transitions). So in case one, six transitions
must be removed for the instantiation of a solution,
while in case two this are 30 transitions. In each case,
26 supports (representing the tuples) must be removed
in the corresponding table constraint.
q
0,0
start
M
2
=
q
1,1
1
q
1,2
2
q
1,3
3
q
2,4
3
2
1
q
2,2
1
q
2,3
2
1
q
2,5
3
2
q
2,6
3
q
3,6
3
2
1
q
3,3
1
q
3,4
2
1
q
3,5
3
2
1
q
3,9
3
q
3,8
3
2
q
3,7
3
2
1
q
4,0
3
4
5
6
7
8
9
x
1
x
2
x
3
x
4
T
2
= {{1, 1,1,3}, {1,1, 2,4},{1, 2,1, 4},{2,1, 1,4},
{1,1, 3,5}, {1,2,2, 5},{1, 3,1,5}, {2,1, 2,5},
{2,2, 1,5}, {3,1,1, 5},{1, 2,3,6}, {1,3, 2,6},
{2,1, 3,6}, {2,2,2, 6},{2, 3,1,6}, {3,1, 2,6},
{3,2, 1,6}, {1,3,3, 7},{2, 2,3,7}, {2,3, 2,7},
{3,1, 3,7}, {3,2,2, 7},{3, 3,1,7}, {2,3, 3,8},
{3,2, 3,8}, {3,3,2, 8},{3, 3,3,9}}
Figure 2: The tuple set T
2
and the automaton M
2
for
two equivalent constraints c
2
t
= (x
1
,x
2
,x
3
,x
4
,T ) and c
2
r
=
(x
1
,x
2
,x
3
,x
4
,M), with a big automaton M.
Because of the different values for CiT
1
= 27/9 vs.
CiT
2
= 27/34 and CiW
1
= 27/1 vs. CiW
2
= 27/7, CiT
and CiW both beeing bigger for the first problem, both
hypothesis suggest that in the first case, the regular
constraint and in the second case the table constraint
propagates relatively faster.
4 GENERATION OF RANDOM
PROBLEM INSTANCES
In this section, we explain the generation of the train-
ing data for the machine learning approach.
The main idea is to generate CSPs P
all
= {P
t
∪
P
r
∪ P
t∗
∪ P
r∗
}, which contain only one table (P
t
) or
regular (P
r
) constraint, and then to create an equiva-
lent CSP P
r∗
i
∈ P
r∗
for each CSP P
t
i
∈ P
t
, which uses
a regular constraint instead of a table constraint, and
vice versa. All other settings, like search strategies,
propagation order etc. are identical for P
t
i
∈ P
t
and
P
r∗
i
∈ P
r∗
(P
r
j
∈ P
r
and P
t∗
j
∈ P
t∗
resp.), so that the time
difference in the solution process should result exclu-
sively from the propagation time of the chosen con-
straint. Thus, the real impact of the used constraints
can be checked. In the following, we explain how we
create our random CSPs in P
t
and P
r
, to guarantee the
quality and transparency of our data.
2
2
The source code used to generate the samples can
be found at: https://git.informatik.tu-cottbus.de/loeffsve/
ICAART 2021 - 13th International Conference on Agents and Artificial Intelligence
976