Information about Constraint Satisfaction

In artificial intelligence and operations research, constraint satisfaction is the process of finding a solution to a set of constraints. Such constraints express allowed values for variables. A solution is therefore an evaluation of these variables that satisfies all constraints.

The techniques used in constraint satisfaction depend on the kind of constraints being considered. Often used are constraints on a finite domain, to the point that constraint satisfaction problems are typically identified with problems based on constraints on a finite domain. Such problems are usually solved via search, in particular a form of backtracking or local search. Constraint propagation are other methods used on such problems; most of them are incomplete in general, that is, they may solve the problem or prove it unsatisfiable, but not always. Constraint propagation methods are also used in conjunction with search to make a given problem simpler to solve. Other considered kinds of constraints are on real or rational numbers; solving problems on these constraints is done via variable elimination or the simplex algorithm.

Constraint satisfaction originated in the field of artificial intelligence in the 1970s. During the 1980s and 1990s, embedding of constraints into a programming language were developed. Languages often used for constraint programming are Prolog and C++.

Constraint satisfaction problem



As originally defined in artificial intelligence, constraints enumerate the possible values a set of variables may take. Informally, a finite domain is a finite set of arbitrary elements. A constraint satisfaction problem on such domain contains a set of variables whose values can only be taken from the domain, and a set of constraints, each constraint specifying the allowed values for a group of variables. A solution to this problem is an evaluation of the variables that satisfies all constraints. In other words, a solution is a way for assigning a value to each variable in such a way all constraints are satisfied by these values.

Formally, a constraint satisfaction problem is defined a triple , where is a set of variables, is a domain of values, and is a set of constraints. Every constraint is in turn a pair , where is a tuple of variables and is a set of tuples of values; all these tuples having the same number of elements; as a result is a relation. An evaluation of the variables is a function from variables to . Such an evaluation satisfies a constraint if . A solution is an evaluation that satisfies all constraints.

In practice, some constraints that are often used are expressed in compact form, rather than enumerating all possible values of the variables. The constraint expressing that the values of some variables are all different is one of the most used such constraints.

Problems that can be expressed as constraint satisfaction problems are the Eight queens puzzle, the Sudoku solving problem, the Boolean satisfiability problem, scheduling problems and various problems on graphs such as the graph coloring problem.

While usually not included in the above definition of a constraint satisfaction problem, arithmetic equations and inequalities bound the values of the variables they contain and can therefore be considered a form of constraints. Their domain is the set of numbers (either integer, rational, or real), which is infinite: therefore, the relations of these constraints may be infinite as well; for example, has an infinite number of pairs of satisfying values. Arithmetic equations and inequalities are often not considered within the definition of a "constraint satisfaction problem", which is limited to finite domains. They are however used often in constraint programming.

Solving

Constraint satisfaction problems (on finite domains) are typically solved using a form of search. The most used techniques are variants of backtracking, constraint propagation, and local search.

Backtracking is a recursive algorithm. It maintains a partial assignment of the variables. Initially, all variables are unassigned. At each step, a variable is chosen, and all possible values are assigned to it in turn. For each value, the consistency of the partial assignment with the constraints is checked; in case of consistency, a recursive call is performed. When all values have been tried, the algorithm backtracks. In this basic backtracking algorithm, consistency is defined as the satisfaction of all constraints whose variables are all assigned. Several variants of backtracking exists. Backmarking improves the efficiency of checking consistency. Backjumping allows saving part of the search by backtracking "more than one variable" in some cases. Constraint learning infers and saves new constraints that can be later used to avoid part of the search. Look-ahead is also often used in backtracking to attempt to foresee the effects of choosing a variable or a value, thus sometimes determining in advance when a subproblem is satisfiable or unsatisfiable.

Constraint propagation techniques are methods used to modify a constraint satisfaction problem. More precisely, they are methods that enforce a form of local consistency, which are conditions related to the consistency of a group of variables and/or constraints. Constraints propagation has various uses. First, they turn a problem into one that is equivalent but is usually simpler to solve. Second, they may prove satisfiability or unsatisfiability of problems. This is not guaranteed to happen in general; however, it always happens for some forms of constraint propagation and/or for some certain kinds of problems. The most known and used form of local consistency are arc consistency, hyper-arc consistency, and path consistency. The most popular constraint propagation method is the AC-3 algorithm, which enforces arc consistency.

Local search methods are incomplete satisfiability algorithms. They may find a solution of a problem, but they may fail even if the problem is satisfiable. They work by iteratively improving a complete assignment over the variables. At each step, a small number of variables are changed value, with the overall aim of increasing the number of constraints satisfied by this assignment. In practice, local search appears to work well when these changes are also affected by random choices. Integration of search with local search have been developed, leading to hybrid algorithms.

Variable elimination and the simplex algorithm are used for solving linear and polynomial equations and disequations.

Complexity



Solving a constraint satisfaction problem on a finite domain is an NP complete problem. Research has shown a number of tractable subcases, some limiting the allowed constraint relations, some requiring the scopes of constraints to form a tree, possibly in a reformulated version of the problem. Research has also established relationship of the constraint satisfaction problem with problems in other areas such as finite model theory.

