the RentMe (Burke et al. 1996) system recommends rental accommodation.
Another example of conversational RSs is described by Bridge through a proto- type for conversational RSs that deals with accommodations for rent (Bridge 2002). It presented a framework within which users’ preferences were elicited from the user who is allowed to constrain her query in order to manage the number of suit- able products and recommend a reasonable number of items in each iteration of the dialogue.
The conversational approach has also been applied within ExpertClerk (Shimazu 2001, Shimazu 2002), which was designed and developed to imitate the conversa- tion techniques of human sales clerks. In order to elicit the shoppers’ preferences during the dialogue, the assistant typically alternates between asking questions and proposing suggestions to the customer until the customer is satisfied or all possibil- ities have been presented. ExpertClerk inherits the navigation-by-asking idea from ExpertGuide and solves the scalability problem of ExpertGuide (Shimazu et al. 2001), which is using only techniques of navigation-by-asking. In navigation-by-asking, the advisor’s goal is to choose a sequence of questions that most effectively homes in on desirable products. Questions are often selected based on the user’s queries and the product distribution. Information gain is usually used to select questions that partition the product space effectively.
2.11
Constraint Satisfaction Problem
Many problems ranging from resource allocation to fault diagnosis and design, in- volve constraint satisfaction as a key and natural component.
2.11.1
Definitions
A constraint satisfaction problem (CSP) involves the assignment of values to vari- ables that have a set of constraints which disallow individual or combinations of values. A large variety of problems in AI can be modeled as CSPs. Examples include problems in machine vision (Montanari 1974, Mackworth 1977), belief maintenance (Dechter & Dechter 1988), scheduling (Sycara et al. 1991), and natural language pro- cessing (Menzel 1998).
The formal study of CSPs was initiated by (Montanari 1974) who used constraint networks to describe combinatorial problems arising in image processing. A great deal of research in constraint satisfaction has focused on algorithms which, given a constraint network as input, automatically find a solution. This is useful in applica- tions where, once the problem has been formulated as a constraint network, no user interaction is required. CSPs can be hard to solve, and all known solution methods
have worst-case exponential time performance.
Constraints are requirements that impose limitations on the possible scenarios, regarding the resolution of a problem, and they have to be met (Dechter 2003, Rossi et al. 2006, Rossi 2005). Constraints can arise for a variety of reasons. For example, when choosing a laptop, we may be interested only in those that have an Intel pro- cessor and Nvidia graphics card. If an e-commerce web site does not have laptops in his catalogue with wanted features we would leave it for another web site.
Each variable involved in a CSP has a domain which represents all possible and allowed values to be associated to the variable. The constraints restrict the assign- ment of the values to a variable, or a combination of variables. Altogether, variables, domains, and constraints form a constraint network which is also called an instance of CSP.
Definition 1. A constraint network is a tripleR = (X, D, C) where • X = {x1, ..., xn} is a finite set of n variables.
• D is a function that maps each variablexi in X (i = {1, ..., |X|}) to a finite set of values, writtenD(xi), which it is allowed to take. The set D(xi), called the
domain ofxi, is also denotedDxi.
• A constraint is a requirement that determines a set of possible combinations of values of the variables the constraint deals with. The arity denotes the number of variables the constraint is dealing with. Accordingly, constraints can be classified in three types. The first type is the unary constraint, which restricts the values of a single variable. Every unary constraint can be eliminated by simply preprocessing the domain of the corresponding variable to remove any value that violates the constraint. A binary constraint just relates two variables. When all constraints in a network are binary, the network is called a binary constraint network. A non- binary constraint includes three or more variables. A constraint can be defined explicitly as a set of permitted combinations of values. Conversely, a constraint can be defined implicity. Examples of implicit definitions can be a mathematical expression (e.g., x1 < x2), or a specific semantic (e.g., the all-different constraint
which is equivalent to saying that variables the constraint involves must be taking different values), etc. Set of variablesS is the scope of the constraint which means that the constraint involves every variable inS, and |S| denotes the arity of the constraint. A tuple on scopeS is an assignment of a value to each variable in S. A constraint c with scope S represents a relation on variables in S, and thus c corresponds with a set of assignments toS.
2.11. Constraint Satisfaction Problem
Definition 2. LetR = (X, D, C) be a constraint network. An instantiation of a set of variablesS ⊆ X is a simultaneous assignment of values to the variables S. We denote the instantiation briefly as bS. Let CS be a constraint whose scope is S. bS satisfies a
constraintCS if bS ∈ CS which means that the combination of valuesbS satisfies (is
allowed by)CS. An instantiationbT, whereT ⊆ X, is consistent with regards to R if
and only ifbT satisfies all constraintsCS ∈ C such that S ⊆ T .
Definition 3. A solutionα of the constraint network R = (X, D, C) is an instantiation of all variables in X which is consistent relatively to R. The set of all solutions to a constraint networkR is denoted Sol(R).
A network R is called satisfiable if Sol(R) 6= ∅ and unsatisfiable if Sol(R) = ∅. Two networks defined on the same set of variables are considered equivalent if they have the same set of solutions. For a constraint network R = (X, D, C), any subset of variables I ⊆ X induces a subnetwork of R which has variables I, domains D and the set of constraints is a subset of C: CS such that CS ∈ C, S ∩ I 6= ∅.
Given a constraint network R, we can consider the following tasks: • Determine whether the network R is satisfiable.
• Find a solution to the network R, with no preference as to which one. • Find the set of all solutions Sol(R).
• Find an optimal solution to the network R, where optimality is defined by a function on the variables in R.
2.11.2
CSP solution methods
Solving a CSP means assigning a value to each variable such that all constraints are satisfied. That is, a CSP solution is an assignment of values to variables which satisfies every constraint. A CSP can be solved using the generate-and-test method (also know as “the British Museum Algorithm” according to (Hoare 1989)), where each time a possible instantiation of all the variables is generated, it is tested against all the constraints to gauge the feasibility of the assignment newly created.
A more ingenious way of solving a CSP is backtracking search (Bitner & Reingold 1975), which is the principal complete mechanism for solving a CSP. The term back- tracking search is used for a depth first search that chooses values for one variable at a time and backtracks when a variable has no legal values left to assign. The term backtracking search implements a search tree which is composed of nodes, edges (arcs) and an ordering on the outgoing arcs of each node (Bessière et al. 2004).
When searching for (feasible) solutions, variables are instantiated in a chosen or- der. By default, the procedure SelectUnassignedVariable, mentioned in Algorithm 1,
simply selects the next unassigned variable in the order given by the list of variables X. Similarly, the procedure SelectUnassignedValue, mentioned in Algorithm 1, selects the next unassigned value. The functions SelectUnassignedVariable and SelectUnas- signedValuecan involve variable and value selection heuristics (Brélaz 1979, Haralick & Elliott 1980, Pirlot 1996, Boschetti et al. 2009).
The constraint is checked every time one of the variables, involved in this con- straint, is instantiated with an untried value. A violation of a constraint provokes the search to step back to the most recently instantiated variable that will be assigned a value among the values in the domain which are not yet instantiated. This back- tracking takes place by eliminating a subspace from the Cartesian product of the variable domains.
A simple backtracking algorithm (Russell et al. 1996), which is also called chrono- logical backtracking, is presented in the following algorithm (see Algorithm 1).
Algorithm 1BACKTRACK(X, D, C, b)
Input : Set of variables X Set of constraints C Set of variables values D Partial assignment b Output: Set of assignments
1 if X =∅ then
2 returnb;
3 else
4 x ← SelectUnassignedVariable(X);
foreach value v∈ SelectUnassignedValue(Dx) do 5 if v is consistent with assignment b then
6 b ← b ∪ (x,v); X ← X \ x r ← BACKTRACK(X, D, C, b); 7 if r6= NULL then 8 returnr; 9 else 10 b ← b \ (x,v); 11 returnNULL;
Given a network R = (X, D, C) the call BACKT RACK(X, D, C, b) returns a solution if the network is satisfiable, otherwise N U LL is returned. b represents a partial assignment. The BACKT RACK procedure is initially called with b that is equal to the null assignment to the empty set of variables. Figure 2.4 shows the