Solving the Weighted Constraint Satisfaction Problems Via the Neural Network Approach

— A wide variety of real world optimization problems can be modelled as Weighted Constraint Satisfaction Problems (WCSPs). In this paper, we model this problem in terms of in original 0-1 quadratic programming subject to leaner constraints. View it performance, we use the continuous Hopfield network to solve the obtained model basing on original energy function. To validate our model, we solve several instance of benchmarking WCSP. In this regard, our approach recognizes the optimal solution of the said instances.


I. Introduction
C onstraint programming is a successful technology for solving combinatorial problems modelled as constraint satisfaction problems (CSPs). In the last few years, the CSP framework has been extended to the soft constraints permits to express preferences among solutions [2] [3]. Soft constraint frameworks associate costs to tuples and the goal is to find a complete assignment with minimum aggregated cost. Costs from different constraints are aggregated with a domain dependent operator. This case is known as the Weighted Constraint satisfaction problems (WCSPs) [15][16] [21]. This latter is an extension of the CSP problem. Each constraint of the problem has an associated weight. If a solution violates a constraint, then the weight associated to the corresponding solution is incurred. Every solution has a cost as the sum of all weight incurred by the solution. The objective of this problem is to find the solution with the minimum cost.
In this paper, we focus on the weighted constraint satisfaction problem (WCSP), a well-known non-idempotent soft-constraint framework with several applications in several domains such as resource allocation, scheduling, bioinformatics, CP networks and probabilistic reasoning [16]- [17]. In the literature, a number of different approaches have been developed to solve this problem [7]- [9]- [10]- [14]- [15]. In this work we propose a new model of WCSP problem consists in minimizing the quadratic objective function subject to linear constraints (QP). To solve the QP problem, many different methods are tried and tested such as interior point, semi definite relaxations and lagrangian relaxations [20]. In our case, we introduce the continuous Hopfield network for solving The QP problem in order to validate our model.
Hopfield neural network was introduced by Hopfield and Tank [10] [11] [13] [23]. It was first applied to solve combinatorial optimization problems. It has been extensively studied, developed and has found many applications in many areas, such as pattern recognition, model identification, and optimization. CHN also demonstrated capability of finding solutions to difficult optimization problems [5].
In this paper, our main objective is to propose a new approach for solving the weighted constraint satisfaction problems using continuous Hopfield network. This paper is organized as follows: In section 2, we define weighted constraint satisfaction problems. In the last section, we propose and describe the new model of the binary WCSP problem. This problem is formulated as a quadratic assignment problem with linear constraints. A new theorem, which consists to define the relation between the WCSP problem and the quadratic programming, is demonstrated. In section 4, an introduction of CHN is presented, the generalized energy function associated to WCSP problem is defined and a direct parameter setting procedure is computed. Finally, the implementation details of the proposed approach and experimental results are presented in the last section.

II. New Model of Weighted Constraints Satisfaction Problems
A constraint satisfaction problem refers to the problem of finding values to a set of variables, subject to constraints on the acceptable combination of values. Solving this problem requires finding values for problem variables from each domain, which satisfies all members of the set of constraints. In some cases a privilege tuples relative to others. This case is known as a weighted constraint satisfaction problem (WCSP). The solution of this later is similar then the classical CSP with the cost according to this solution is optimal.

A. Weighted constraint satisfaction problem
Each constraint of the problem has an associated weight (or error). If a solution violates a constraint, then the weight associated to this solution is incurred. Every solution has a cost which consists of the sum of all weight incurred by the solution. For a WCSP problem, a relevant question, both theoretically and practically, is to determine an assignment of values to variables with the minimum cost. This problem is calcified as NP-hard problems [8].
In general, a WCSP problem forms a class of models representing problems that have as common properties, a set of variables and a set of constraints [2]- [3]. The variables should be instantiated from a discrete domain. The study of WCSP problem has become focused on binary forms. More precisely, a weighted constraint satisfaction problem is defined by a quadruplet sets (Y, D, C, S(k)) where: y y is the set of n variables, • S(k) is the valuation structure, where K + ∈  denotes the maximum cost.
• The valuation structure is defined as where: • {0, 1, ..., k} is the set of costs, which are natural numbers bounded by k. • ⊕ is the sum of costs ∀a, b ∈ {0, 1, ..., k}, a⊕b = min{k, a + b} • > is the standard order among naturals.
For each constraint C ij and each tuple t p represented by two values (v r ,v s ) from the domains associated with the variables involved in C ij , a cost c rs ∈{0,1, . . . , k} is assigned to t p . When a constraint C ij assigns the cost k to a tuple t k , it means that C i forbids t p . Otherwise, t p is permitted by C i with the corresponding cost. The cost of an instantiation of variables is the sum (using operator ⊕) over all constraints involving variables instantiated.