Constraint programming



Constraint programming is the use of constraints as a programming language to encode and solve problems. This is often done by embedding constraints into a programming language, which is called the host language. Constraint programming originated from a formalization of equalities of terms in Prolog II, leading to a general framework for embedding constraints into a logic programming language. The most common host languages are Prolog, C++, and Java, but other languages have been used as well.

Constraint logic programming



A constraint logic program is a logic program that contains constraints in the bodies of clauses. As an example, the clause A(X):-X>0,B(X) is a clause containing the constraint X>0 in the body. Constraints can also be present in the goal. The constraints in the goal and in the clauses used to prove the goal are accumulated into a set called constraint store. This set contains the constraints the interpreter has assumed satisfiable in order to proceed in the evaluation. As a result, if this set is detected unsatisfiable, the interpreter backtracks. Equations of terms, as used in logic programming, are considered a particular form of constraints which can be simplified using unification. As a result, the constraint store can be considered an extension of the concept of substitution that is used in regular logic programming. The most common kinds of constraints used in constraint logic programming are constraints over integers/rational/real numbers and constraints over finite domains.

Concurrent constraint logic programming languages have also been developed. They significantly differ from non-concurrent constraint logic programming in that they are aimed at programming concurrent processes that may not terminate. Constraint handling rules can be seen as a form of concurrent constraint logic programming, but are also sometimes used within a non-concurrent constraint logic programming language. They allow for rewriting constraints or to infer new ones based on the truth of conditions.

Constraint satisfaction toolkits

Constraint satisfiaction toolkits are software libraries for imperative programming languages that are used to encode and solve a constraint satisfaction problem. The most common host language for these toolkits is C++, but implementations exist for Java and other programming languages.

Other constraint programming languages

Constraint toolkits are a way for embedding constraints into an imperative programming language. However, they are only used as external libraries for encoding and solving problems. An approach in which constraints are integrated into an imperative programming language is taken in the Kaleidoscope programming language.

Constraints have also been embedded into functional programming languages.

References

  • Rossi, Francesca; Peter van Beek, Toby Walsh (ed.) (2006). Handbook of Constraint Programming,. Elsevier.  ISBN-13 978-0-444-52726-4 ISBN-10 0-444-52726-5
  • Dechter, Rina (2003). Constraint processing. Morgan Kaufmann.  ISBN 1-55860-890-7
  • Apt, Krzysztof (2003). Principles of constraint programming. Cambridge University Press.  ISBN 0-521-82583-0
  • Frühwirth, Thom; Slim Abdennadher (2003). Essentials of constraint programming. Springer.  ISBN 3-540-67623-6
  • Marriot, Kim; Peter J. Stuckey (1998). Programming with constraints: An introduction. MIT Press.  ISBN 0-262-13341-5
  • Jaffar, Joxan; Michael J. Maher (1994). "Constraint logic programming: a survey". Journal of logic programming 19/20: 503-581. DOI:10.1016/0743-1066(94)90033-7. 
  • Freuder, Eugene; Alan Mackworth (ed.) (1994). Constraint-based reasoning. MIT Press.  ISBN
  • Tsang, Edward (1993). Foundations of Constraint Satisfaction. Academic Press.  ISBN 0-12-701610-4
  • Van Hentenryck, Pascal (1989). Constraint Satisfaction in Logic Programming. MIT Press.  ISBN 0-262-08181-4
artificial intelligence (or AI) is "the study and design of intelligent agents" where an intelligent agent is a system that perceives its environment and takes actions which maximizes its chances of success.
..... Click the link for more information.
Operations Research or Operational Research (OR) is an interdisciplinary branch of mathematics which uses methods like mathematical modeling, statistics, and algorithms to arrive at optimal or good decisions in complex problems which are concerned with optimizing the maxima
..... Click the link for more information.
Constraint may refer to:
  • Constraint (mathematics)
  • Constraint algorithm (mechanics) such as SHAKE, or LINCS
  • Constraint (design)
  • Constraint (information theory)
  • Theory of Constraints, in business management
  • Constraint satisfaction, in computer science

..... Click the link for more information.
variable (IPA pronunciation: [ˈvæɹiəbl]) (sometimes called a pronumeral) is a symbolic representation denoting a quantity or expression.
..... Click the link for more information.
Constraint satisfaction problems or CSPs are mathematical problems where one must find states or objects that satisfy a number of constraints or criteria. CSPs are the subject of intense research in both artificial intelligence and operations research.
..... Click the link for more information.
Searching and search can refer to the following:

Computers and computer science
  • Search algorithm
  • Boolean search
  • Tree search

