Sven Löffler
email: sven.loeffler@b-tu.de

Ke Liu

Petra Hofstedt

An Introduction of FD-Complete Constraints

Keywords: Constraint Programming, CSP, Refinement, Optimizations, Regular Membership Constraint, Regular CSPs, Table Constraint, FD-Completeness

The performance of solving a constraint problem can often be improved by converting a subproblem into a single constraint (for example into a regular membership constraint or a table constraint).

In the past, it stood out, that specialist constraint solvers (like simplex solver or SAT solver) outperform general constraint solvers, for the problems they can handle. The disadvantage of such specialist constraint solvers is that they can handle only a small subset of problems with special limitations to the domains of the variables and/or to the allowed constraints. In this paper we introduce the concept of fd-complete constraints and fd-complete constraint satisfaction problems, which allow combining both previous approaches. More accurately, we convert general constraint problems into problems which use only one, respectively one kind of constraint. The goal is it to interpret and solve the converted constraint problems with specialist solvers, which can solve the transformed constraint problems faster than the original solver the original constraint problems.

Introduction

Constraint programming (CP) is a powerful method to model and solve NPcomplete problems in a declarative way. Typical research problems in CP are among others rostering, graph coloring, optimization, resource management, planning, scheduling and satisfiability (SAT) problems [START_REF] Marriott | Programming with Constraints -An Introduction[END_REF].

Because the search space of constraint satisfaction problems (CSPs) and constraint satisfaction optimization problems (CSOPs or COPs) is immensely big and the solution process often needs an extremely high amount of time we are always interested in improving the solution process. There are various ways to describe a CSP in practice and consequently, the problem can be modeled by different combinations of constraints, which results in the differences in resolution speed and behavior.

In particular, there is the possibility to represent a CSP with only one constraint or with constraints, which are of the same kind. Inspired by the concept of np-complete problems, we introduce the definition of fd-complete constraints.

A finite domain complete constraint (fd-complete constraint) is a finite domain constraint which can represent every other fd constraint. Thus an fdcomplete constraint can be used to replace each other constraint in a CSP.

Possible representatives of fd-complete constraints are the table constraint or the regular membership constraint. Previous researches show how constraints can be transformed into table [START_REF] Akgün | Automatic discovery and exploitation of promising subproblems for tabulation[END_REF] and regular membership [START_REF] Löffler | The power of regular constraints in csps[END_REF][START_REF] Löffler | The regularization of csps for rostering, planning and resource management problems[END_REF][START_REF] Löffler | A meta constraint satisfaction optimization problem for the optimization of regular constraint satisfaction problems[END_REF][START_REF] Löffler | The regularization of small sub-constraint satisfaction problems[END_REF] constraints. These publications also showed, that already the transformations into a regular membership or table constraint can improve the solving speed of a CSP.

In this paper, we want to go a step further. We not only transform parts of a CSP into an fd-complete constraint, we transform the whole CSP into one, which contains only a set (of the same kind) of fd-complete constraints. Thus we have the possibility to use a solver, solver settings or search strategies which are optimized for the used constraints.

The rest of this paper is structured as follows. In Section 2, we explain the necessary definitions of constraint programming. In Section 3, we introduce our new concept of fd-complete constraint satisfaction problem. Section 4 shows the transformation of a regular CSP into a binary variable scalar CSP. In Section 5, a rostering example is given to underline the benefit of finite domain CSPs. Finally, Section 6 draws a conclusion and proposes research directions in the future.

Remark 1:

We use the notation of a regular constraint as a synonym for regular membership respectively regular language membership constraint.

Preliminaries

In this section we introduce some basic definitions and concepts of constraint programming (CP) and show the relevant constraints, which are used in the rest of the paper. We consider CSPs, which are defined in the following way.

A constraint satisfaction problem (CSP) is defined as a 3-tuple P = (X, D, C) where X = {x 1 , x 2 , . . . , x n } is a set of variables, D = {D 1 , D 2 , . . ., D n } is a set of finite domains where D i is the domain of x i and C = {c 1 , c 2 , . . . , c m } is a set of constraints covering between one and all variables of X [START_REF] Rossi | Handbook of Constraint Programming[END_REF].