B. Modelling the WCSP problems
The solution of weighted constraint satisfaction problem is based on assigning each variable, a value from its domain with the minimum cost. In this context, we propose a new model of the WCSP problem as 0-1 quadratic programming, which consists in minimizing a quadratic function subject to linear constraints. During this phase of modelling, we use different mathematical notations motioned bellow.
In this case, we want to propose a formulation of the WCSP problem. This formulation is based on the selection variables. Then, in the first time, for each variable i y of the WCSP problem, we introduce i d binary variables ir x such that: The vector of variables is represented by: Based on this binary variable we have for each couple ( , ) The mean property of the solution to the WCSP is that each variable i y must take an unique value r v from its domain ( ) i D y . Then the linear constraints of WCSP problem are defined bellow: In the second time, it is necessarily to treat two cases. The first one is the case of the unary constraints, but the second one is case of the binary constraints. Then, for each value v r we generate a constant:

Each unary constraint
Based on these propositions (equations (1) and (4) Based on these two expressions (equations (6) and (9) Then, the objective function can be written in the following matrix form: Finally, the binary WCSP problem is modelled as a 0-1 quadratic programming with a quadratic function subject to linear constraints: Where Q is an N×N symmetric matrix, A is an N×n matrix, q is an N vector and b is an N vector.
The following theorem determines the relation between a binary WCSP problem and optimization model QP. In order to validate this new model of WCSP, we use the continuous Hopfield network for solving the resulting model.

III. The Proposed Model Solved by Continuous Hopfield Networks
In this section, we present a general approach to solve this problem using the continuous Hopfield networks. The neural network approaches are the efficient approaches for solving different problems in different areas [2]- [4]- [9]-[1]- [19]. Moreover, Hopfield and Tank [10]- [11] presented the energy function approach in order to solve several optimization problems [2]- [6]. Their results encouraged a number of researchers to apply this network to different problems. The continuous Hopfield neural network is a generalization of the discrete case. The common output functions used in the networks are hyperbolic tangent functions. Afterwards, many researchers implemented CHN to solve the optimization problem, especially in mathematical programming problems.
The CHN is a fully connected neural network, which means that every neuron is connected to all other neurons. The connection weights between the neuron i and neuron j is represented by W ij and each neuron i has an offset bias b i i [12].
For solving any combinatorial problems, it is necessarily to map it's in the form of the energy function associated to the continuous Hopfield network. The expression of this energy function is the following: In this work, our main objective is to solve the QP problem, i. e., solving weighted constraint satisfaction problem using the continuous Hopfield network. According to the proposed model, which consists modeling the WCSP problem into a quadratic programming QP, this step of representation becomes easy and more general. Then, the continuous Hopfield network can be used to solve the weighted constraint satisfaction problem[1]- [18].
In order to represent this latter, the energy function must be defined by two expressions ( ) x . The first one is directly proportional to the objective function of the QP problem and the second one is a quadratic function that penalizes the violated constraints of the QP problem. Therefore the energy function associated to the CHN is: Where H is set of the Hamming hypercube: The algebraic form of the generalized energy function is: The weights and thresholds of the connections between N neurons are: Where ij δ is the Kroenecker delta.
In this way, the quadratic programming has been presented as an energy function of continuous Hopfield network. To solve an instance of the QP problem, the parameter setting procedure is used. This procedure assigns the particular values for all parameters of the network, so that any equilibrium points are associated with a valid affectation of all variables when all the constraints in QP problem are satisfied. We observe that, the weights and thresholds of the continuous Hopfield network depend on the parameters α , φ , β and γ . To solve the QP problem via the CHN, an appropriate setting of these parameters is needed [1]- [19]. The parameter-setting procedure is based on the partial derivatives of the generalized energy function: Based on this hyperplane method and the associated half-spaces, the complementary corners set of the feasible solutions for the QP problem is partitioned and a set of analytical equations of the CHN parameter is proposed [19]. When we apply this method, the obtained analytical equations system is: Finally, the weights and thresholds of CHN (system 15) can be calculated using these parameters setting. Finally, we obtain an equilibrium point for the CHN using the algorithm depicted in [17], so compute the solution of constraint satisfaction problem.

IV. Computational Experiments
In order to validate the proposed approach, some experiments are effectuated to solve some typical problems of WCSP problem [16]. These experiments are effectuated in personal computer with a 2.79 GHz processor and 512 MB RAM. This approach is implemented by java language. The performance has been measured in terms the minimum obtained cost. In comparison with wbo 1.72WCSP solvers, the optimum cost obtained by CHN is very interesting, it equal to optimum cost obtained by this solver [22]. Morever, these results are obtained in the minimum time (See TABLE I). Noted that, this exeperement stady is integrated just for validate our proposed model. Generally, our model is very successful, it happens to reperent fidelly the weithted constraint satisfaction problems. Finally, we can concluded that the best results are obtained by this approach.

V. Conclusions
In this paper, we have proposed a new approach for solving binary weighted constraint satisfaction problems. The interesting steps of this approach are: proposing the new model of weighted constraint satisfaction problem as a 0-1 quadratic program subject to linear constraints and using the continuous Hopfield network to solve this problem. The most interesting propriety of this approach is used to give the solution of the binary WCSP. The experimental results show that our method can find a good optimal solution in short time. The future directions of this research are reducing the architecture of Hopfield neural network and applying the proposed approach to give a good solution of real world problems [4]- [5].