
Constraint Satisfaction, Databases, and Logic Phokion G. Kolaitis* Computer Science Department University of California, Santa Cruz Santa Cruz, CA 95064, U.S.A [email protected] 1 Introduction is to determine whether there is an assignment of values to Constraint satisfaction problems constitute a broad class of the variables so that the constraints are satisfied. More pre­ algorithmic problems that are ubiquitous in several differ­ cisely, a CSP-instance is a triple (V,, D,C), where V of a ent areas of artificial intelligence and computer science. finite set of variables, D is a finite domain of values for the In their full generality, constraint satisfaction problems are variables, and C is a set constraints {t, R), where t is a tuple NP-complete and, thus, presumed to be algorithmically in­ of variables for some m and R is a rela­ tractable. To cope with the intractability of these prob­ tion on D of arity m. A solution is a mapping h : V -> D lems, researchers have devoted considerable research efforts such that, for every constraint (t,R) C, we have that to both the design of heuristic algorithms for constraint sat­ isfaction and the pursuit of "islands of tractability", that is, Consider the Boolean satisfiability problem 3-SAT: given special cases of constraint satisfaction problems for which a 3CNF-formula with variables and clauses polynomial-time algorithms exist. is satisfiable? Such an instance of 3-SAT can During the past decade, the pursuit of "islands of tractabil- be thought of as the CSP-instance in which the set of vari­ ity" of constraint satisfaction has been intensified and has ables is V = ■ }, the domain is D — {0,1}, and led to a number of discoveries that have also unveiled tight the constraints are determined by the clauses of For ex­ connections between constraint satisfaction, database theory, ample, a clause of the form gives rise to the logic, and universal algebra. Our goal in this paper is to constraint In an analogous present an overview of the current state of affairs in the study manner, 3-COLORABILITY can be modeled as a constraint of the computational complexity of constraint satisfaction satisfaction problem. Indeed, an instance H = {V,E) of with emphasis on the connections of this area of research 3-COLORABILITY can be thought of as the CSP-instance in with database theory and logic. The paper is organized as which the set of variables is the set V of the nodes of the follows: Section 2 contains the precise definition of the CON- graph H, the domain is the set of three colors, STRAINT SATISFACTION PROBLEM and its reformulation as and the constraints are the pairs ((u, u), Q), where E the HOMOMORPHISM PROBLEM; Section 3 contains some of and is the inequal­ the connections between constraint satisfaction problems and ity relation on D. database theory; the remaining Sections 4, 5, and 6 contain A vocabulary is a finite set of relational symbols a high-level account of some of the main results about the RI,... , Rm each of which has a fixed arity. A rela• computational complexity of constraint satisfaction and the tional structure over some vocabulary is a tuple A = pursuit of tractable cases of this problem. such that A is a non-empty set, called the universe of A, and each RA is a relation on A having the 2 The Constraint Satisfaction Problem and same arity as the symbol Rt. Let A and B be two rela­ the Homomorphism Problem tional structures over the same vocabulary. A homomorphism h from A to B is a mapping h : A -> B from the uni­ Constraint satisfaction problems were originally introduced verse A of A to the universe B of B such that, for every by Montanari [Mon74l to model problems in computer vi­ relation RA of A and every tuple we sion. Since that time, however, it has been realized that nu­ have that ,...,Feder and Vardi [FV98] merous important problems in artificial intelligence and com­ were the first to point out that the CONSTRAINT SATISFAC­ puter science can be modeled as constraint satisfaction prob­ TION PROBLEM can be identified with the HOMOMORPHISM lems (see [Dec92a; PJ971). An instance of the CONSTRAINT PROBLEM: given two relational structures A and B, is there SATISFACTION PROBLEM (CSP) consists of a set of vari­ a homomorphism h from A to The intuition behind this ables, a set of possible values for the variables, and a set identification is that the structure A represents the variables of constraints on tuples of variables that restrict the combi­ and the tuples of variables that occur in the constraints, while nations of values that the variables may take; the question the structure B represents the domain of values and the tu­ * Partially supported by NSF Grant No. IIS-9907419 ples of values that these constrained tuples of variables are INVITED SPEAKERS 1587 allowed to take. Moreover, the homomorphisms from A to Every finite relational structure A gives rise to a canonical B are precisely the assignments of values to variables that Boolean conjunctive query the positive existential first- satisfy the constraints. For instance, 3-COLORABILITY is order sentence defining asserts that there exist as many equivalent to the problem of deciding whether there is a ho- elements as the cardinality of the universe of A and states all momorphism h from a given graph H to the complete graph atomic facts satisfied by tuples from the universe of A. For with 3 example, if A = (A, E) is the 3-cycle with A = {1,2,3} and nodes. More generally, k-COLORABILITY, 2, amounts E =(3,1)}, then the canonical conjunctive to the existence of a homomorphism from a given graph query w is definable by the sentence H to the complete graph Kk with A: nodes (also known as the k-clique). Numerous other important NP-complete prob­ lems can be viewed as special cases of the HOMOMORPHISM The following basic result, due to Chandra and Merlin PROBLEM (and, hence, also of the CONSTRAINT SATISFAC­ [CM77], establishes a strong connection between homomor­ TION PROBLEM). For example, consider the CLIQUE prob­ phisms and conjunctive queries. lem: given a graph H and an integer k, does H contain a Theorem 3.1: [CM771 The following are equivalent for finite clique of size A;? A moment's reflection shows that this is relational structures A and B. equivalent to the question: given a complete graph Kk and a graph H, is there a homomorphism from Kk to H? The conceptual insights gained from the identification of the CONSTRAINT SATISFACTION PROBLEM with the HO­ MOMORPHISM PROBLEM have facilitated the use of tech­ niques from universal algebra in the study of constraint As an example, we saw earlier that a graph G = (V, E) is 3- satisfaction [Jea98; FV98]). Moreover, they have clari­ colorable if and only if there is a homomorphism from G to fied the tight connections between constraint satisfaction and K . Consequently, Theorem 3.1 implies that G is 3-colorable database theory. We discuss some of these connections in the 3 if and only if K satisfies the canonical query QG of G. next section. 3 In view of the identification of the CONSTRAINT SATIS­ FACTION PROBLEM with the HOMOMORPHISM PROBLEM, 3 Constraint Satisfaction and Relational the preceding Theorem 3.1 implies that the CONSTRAINT Databases SATISFACTION PROBLEM can also be identified with two fundamental problems in database theory: conjunctive query The most frequently asked queries in relational database sys­ evaluation and conjunctive query implication (or contain• tems involve the computation of the join of two or more re­ ment). This fundamental connection between constraint sat­ lations in a database. Instead of spelling out the formal def­ isfaction and database theory was brought to front stage and inition of the join operation, let us consider for concreteness further investigated in [KVOOal. a database relation R(A, B, C) with A, B, C as attributes and a database relation S{B,C,D,E) with B, C, D, E as 4 Computational Complexity of Constraint attributes. Then the join R S consists of all quintuples such that R and 5. Sev­ Satisfaction eral different researchers, including [Bib88], have pointed out The CONSTRAINT SATISFACTION PROBLEM is NP- that computing the set of all solutions of a CSP-instance can complete, because it is clearly in NP and also contains be viewed as a join evaluation problem. Indeed, if (V, D, C) is NP-hard problems as special cases, including 3-SAT, 3- a CSP-instance, then, for every constraint COLORABILITY, and CLIQUE. As explained in Garey and in C, let be the relation R itself viewed as a Johnson's classic monograph [GJ79], one of the main ways database relation with attributes to cope with NP-completeness is to identify polynomial- is the collection of all database relations obtained this way, time solvable cases of the problem at hand that are ob­ then the join consists of all solutions to the tained by imposing restrictions on the possible inputs. For CSP-instance instance, HORN 3-SAT, the restriction of 3-SAT to Horn Join evaluation is a special case of conjunctive query 3CNF-formulas, is solvable in polynomial-time using a evaluation. Specifically, an n-ary conjunctive query unit-propagation algorithm. Similarly, it is known that 3- Q over a relational vocabulary is a query definable COLOR ABILITY restricted to graphs of bounded treewidth is by a positive existential first-order formula of the solvable in polynomial time (see IDF99]). In the case of con­ formwhere straint satisfaction, the pursuit of tractable cases has evolved is a conjunction of atomic formu­ over the years from the discovery of isolated cases to the dis­ las.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages9 Page
-
File Size-