A constraint c j = (X j , R j ) is a relation R j , which is defined over a set of variables X j ⊆ X [4].
The scope of a constraint c j = (X j , R j ) indicates the set of variables, which is covered by the constraint c j : scope(c j ) = X j [START_REF] Dechter | Constraint processing[END_REF]. For the reason that we only consider finite domains, it is always possible to enumerate all allowed tuples of a constraint, which we will use for the transformation into other constraints like regular or table constraints.

Based on the definition above, an fd-complete constraint can substitute all constraints C of a given CSP P = (X, D, C). For the reason that a CSP can only have a limited number of solutions c sol , because we have a limited number of variables n and a limited number of values inside of the domains of the variables, it is possible to enumerate all of the solutions of a CSP.

It follows a list of definitions of the relevant constraints for this paper. Let a CSP P = (X, D, C) and a subset X of variables X of the CSP P be given.

The scalar constraint guarantees for an ordered subset of variables X = {x 1 , . . . , x n } ⊆ X, a vector of integers v = (v 1 , ..., v n ), a relation and another variable x r ∈ X that the scalar product of the variables X with the vector v is in relation to x r . scalar(X , v, , x r ) = (

n i=1 x i * v i ) x r
Like we already figured out, the table and the regular constraints are representatives of fd-complete constraints. It follows a short description of these both constraints.

The table constraint is one of the most frequently used constraints in practice. For an ordered subset of variables X = {x 1 , . . . , x n } ⊆ X, a positive (negative) table constraint defines that any solution of the CSP P must (not) be explicitly assigned to a tuple t of a given tuple list T , which consists the allowed (disallowed) combinations of values for X . For a given list of tuples T , we can state the positive table constraint as:

table(X , T ) = {(x 1 , . . . , x n ) | x 1 ∈ D 1 , . . . , x n ∈ D n } ⊆ T
The regular constraint and its propagation [START_REF] Hellsten | A domain consistency algorithm for the stretch constraint[END_REF]13,[START_REF] Pesant | A regular language membership constraint for finite sequences of variables[END_REF] is based on deterministic finite automatons (DFAs) [7]. Thus, we briefly review the notion of a deterministic finite automaton (DFA) before we define the regular constraint.

A deterministic finite automaton (DFA) is a quintuple M = (Q, Σ, δ, q 0 , F ), where Q is a finite set of states, Σ is the finite input alphabet, δ is a transformation function Q × Σ → Q, q 0 ∈ Q is the initial state, and F ⊆ Q is the set of final or accepting states. A word w ∈ Σ * is accepted by M , if the corresponding DFA M with the input w stops in a final state f ∈ F . All accepting words of the DFA M can be summarized to the accepting language L(M ) of the DFA M

[7].
The regular constraint is another of the most common constraints in practice. Let M = (Q, Σ, δ, q 0 , F ) be a DFA, let X = {x 1 , . . . , x n } be an ordered set of variables with domains D = {D 1 , D 2 , . . . , D n }, ∀i ∈ {1, . . . , n} : D i ⊆ Σ. The regular constraint is defined as:

regular(X, M ) = {(w 1 , . . . , w n ) | ∀i ∈ {1, . . . , n}, w i ∈ D i , (w 1 w 2 . . . w n ) ∈ L(M )}[6]
So the concatenation of the values v i of the variables x i ∀i ∈ {1, ..., n} must be accepted by the automaton M . The input DFA M of a regular constraint is internally transformed into a directed acyclic graph (DAG) M [START_REF] Pesant | A regular language membership constraint for finite sequences of variables[END_REF].

We define a directed acyclic graph (DAG) as a DFA M = (Q, Σ, δ, q initial , F ), where the states q in Q are partitioned into levels

Q = {Q 0 , ..., Q n | Q i = {q i,1 , q i,2 , ...} | ∀i ∈ {1, .
.., n}}, the initial state q 0,0 is the only element of Q 0 , the final states are members of the last level of states (F = Q n ), and transitions are only allowed from a state q i,j in level Q i to a state q t,k in level Q t , where t ≥ i.

For our use, we only allow transitions from a state q i,j in level Q i to a state q i+1,k in level Q i+1 . We use the notation q i,j v --→ q i+1,k , if the state q i,j of level Q i have a transition with value v to the state q i+1,k of level Q i+1 . A solution of a regular constraint is a path from the initial state q 0,0 to the final state q n,0 with values

v 1 ∈ D 1 , ..., v n ∈ D n (q 0,0 v 1 --→ q 1,j1 v 2 --→ ... v n ---→ q n,0 ).