..... Click the link for more information.
Backtracking is a type of algorithm that is a refinement of brute force search.[1] In backtracking, multiple solutions can be eliminated without being explicitly examined, by using specific properties of the problem.
..... Click the link for more information.
In constraint satisfaction, local search is an incomplete method for finding a solution to a problem. It is based on iteratively improving an assignment of the variables until all constraints are satisfied.
..... Click the link for more information.
In constraint satisfaction, local consistency conditions are properties of constraint satisfaction problems related to the consistency of subsets of variables or constraints.
..... Click the link for more information.
In mathematical optimization theory, the simplex algorithm, created by the American mathematician George Dantzig in 1947, is a popular technique for numerical solution of the linear programming problem.
..... Click the link for more information.
artificial intelligence (or AI) is "the study and design of intelligent agents" where an intelligent agent is a system that perceives its environment and takes actions which maximizes its chances of success.
..... Click the link for more information.
A programming language is an artificial language that can be used to control the behavior of a machine, particularly a computer. Programming languages, like natural languagess, are defined by syntactic and semantic rules which describe their structure and meaning respectively.
..... Click the link for more information.
Prolog
Paradigm: Logic programming
Appeared in: 1972
Designed by: Alain Colmerauer
Major implementations: BProlog, GNU Prolog, Quintus, SICStus, Strawberry, SWI-Prolog, YAP-Prolog
Dialects: ISO Prolog, Edinburgh Prolog
..... Click the link for more information.
C++
Paradigm: Multi-paradigm
Appeared in: 1983
Designed by: Bjarne Stroustrup
Typing discipline: Static, unsafe, nominative
Major implementations: G++, Microsoft Visual C++, Borland C++ Builder
Dialects: ISO/IEC C++ 1998, ISO/IEC C++ 2003
..... Click the link for more information.
Constraint satisfaction problems or CSPs are mathematical problems where one must find states or objects that satisfy a number of constraints or criteria. CSPs are the subject of intense research in both artificial intelligence and operations research.
..... Click the link for more information.


In mathematics, a tuple is a finite sequence (also known as an "ordered list") of objects, each of a specified type. A tuple containing n objects is known as an "n-tuple".
..... Click the link for more information.
Relation may refer to:
  • Relation, a person to whom one is related, i.e. a family member (see also Kinship)
  • Relation (mathematics), a generalization of arithmetic relations, such as "=" and "<", that occur in statements, such as "5

..... Click the link for more information.
eight queens puzzle is the problem of putting eight chess queens on an 8×8 chessboard such that none of them is able to capture any other using the standard chess queen's moves. The colour of the queens is meaningless in this puzzle.
..... Click the link for more information.
Sudoku (数独 sūdoku)
..... Click the link for more information.
Satisfiability is the problem of determining if the variables of a given boolean formula can be assigned in such a way as to make the formula evaluate to TRUE. Equally important is to determine whether no such assignments exist, which would imply that the function expressed by the
..... Click the link for more information.
Scheduling may refer to:
  • I/O scheduling, the order in which I/O requests are submitted to a block device in Computer Operating Systems
  • Scheduling (broadcasting), the minute planning of the content of a radio or television broadcast channel

..... Click the link for more information.
graph coloring is an assignment of "colors" to certain objects in a graph subject to certain constraints. In its simplest form, it is a way of coloring the vertices of a graph such that no two adjacent vertices share the same color, called a vertex coloring.
..... Click the link for more information.
Constraint programming is a programming paradigm where relations between variables can be stated in the form of constraints. Constraints differ from the common primitives of other programming languages in that they do not specify a step or sequence of steps to execute but rather
..... Click the link for more information.
Searching and search can refer to the following:

Computers and computer science
  • Search algorithm
  • Boolean search
  • Tree search

..... Click the link for more information.
Backtracking is a type of algorithm that is a refinement of brute force search.[1] In backtracking, multiple solutions can be eliminated without being explicitly examined, by using specific properties of the problem.
..... Click the link for more information.
Recursion, in mathematics and computer science, is a method of defining functions in which the function being defined is applied within its own definition. The term is also used more generally to describe a process of repeating objects in a self-similar way.
..... Click the link for more information.
In constraint satisfaction, backmarking is a variant of the backtracking algorithm.

Backmarking works like backtracking by iteratively evaluating variables in a given order, for example, .
..... Click the link for more information.
In backtracking algorithms, backjumping is a technique that reduces search space, therefore increasing efficiency. While backtracking always goes up one level in the search tree when all values for a variable have been tested, backjumping may go up more levels.
..... Click the link for more information.
constraint learning is a technique for improving efficiency. It works by recording new constraints whenever an inconsistency is found. This new constraint may reduce the search space, as future partial evaluations may be found inconsistent without further search.
..... Click the link for more information.
In backtracking algorithms, look ahead is the generic term for a subprocedure that attempts to foresee the effects of choosing a branching variable to evaluate or one of its values.
..... Click the link for more information.


This article is copied from an article on Wikipedia.org - the free encyclopedia created and edited by online user community. The text was not checked or edited by anyone on our staff. Although the vast majority of the wikipedia encyclopedia articles provide accurate and timely information please do not assume the accuracy of any particular article. This article is distributed under the terms of GNU Free Documentation License.
Herod_Archelaus


page counter