Domain Decomposition for Parallel Resolution of Constraint Satisfaction Problems with OpenMP Zineb HABBAS Michaël KRAJECKI Daniel SINGER Université de Metz Université de Reims Champagne-Ardenne Université de Metz Ile du Saulcy BP 1039 Ile du Saulcy F-57045 Metz Cedex F-51687 Reims Cedex2 F-57045 Metz Cedex zineb@iut.univ-metz.fr michael.krajecki@univ-reims.fr singer@lita.univ-metz.fr ABSTRACT Many problems in computer science, especially in Artificial Intelligence, can be represented as constraint satisfaction problems (CSP). For example, scene labeling in computer vision involves testing possible inter- pretation of objects against relation rules. Other constraint satisfaction problems include theorem proving, scheduling, expert systems. These problems are typically NP-Complete because they require extensive searches to find a solution and the basic search algorithm is the naive Backtracking strategy. In order to improve its performances different approaches have been explored: filtering strategies, heuristics for search algorithms, decomposition methods. Although parallelization seems to be a good candidate to obtain fur- ther practical improvements the research in this direction is fewly developed. In this paper we explore the benefit of a domain decomposition strategy for parallel CSP resolution. Mainly we solve in parallel the different subproblems resulting from the decomposition step on a shared memory architecture with an OpenMP library. All the experiments were realized with the Sillicon Graphics Origin2000 parallel machine. KEYWORDS: Constraint Satisfaction Problems (CSP), Parallel Processing, OpenMP, Domain Decompo- sition, Irregular Applications. 1 Introduction Many problems in computer science, especially in Arti- ficial Intelligence, can be represented as constraint sat- isfaction problems or CSP. For example, scene labeling in computer vision involves testing possible interpreta- tion of objects against relation rules. Other constraint satisfaction problems include theorem proving, schedul- ing, expert systems. Typically these problems are NP- Complete and they require extensive search to find a solution: the basic search algorithm is the naive Back- tracking strategy. Formally, a CSP is defined by a set of variables and by a set of constraints. A set of allowed values is associated at each variable. Each constraint is given by a compatibility relation over the domains of variables. Solving a CSP means finding an assignment for each variable that satisfies all the constraints. Most of the proposed algorithms are improvements of the sim- ple enumerative search: Backtracking (BT) algorithm. Its main drawback is the computational cost and many different approaches have been proposed in order to im- prove its performance. We can roughly classify them in the three following categories: performing constraint propagation as a prepro- cessing step before or during search with different filtering techniques based on an Arc-Consistency property [15]. improving the search algorithm itself by choos- ing a good variable and value orderings for the next variable to be instantiated and value to be as- signed [1, 8]. performing subproblems decomposition as a pre- processing step [2, 4, 7, 9]. Since CSP is NP-Complete, an efficient general search algorithm is unlikely to exist. Although parallelization seems to be a good candidate to obtain further practi- cal improvements, the research in this direction is un- fornutately fewly developed. Surprisingly, unlike the Computational Science and Engineering area [14], the decomposition methods which generate "inherent par- allel" algorithms have not been explored for this pur- pose. In [16], we have already studied the paralleliza- tion of the search algorithm itself. Mainly we proposed a generic parallel scheme combining both sequential search algorithms and MIMD dynamic load balancing