Based on the definition of the regular constraint, we use the notion of a regular constraint satisfaction problem, and analogously the notation of a table CSP:

A regular constraint satisfaction problem (regular CSP) is defined as a 3tuple P = (X, D, C), where X = {x 1 , x 2 , . . . , x n } is a set of variables, D = {D 1 , D 2 , . . ., D n } is a set of finite domains where D i is the domain of x i and C = {c 1 , c 2 , . . . , c m } is a set of regular constraints over variables of X.

A table constraint satisfaction problem (table CSP) is defined as a 3-tuple P = (X, D, C), where X = {x 1 , x 2 , . . . , x n } is a set of variables, D = {D 1 , D 2 , . . ., D n } is a set of finite domains where D i is the domain of x i and C = {c 1 , c 2 , . . . , c m } is a set of table constraints over variables of X.

FD-Complete CSPs

After we defined fd-complete constraints and showed two examples (the table and the regular constraint), we will extend this concept a little bit more. The possibility to substitute a constraint or a subset of constraints of a CSP with an fd-complete constraint can lead to a speed up in the solution process [START_REF] Akgün | Automatic discovery and exploitation of promising subproblems for tabulation[END_REF][START_REF] Löffler | The power of regular constraints in csps[END_REF][START_REF] Löffler | The regularization of csps for rostering, planning and resource management problems[END_REF][START_REF] Löffler | A meta constraint satisfaction optimization problem for the optimization of regular constraint satisfaction problems[END_REF][START_REF] Löffler | The regularization of small sub-constraint satisfaction problems[END_REF]. The problem is that it is mostly not useful to transform a whole CSP into another one with only one fd-complete constraint, which substitutes all constraints of the original CSP. In most cases, the transformation process will be more time consuming than solving the original problem.

Mostly, we can reduce this slow-down significantly and reach a speed-up, if we substitute only some of the constraints c i ∈ C of a given CSP P = (X, D, C) with semantically equivalent fd-complete constraints c fd i ∈ C fd and combine them together (to constraints c c fd j ∈ C c fd ). Finding the best subset of constraints, which should be transformed and combined, depends on several things like the needed time for transformation or the size of the data structures of the transformed or the combined constraints.

Often, a CSP P = (X, D, C ), which contains some of the original constraints c i ∈ C and some of the combined constraints c c fd j , which are semantically equivalent to a subset of the fd-complete constraints C fd , has the fastest solution process.

In contrast to this, we will explain why it can be useful to create a CSP P = (X, D, C) with only singleton c fd i and combined fd-complete constraints c c fd j , even though the propagation of the original constraint c i is possibley faster than the propagation of the corresponding fd-complete constraint c fd i . The advantage is, that we may be able to (create and) use specialist constraint solvers for CSPs which have only constraints of a special type (a popular example is the simplex algorithm, which allows only linear optimization under linear side conditions). Furthermore, we can create and use more efficient search strategies and solver settings if the used constraints have the same shape.

Also interesting for future researches is, that a CSP P with only one kind of constraint may be able to be transformed easier into other models for example a SAT model and make it possibley simpler to transfer a constraint problem of a given language into another one. The last idea is for example used to translate MiniZinc [START_REF] Tack | Minizinc 2.3.2[END_REF] models into other models (like Gecode [START_REF] Schulte | Gecode 6.2.0[END_REF], Google OR-Tools [START_REF]Google OR-Tools[END_REF] or Choco [START_REF] Prud'homme | Choco Documentation[END_REF] models). Thus, many constraints, which were entered in MiniZinc, will be translated into the table constraint.

Based on the potential benefit of CSPs, which contain only fd-complete constraints, we created the definition of an fd-complete CSP.

A finite domain complete constraint satisfaction problem (fd-complete CSP) is a CSP P = (X, D, C) which contains only fd-complete constraints of the same kind.

Examples for an fd-complete CSP are the regular CSP [START_REF] Löffler | The regularization of csps for rostering, planning and resource management problems[END_REF] or the table CSP. We call fd-complete CSPs with n different kinds of constraints fd-complete CSPs of degree n. We differentiate between two kinds of fd-complete CSPs. On the one hand we have directly convertible fd-complete CSPs like table or regular CSPs. Every general CSP P = (X, D, C) can be transformed into a directly convertible fd-complete CSP P dc fd = (X, D, C fd ) by transformation of each single constraint c ∈ C to the corresponding fd-complete constraint c ∈ C fd . In particular, it is not necessary to transform the variables X or domains D of the original CSP P .

On the other hand, there are indirectly convertible fd-complete CSPs P ic fd = (X , D , C fd ), where the variables and their domains must be transformed addi-tionally to the constraints. We present a representative example of this group in the next section. [START_REF] Dechter | Constraint processing[END_REF] The Binary Scalar CSP as a Representative of FD-Complete CSPs

In this Section, we will introduce a description of how a general CSP P can be transformed into a CSP P bvsc , which contains only binary variables and scalar constraints. Using only binary variables allows us the use of the very good researched SAT solvers, for solving P bvsc . Furthermore, for the reason that the CSP P bvsc only contains scalar constraints, we expect that a possibley more accurate and more specialized solver can be created to solve it.

Traditionally, an input CSP P for a SAT solver contains binary variables and logic constraints like and, or, implication, negation etc. It is also possible to transform a regular constraint into a set of logic constraints, but we will see, that the transformation into a set of scalar constraints is more compact. Thus, we expect that a specialized solver for scalar constraints over binary variables works faster than a usual SAT solver.

The transformation from a general CSP P to a binary variable scalar CSP P bvsc can happen in two steps.

Step one: transforming the CSP P = (X, D, C) into a regular CSP P reg = (X, D, C reg ), which contains the same variables X, the same domains D, but only regular constraints C reg instead of the original constraints C. For example, it is possible to transform each original constraint c ∈ C into a regular constraint c reg ∈ C reg . The algorithms and transformations presented in [START_REF] Löffler | The power of regular constraints in csps[END_REF][START_REF] Löffler | The regularization of csps for rostering, planning and resource management problems[END_REF][START_REF] Löffler | A meta constraint satisfaction optimization problem for the optimization of regular constraint satisfaction problems[END_REF][START_REF] Löffler | The regularization of small sub-constraint satisfaction problems[END_REF] can be used for this step.

Step two: transform the regular CSP P reg = (X, D, C reg ) into a binary variable scalar CSP P bvsc = (X b , D b , C sc ). We consider a regular CSP P reg = (X, D, C reg ) with n variables X = {x 1 , ..., x n }, the associated finite domains i,j ∈ x b of P bvsc is set to 1, it represents that the corresponding variable x i ∈ X in the regular CSP P reg is set to the value d j , where d j is the j-th value of D i , otherwise, if a variable x b i,j ∈ X b of P bvsc is set to 0, it represents that the corresponding variable x i ∈ X in the regular CSP P reg cannot be set to the value d j . Thus transform the original search space into a binary variable search space.

The second kind of variables represents the states of the underlying DAGs of the regular constraints C reg . Each regular constraint c reg h ∈ C reg has a DAG M h which represents the regular expression of the regular constraint. For each state q h i,j of each DAG M h , a binary variable x h i,j represents if the state q h i,j is on a solution path (x h i,j is set to one) or not (x h i,j is set to 0). After defining the variables and the domains (all {0,1}) we need to define our constraints, which must be semantically equivalent to the constraints C reg and realize that each binary variable set {x b i,1 , ..., x b i,|Di| }, which represents one original variable x i ∈ X, contains only one variable which is instantiated to 1. This guarantees that we can directly conclude a solution of the original CSP P from a solution of P bvsc . Doing this, we have for each binary variable set {x b i,1 , .

Analogously, we have constraints for each set of variables x h i,j , which represents each one level i of the DAG M h . The path of each solution of a DAG contains only one state q h i,j of each level i. Thus, we can define the following scalar constraints (see Equation 2). ∀i ∈ {0, ..., n}, h ∈ {1, ...,

|C reg |} : scalar({x h i, * }, {1, ..., 1}, =, 1) (2)
To represent a DAG M h , we need to describe the paths of the solutions of the DAG. The initial state q h 0,0 and the final state q h n,0 are mandatory parts of a solution path. Thus, the variables x h 0,0 and x h n,0 must be set to 1. A state q h i,j3 of a DAG M h is part of a solution path, if one of its predecessor states q h i-1,j1 and one of the values d i-1,j2 ∈ D i-1 of the edge between this both states is part of the solution path. This can be represented by the logical formula q i-1,j1 ∧ d i-1,j2 → q h i,j3 . See Figure 1 for some example path relations. Applied to our variable system it concludes the formula

x h i-1,j1 ∧ x b i-1,j2 → x h i,j3
. Furthermore, this logical formula can be represented as scalar constraint (see Equation 3). ∀i ∈ {1, ..., n}, h ∈ {1, ..., |C reg |}, j 1 , j 2 , j 3 , where

q h i-1,j1 d i-1,j2 ------→ q h i,j3 is an edge in M h : scalar({x h i-1,j1 , x b i-1,j2 , x h i,j3 }, {1, 1, -2}, ≤, 1) (3)
The equivalence of the statement

x h i-1,j1 ∧ x b i-1,j2 → x h i,j3
with the statement in Equation 3 can be easily proved with the truth table shown in table 1. The result of the logical formula is always true if the scalar product is smaller or equal to one, otherwise it is false.

Thus, we have everything we need to represent the regular CSP P reg = (X, D, C reg ) as a binary variable scalar CSP P bvsc = (X b , D b , C sc ), with

qi-1,1 qi,1 di-1,3 qi-1,2 ... qi-1,3 qi,2 di-1,1, di-1,2 di-1,1 di-1,3 qi,3 di-1,1 ... States Qi-1 States Qi xi-1 Path relations qi-1,1 ∧ di-1,3 → qi,1 qi-1,1 ∧ di-1,1 → qi,2 qi-1,1 ∧ di-1,2 → qi,2 qi-1,2 ∧ di-1,1 → qi,2 qi-1,3 ∧ di-1,3 → qi,2 qi-1,3 ∧ di-1,1 → qi,3
h i-1,j 1 ∧ x b i-1,j 2 → x h i,j 3 and scalar({x h i-1,j 1 , x b i-1,j 2 , x h i,j 3 }, {1, 1, -2}, ≤ , 1)
.

x h i-1,j 1 ∧ x b i-1,j 2 → x h i,j 3 ⇔ 1 * x h i-1,j 1 + 1 * x b i-1,j 2 -2 * x h i,j 3 ≤ 1 T rue ∧ T rue → T rue True ⇔ 0 ≤ 1 1 * 1 + 1 * 1 -2 * 1 ≤ 1 T rue ∧ T rue → F alse False ⇔ 2 ≤ 1 1 * 1 + 1 * 1 -2 * 0 ≤ 1 T rue ∧ F alse → T rue True ⇔ -1 ≤ 1 1 * 1 + 1 * 0 -2 * 1 ≤ 1 T rue ∧ F alse → F alse True ⇔ 1 ≤ 1 1 * 1 + 1 * 0 -2 * 0 ≤ 1 F alse ∧ T rue → T rue True ⇔ -1 ≤ 1 1 * 0 + 1 * 1 -2 * 1 ≤ 1 F alse ∧ T rue → F alse True ⇔ 1 ≤ 1 1 * 0 + 1 * 1 -2 * 0 ≤ 1 F alse ∧ F alse → T rue True ⇔ -2 ≤ 1 1 * 0 + 1 * 0 -2 * 1 ≤ 1 F alse ∧ F alse → F alse True ⇔ 0 ≤ 1 1 * 0 + 1 * 0 -2 * 0 ≤ 1 X b = {x b i,j | ∀i ∈ {1, ..., n}, j ∈ {1, ..., |D i |}} ∪ {x h i,j | ∀h ∈ {1, ..., |C reg |}, i ∈ {0, ..., n}, j ∈ {1, ..., |Q h i |}} D b = {D i = {0, 1} | ∀i ∈ {1, ..., |X b |}} C sc = {scalar({x b i,1 , ..., x b i,|Di| }, {1, ..., 1}, =, 1) | ∀i ∈ {1, ..., n}} ∪ {scalar({x h i, * }, {1, ..., 1}, =, 1) | ∀i ∈ {0, ..., n}, h ∈ {1, ..., |C reg |}} ∪ {scalar({x h i-1,j1 , x b i-1,j2 , x h i,j3 }, {1, 1, -2}, ≤, 1)} | ∀i ∈ {1, ..., n}, h ∈ {1, ..., |C reg |}, j 1 , j 2 , j 3 , where q h i-1,j1 d i-1,j2 ------→ q h i,j3 is an edge in M h } Remark 2 :
The constraints in Equation 1 and 2 are the reason, why we use scalar constraints instead of logic constraints, because such count constraints are just not compactly representable as logic constraints, but very simple as scalar constraints.

Remark 3 : In the implementation we did some optimizations like merging different scalar constraints, which represent path relations between the same states (q i-1,j1 , q i,j3 ), but with k different values (d i-1,j2,1 , ..., d i-1,j 2,k ) to one single scalar constraint.

Experimental Results

For demonstrating the benefit of fd-complete constraints and fd-complete CSPs, we use a rostering problem close to the presented one in section 4.1 in [START_REF] Löffler | The regularization of csps for rostering, planning and resource management problems[END_REF]. Briefly summarized, consider the rostering problem four shifts (0 = day off, 1 = early, 2 = late, 3 = night shift), m employees and w weeks. Let n be the number of days (n = w * 7). The goal is it to find a valid shift assignment for all employees, such that the following four restrictions are satisfied: R 1 : At each Saturday is the same shift as at the following Sunday. R 2 : A forward rotating system is used, so the following shift combinations are not allowed for two days in a row: (late, early), (night, early), (night, late). R 3 : There is a minimum number of two and a maximum number of four (for night shifts 3) consecutive days, with the same shift. R 4 : Between w 4 and w 4 + 1 employees are needed for each shift and day. The given restrictions cover some but not all German laws for shift planning, but it is possible to extend the problem for individual use cases. The difference to [START_REF] Löffler | The regularization of csps for rostering, planning and resource management problems[END_REF] is that we changed in restriction R 4 the upper bound from w 4 to w 4 + 1 to guarantee that every problem has at least one solution.

As typical for many rostering problems, we just consider the plan of one person P 1 and assume that the plan for further staff is received by rotating P 1 s plan by one week, two weeks, etc. For example given a shift plan sol P1 = (v 1 , v 2 , . . . , v n ) for person P 1 , the plan for a person P 2 would be (v 8 , v 9 , . . . , v n , v 1 , ..., v 7 ), for a person P 3 would be (v 15 , v 16 , . . . , v n , v 1 , ..., v 14 ), and so on.

The following naive CSP P naive describes the given rostering problem. The constraints in C 1 satisfy the restriction R 1 , the constraints in C 2 satisfy the restriction R 2 , the constraints in C 3 , C 4 and C 5 satisfy the restriction R 3 and the constraints in C 6 and C 7 satisfy the restriction R 4 . For our benchmark suite we computed different instances of the rostering problem with number of weeks respectively number of employees is equal to 4(, 5, 6, 7 and 8) in different versions:

1. Naive: The CSP is directly solved as it is modeled in P naive . 2. Regular : Each constraint was substituted by a regular version of it as described in [START_REF] Löffler | The regularization of small sub-constraint satisfaction problems[END_REF]. 3. RegularIntersected : Each constraint was substituted by a regular version of it as described in [START_REF] Löffler | The regularization of small sub-constraint satisfaction problems[END_REF] and the regular versions of the constraints C 1 to C 5 are combined to one regular constraint. 4. BVSC : The CSP P naive was transformed into a binary variable scalar constraint CSP P bvsc as described above. 5. BVSCO: The binary variable scalar constraint CSP P bvsco was created and optimized by hand.

All the experiments are set up on a DELL laptop with an Intel i7-4610M CPU, 3.00GHz, with 16 GB 1600 MHz DDR3 and running under Windows 7 Professional with Service Pack 1. The algorithms are implemented in Java under JDK version 1.8.0 191 and Choco Solver version 4.0.4 [START_REF] Prud'homme | Choco Documentation[END_REF]. We used the DowOverW Deg search strategy which is explained in [3] and used as default search strategy in the Choco Solver [START_REF] Prud'homme | Choco Documentation[END_REF]. Table 2 shows a comparison of the different modelling versions. For four and five weeks, all approaches found all solutions (100%). The RegularIntersected and the BVSCO approach are the fastest with distance to the other approaches. Only the RegularIntersected approach found all solutions for the 6, 7 and 8 week problem. It is shown how many solutions every approach found in at maximum 600 seconds, which was the time out. It is visible that the RegularIntersected approach is always the fastest and the BVSC approach is always the worst. But we also can see, that the by hand optimized BVSCO is also always very good, much better than the original approach. In these experiments we did not use reduction methods, which are known from equality and inequality solving. We think that in the future we can find an automatic way from the original CSP to one which is very close to the BVSCO, and so one that is much better than the original, naive problem. It is clearly evident, those fd-CSPs like regular CSPs or binary variable CSPs with scalar constraints can lead to significant improvement of the solution process of constraint problems.

Remark 4: The transformation time to create the responsible fd-CSPs from the original CSP was always included in the calculation time in table 2.

Remark 5: The results presented in table 2 show already the power of fdcomplete constraints (the RegularIntersected and the BVSCO approach are partial more than 24 times faster as the original naive approach). Further more we may can improve the solution process much more if we use a specific solver for regular CSPs or binary variable CSPs with scalar constraints instead of the general fd-solver Choco.

Conclusion and Future Work

We have presented a new class of constraints, which allows describing every other CSP with a single constraint (fd-complete constraint). We extended this approach to fd-complete CSPs, which are also able to represent each other CSP. Furthermore, we introduced an example fd-complete CSP, the binary scalar CSP, and explained why we think, that this fd-complete CSP can improve the solution speed of general CSPs. In Section 2 was shown that the use of fd-CSPs like regular CSPs or binary variable CSPs with scalar constraints can improve the solution process of CSPs in a significant way.

Future work includes the creation of specialist constraint solvers, specialist search strategies and specialist constraint solver settings. We expect that there are a big number of fd-complete constraints and fd-complete CSPs and, therefore, also a high number of specialist constraint solvers and search strategies, which need to be discovered. Moreover, we need an algorithm to decide into which fd-CSP we should transform given problems.

  The relation R of a constraint c = (X, R) is more clearly a subset of the Cartesian product of the domain values D 1 × ... × D n of the corresponding variables X = {x 1 , ..., x n }. Examples for constraints are amongst other things c 1 = ({x, y}, (x > y)), c 2 = ({R, U, I}, (R = U/I)) or c 3 = ({A, B, C}, (A ∧ B → C)).

  D = {D 1 , ..., D n } and m regular constraints C reg = {c reg 1 , ..., c reg m } and transform it into a binary variable scalar CSP P bvsc = (X b , D b , C sc ) with k variables X b = {x b 1 , ..., x b k }, which have all the domain {0, 1} = D b 1 = ... = D b k , and l scalar constraints C sc = {c sc 1 , ..., c sc l }. There are two kinds of variables in X b . The first kind contains for each domain value of each variable of the regular CSP P reg , respectively the original CSP P , a binary variable x b i,j ∀i ∈ {1, ..., n}, j ∈ {1, ..., |D i |}. If such a variable x b

Fig. 1 :

 1 Fig. 1: Example path relations for an excerpt of a DAG.

Fig. 2 : 4 |

 24 Fig. 2: The naive CSP Pnaive, which describes the given rostering problem. X = {x1, ..., xn} D= {D1 = ... = Dn = {0, 1, 2, 3}} C = C1 = {xi+6 = xi+7 | ∀i ∈ {1, ..., w}} ∪ C2 = {(xi, xi+1) ∈ {(2, 1), (3, 1), (3, 2)} | ∀i ∈ {1, ..., n}} ∪ C3 = {(xi == xi+1) ∨ (xi == xi-1)} | ∀i ∈ {2, ..., n -1}} ∪ C4 = {allEqual (xi, xi+1, xi+2, xi+3) → (xi = xi+4) | ∀i ∈ {1, ..., n -4}} ∪ C5 = {allEqual (xi, xi+1, xi+2, 3) → (xi = xi+3) | ∀i ∈ {1, ..., n -3}} ∪ C6 = { w i=1 x i+d ≥ w 4 | ∀d ∈ {1, ..., 7}} ∪ C7 = { w i=1 x i+d ≤ w 4 + 1 | ∀d ∈ {1, ..., 7}}

Table 1 :

 1 The truth table to show the equivalence of x

Table 2 :

 2 A comparison of the solution process of the given rostering problem with different sizes and different modelling versions. ( * Time limit was reached.)

	Problem #Solutions Naive BVSC BVSCO Regular RegularIntersected
	4 weeks	44 100%	100%	100% 100%	100%
			0.726s 5.815s 0.155s 2.139s	0.371s
	5 weeks	217339 100%	100%	100% 100%	100%
			96.622s 345.377s	8.87s 59.599s	5.697s
	6 weeks	9443633	17%	2%	100%	34%	100%
			600s *	600s * 396.619s 600s *	196.055s
	7 weeks	8463303	9%	0.1%	84%	28%	100%
			600s *	600s *	600s * 600s *	214.486s
	8 weeks	42979	11% 0.002%	93%	76%	100%
			600s *	600s *	600s * 600s *	25.649s