Backtracking Algorithms for Disjunctions of Temporal. Constraints. April 22, Abstract

Size: px
Start display at page:

Download "Backtracking Algorithms for Disjunctions of Temporal. Constraints. April 22, Abstract"

Transcription

1 Backtracking Algorithms for Disjunctions of Temporal Constraints April 22, 1998 Abstract We extend the framework of simple temporal problems studied originally by Dechter, Meiri and Pearl to consider constraints of the form x1? y1 r1 _ : : : _ xn? yn rn, where x1 : : : xn; y1 : : : yn are variables ranging over the real numbers, r1 : : : rn are real constants, and n 1. We have implemented four progressively more ecient algorithms for the consistency checking problem for this class of temporal constraints: simple backtracking, backjumping, forward checking and forward checking with backjumping. We have also implemented the fail rst heuristic in conjunction with forward checking and forward checking with backjumping. We have partially ordered the above algorithms according to the number of visited search nodes and the number of performed consistency checks. To achieve this result, we only had to modify slightly the methodology and proofs of Kondrak and van Beek for binary constraint satisfaction problems (although our problem is non-binary). We have also studied the performance of the above algorithms experimentally using randomly generated sets of data. Finally, we have carried out a series of experiments on the phase transition for this class of problems. The results show that hard problems occur at a critical value of the ratio of disjunctions to variables. 1 Introduction Reasoning with temporal constraints has been a hot research topic for the last fteen years. The importance of this problem has been demonstrated in many areas of articial intelligence and databases, e.g., planning [AKP91], scheduling [CS94], spatio-temporal databases [Kou94b, Cho97, CR97], geographical information systems [FCF92] and medical information systems [vb91]. The work carried out in this eld can be categorized in terms of the classes of temporal constraints studied. The class of qualitative temporal constraints in the Interval Algebra and Point Algebra has been studied primarily in [All84, VKvB89, vbc90, vb92, LM94, LR92, LR93, vbm96]. [NB95] have introduced the ORD-Horn subclass of Interval Algebra and showed that it is a maximal tractable subclass. [DJ96, JDB96, DJ97a, DJ97b] have also studied other tractable subclasses of the Interval Algebra. Finally, [GS93, GSS93, GS95] have studied several algorithms for qualitative temporal constraints and have implemented them eciently in their TimeGraph system. 1

2 The class of quantitative temporal constraints has been studied originally by [DMP89] in the framework of simple temporal problems where constraints are of the form x? y c where x and y are real variables and c is a real constant, and temporal constraint satisfaction problems where constraints are disjunctions of formulas l x?y u involving the same pair of real variables x and y (l and u are real constants). Subsequently [KL91, Mei91, Mei96, Kou92, Chl95, Kou95, GC95, GC97] continued the study of the class of simple temporal problems, and some limited tractable extensions of it. [Kou96, Jon96] have studied Horn linear constraints, a signicant tractable extension of simple temporal problems that allows disjunctions involving an arbitrary number of linear disequations (e.g., 3x + 5y + 7z 6= 8) but at most one linear inequality. Naturally, the applications of this latter class go beyond temporal reasoning. Finally, [SD97] studied the performance of local consistency algorithms for processing TCSPs on hard problems in the transition region. This paper continues the work on quantitative temporal constraints and makes the following contributions: 1. We extend the framework of simple temporal problems studied originally by [DMP89] to consider constraints of the form x 1? y 1 r 1 _ : : : _ x n? y n r n, where x 1 : : : x n ; y 1 : : : y n are variables ranging over the real numbers, r 1 : : : r n are real constants, and n 1. The reader should note that we do not restrict the variables in the disjuncts to be the same pair as [DMP89] do in the framework of temporal constraint satisfaction problems. The added generality is useful in many problems including planning, scheduling [CS94] and temporal constraint databases [Kou94a, Kou94b, Kou97]. 2. We have implemented four progressively more ecient algorithms for the consistency checking problem for this class of temporal constraints (backtracking, backjumping, forward checking and forward checking with backjumping). We have also implemented the minimum remaining values heuristic in conjunction with forward checking and forward checking with backjumping. 3. Following the methodology of [KvB97], we have proved the correctness of all of the above algorithms, and partially ordered them according to the number of visited search nodes and the number of performed consistency checks. Although our problem is not binary, our results agree with the results of [KvB97] for binary constraint satisfaction problems. 4. We have also studied the performance of the above algorithms experimentally using randomly generated sets of data. Our results show that the best of our algorithm is the heuristic version of forward checking with backjumping. The heuristic version of forward checking without backjumping is only slightly less ecient for the class of problems we considered in our experimental evaluation. 5. We also present a series of experimental results on the location of the region where hard problems occur. The results show that hard prob- 2

3 lems occur at a critical value of the ratio of disjunctions to variables. This critical value seems to be between 6 and 7. We also investigate the transition from the region where almost all problems are consistent to the region where almost no problem is consistent. Our empirical results show that the hard region does not occur arround the 50% satisability point as is the case with other NP-complete problems like SAT problems [SML96, ML96, GW96, CA96]) and binary CSPs (see for example [Pro96, SG94]). It occurs at a point where almost all problems are unsatisable. The organization of this paper is as follows. In Section 2 we present some basic denitions and describe the problem in detail. Section 3 discusses consistency checking for non-disjunctive constraints. In Section 4 we introduce a simple backtracking algorithm for checking the consistency of sets of disjunctive constraints. Sections 5 and 6 present the more sophisticated algorithms we have developed. Section 5 presents backjumping while Section 6 presents forward checking, forward checking with backjumping, and the minimum remaining values heuristic. In Section 7 we evaluate the performance of the algorithms theoretically. Section 8 presents the results of our empirical analysis. Finally, in Section 9 we conclude and discuss future work. 2 Preliminaries We consider time to be linear, dense and unbounded. Points will be our only time entities. Points are identied with the real numbers. The set of real numbers will be denoted by R. Denition 2.1 A temporal constraint is a disjunction of the form x 1? y 1 r 1 _ : : : _ x n? y n r n, where x 1 : : : x n ; y 1 : : :y n are variables ranging over the real numbers, r 1 : : :r n are real constants, and n 1. A temporal constraint containing only one disjunct will be called non-disjunctive. Temporal constraints with more than one disjuncts will be called disjunctive. Example 2.1 The following are examples of temporal constraints: x 1? y 1 2; x 1? y 1 5 _ x 2? y 2?2 The rst constraint is non-disjunctive while the second is disjunctive. Denition 2.2 Let C be a set of temporal constraints in variables x 1 ; : : :; x n. The solution set of C, denoted by Sol(C), is f( 1 ; : : :; n ) : ( 1 ; : : :; n ) 2 R n and for every c 2 C; ( 1 ; : : :; n ) satises cg: Each member of Sol(C) is called a solution of C. A set of temporal constraints is called consistent if and only if its solution set is nonempty. 3

4 The problem of deciding the consistency of a set of m temporal constraints in n variables can be equivalently restated as a m-ary meta-csp, where disjunctions can be viewed as variables, and the disjuncts of each disjunction as the possible values of the corresponding variable. The m-ary constraint between the variables is that all disjuncts that are part of an assignment to variables must be simultaneously satised. We will refer to this problem as DDTC (Deciding Disjunctions of Temporal Constraints). We now give a formal denition of DDTC problems as m-ary meta-csps. Denition 2.3 A DDTC problem consists of the following: a set of m variables fd 1 ; : : :; D m g representing disjunctions. a set of domains fdom 1 ; : : :; dom m g which contain the values for D 1 ; : : :; D m. The elements of the domains are inequalities of the form x i?x j r, where x i ; x j are variables representing time points, and r is a real constant. an m-ary constraint which states the following. For all k, where 1 k m, if D 1 is assigned value d 1... D k is assigned value d k then inequalities d 1 ; : : :; d k are consistent. According to the above denition, the consistency of a given set C of temporal constraints can be decided in two steps. First, we check the consistency of the subset of non-disjunctive constraints. If this subset is consistent, we consider the subset of disjunctive constraints as well. Now C is consistent if for each disjunction there exists one disjunct that can be added to the subset of non-disjunctive constraints so that the new set of constraints produced is still consistent. The basic algorithm for solving the above problem is simple or chronological backtracking (usually denoted by BT) [GB65]. BT successively selects a disjunct from each disjunction and adds it to the set of non-disjunctive constraints, as long as it does not violate any existing constraints. In case none of the constraints of the current disjunction can be consistently added to the set of non-disjunctive constraints, the algorithm backtracks to the previously decided disjunction, removes the selected constraint from the set of non-disjunctive constraints, and chooses another one. The algorithm terminates successfully if all the disjunctions have been considered. If there is no disjunction left to backtrack to (i.e., none of the constraints of a disjunction is consistent), the algorithm fails. 4

5 3 Consistency Checking for Non-Disjunctive Constraints Several algorithms that check the consistency of a set of non-disjunctive temporal constraints have been proposed in the literature. All these algorithms make use of a graph representation of the constraints. Denition 3.1 A constraint graph is a directed graph whose nodes represent variables and whose arcs represent binary constraints between these variables. If C is set of non-disjunctive temporal constraints in n variables x 1 ; : : :; x n then the constraint graph of C is G = (V; E) where V = fx 1 ; : : :; x n g and! r x i : x i? x j r is a member of Cg. We will use the notation G ij to E = fx j refer to the label (weight) of edge i! j in a constraint graph G. [DMP91] introduced the algorithm DPC for checking the consistency of a set of non-disjunctive temporal constraints. [Chl95] presented an incremental version of DPC, called IDPC. DPC and IDPC work by propagating constraints in the given constraint graph so that the resulting graph is directional path consistent. Denition 3.2 [DMP91] Let be an ordering on the variables, and let x i precede x j in i i<j. A constraint graph G is directional path consistent with respect to, if for every triple i,j and k such that the edges i! k, k! j and i! j exist and i; j k then G ij G ik + G kj. Dechter, Meiri and Pearl prove that DPC always detects an inconsistency in a constraint graph, if one exists [DMP91]. In fact [DMP91, Chl95] present their results for constraint networks but this is no problem since constraint graphs are an equivalent representation. In our case, consistency checking is performed using an algorithm called Graph IDPC, which is the equivalent of IDPC for constraint graphs. Graph IDPC is shown in Figure 1. In Graph IDPC, the nodes are ordered according to a predetermined ordering. We will assume that the ordering is the ordering in which the variables are numbered. The input of Graph IDPC is a directional path consistent graph G with n nodes, and a constraint x m? x l r, with x l x m, to be added to G. Graph IDPC will add the new constraint to G and enforce directional path consistency again, exploiting the fact that G is already directional path consistent. Graph IDPC will start by examining node x m and move towards node x 1. All the nodes that are after x m in the ordering are ignored, since the constraints they are involved in cannot be possibly aected by the new constraint. Graph IDPC uses a queue Q to store the nodes to be examined. Nodes are examined in descending order of, and new nodes are added to the queue only if they are involved in a constraint that has been updated. For a node x k that is extracted from Q, the algorithm considers only the pairs of nodes (x i ; x j ) that satisfy the following conditions: 1. x i and x j are before x k in the ordering. 5

6 Algorithm Graph IDPC Input: A constraint graph G = (V; E) and a new constraint x m? x l r between nodes x l and x m such that x l x m. Output: CONSISTENT if the new constraint is consistently added to G. INCONSISTENT otherwise. Q fx m g [x l ][x m ] TRUE E E [ fx l! x m g While Q 6= ; Do x k max (Q) Q n fx k g Q For all nodes x i ; x j x k such that x i! x k 2 E and x k! x j 2 E and ([x i ][x k ]=TRUE or [x k ][x j ]=TRUE) Do If (x i! x j 62 E or G ij < G ik + G kj ) then G ij G ik + G kj E E [ fx i! x j g If G ij? G ji < 0 then Return INCONSISTENT If G ij has been modied then Q Q [ fx j g [x i ][x j ] TRUE EndIf EndIf EndFor EndWhile Return CONSISTENT Figure 1: Incremental enforcement of directional path consistency 2. The edges x i! x k and x k! x j exist. 3. One of these edges has been previously updated. If the label on edge x i! x j is updated then the maximum of the two nodes x i and x j, is inserted in Q. Information about the modication of edges is kept in an array indexed by the nodes of the graph. The worst-case complexity of Graph IDPC is O(nW 2 ) where n is the number of nodes, and W is the width of the resulting graph [DMP91]. The width of a graph is the maximum number of parents that a node has. A node x is a parent of node y if it is connected to y through an edge and comes before y in the ordering [DP90]. Instead of using Graph IDPC to add constraints to an already directional path consistent graph, we could use DPC, since the worst-case complexity of Graph IDPC is the same as DPC. However, the time spent by Graph IDPC to establish directional path consistency incrementally is signicantly less than the time spent by DPC, as shown experimentally in [Chl95]. 6

7 4 Simple Backtracking Having explained how consistency checking for non-disjunctive constraints is performed, we will now discuss consistency checking for disjunctive constraints. First, we introduce some necessary terminology. Some of our terminology is similar to the terminology of [GS93, GS95]. The given set of disjunctions will be denoted by D. D(i) and D(i,j) will represent the i-th disjunction and the j-th disjunct of the i-th disjunction, respectively. The set of non-disjunctive constraints will be denoted by G, and will be represented by a constraint graph, which for convenience will be also called G. We call the set of selected disjuncts an instantiation of D in G. When a constraint is consistently added to G, we say that it has been instantiated, and when a constraint is retracted from G that it has been uninstantiated. Trying to instantiate a disjunct means adding it to G and checking that the produced set of constraints is consistent. The order of instantiation is the ordering in which the disjunctions are examined. We will assume that this order is static (i.e., it is predetermined and does not change during the execution of the algorithm). In Section 6.5 we will discuss the dynamic ordering of the disjunctions. The current disjunction is the disjunction chosen for instantiation at each step of the algorithm. The past disjunctions are the disjunctions that have been already instantiated. If D(i) is the current disjunction then all the disjunctions that precede D(i) in the order of instantiation are the past disjunctions. We say that these disjunctions are before D(i) and D(i) is after them. The future disjunctions are the disjunctions that have not yet been instantiated. They are all the disjunctions that are after the current disjunction in the order of instantiation. Each disjunct can be in one of three possible states at any time. It can be available, current or eliminated. We say that a disjunct is available if it is neither current nor eliminated. Initially all the disjuncts of all the disjunctions are available. A disjunct is current if it is part of the currently attempted instantiation of D. All the instantiated disjuncts of the past disjunctions are current disjuncts. A disjunct becomes eliminated when it is tried against the graph and fails to be consistently instantiated. All the disjuncts of the past disjunctions that have failed consistency checking are eliminated disjuncts. A dead-end is a situation when all the disjuncts of the current disjunction are rejected by the algorithm (i.e., they cannot be consistently instantiated). In this case backtracking takes place. 4.1 Data Structures and Global Variables The following global data structures and variables are accessible to all functions and procedures of all the search algorithms: dis num: It denotes the number of disjunctions. We assume that the rst disjunction is D(1) and the last is D(dis num). We also assume the existence of a disjunction D(0) used only for convenience reasons. When a backtrack to D(0) is attempted, the algorithm terminates. max disno: The maximum number of disjuncts in a disjunction. 7

8 arr of disj: It is a two-dimensional dis num max disno array where the disjunctions are stored. For i = 1; : : :; dis num, disjunction D(i) corresponds to the i-th row of the array. The entry arr of disj[i][j] of the array stores the disjunct D(i,j) (the j-th disjunct of the i-th disjunction). current domain: It is a two-dimensional dis num max disno array of boolean values. current domain[i][j] can be either AVAILABLE or ELIM- INATED. At each time current domain[i][j] denotes the state in which the disjunct D(i,j) is in. If current domain[i][j] is AVAILABLE then D(i,j) is available. If current domain[i][j] is ELIMINATED then D(i,j) is eliminated. Information about the current disjuncts is kept separately. All the entries of current domain are intialized to AVAILABLE, since all disjuncts are initially available. solution: It is a one-dimensional array of dis num elements of type integer. At each step of the search process solution denotes the current partial solution. This means that if at some stage the current disjunction is D(k) then, for i = 1; : : :; k? 1 solution[i]=j, where j is the number of the instantiated disjunct D(i; j) of D(i). All the elements of solution are initially set to 0. When the search algorithm terminates successfully, solution contains the numbers of the instantiated disjuncts for all the disjunctions. state: It is a globally declared variable that is used to indicate the termination of the algorithm. Its domain is funknown, SUCCESS, FAIL- UREg. Initially state is set to UNKNOWN. If during the search, an impasse is reached, its value becomes FAILURE. If a consistent instantiation of D is found, the value of state becomes SUCCESS. consistent: It is a boolean variable that controls the forward and backward moves of the algorithm. The variable consistent is initialized to TRUE. As long as there exists a consistent disjunct of the current disjunction, consistent remains TRUE and the search algorithm moves forward. When no consistent disjunct of the current disjunction is found, consistent changes to FALSE and the algorithm backtracks to one of the past disjunctions. count: It is an integer variable that holds the number of the current disjunction with respect to the order of instantiation. Its domain is f1; : : :; dis numg. n: It denotes the number of variables in the given constraint set. For the implementation of the constraint graph we have chosen to use a modied version of the double adjacency list representation [CLR90]. In the double adjacency list representation we keep both the incoming and the outgoing edges of each node. We have augmented the double adjacency list representation with some further information. When a backtrack to a disjunction D(i) is performed, the graph has to be restored back to the state it was before D(i) was instantiated. To achieve that we have modied the representation of the constraint 8

9 graph in a way that all the changes in the label of an edge x i! x j are recorded explicitly in the graph. We also use a stack to index the edges that have been modied. 4.2 Preprocessing A general strategy in CSPs is to preprocess the set of constraints prior to the search. The aim of preprocessing is to transform the given CSP into an equivalent CSP that is easier for a backtracking algorithm to solve. To be precise, preprocessing tries to reduce the search space that backtracking algorithms explore, and in that way improve their eciency. For binary CSPs there are two types of preprocessing algorithms: preprocessing algorithms that are employed prior to performing the search, and dynamic algorithms that are used during the search [DM94]. In our problem, the set of disjunctions D can be reduced to an equivalent smaller subset by exploiting the information provided by the constraint graph G. Three simple pruning rules are applied to each disjunction in D prior to the execution of the search algorithms. In this way the search space can sometimes be signicantly reduced. The process of applying the pruning rules to D is called preprocessing. The pruning rules are the following: 1. If a disjunction D(i) contains a disjunct that is subsumed by a single constraint in the constraint graph G then disjunction D(i) can be eliminated from D. 2. If a disjunction D(i) is subsumed by another disjunction D(j) then D(i) can be eliminated from D. 3. If a disjunct D(i; j) is inconsistent relative to G then it can be eliminated from disjunction D(i). In case a disjunct D(i; j) is subsumed by a single constraint in G, D(i) can always be consistently instantiated simply by selecting D(i; j). Therefore, D can be reduced to a subset D 0 = D n D(i). A disjunction D(i) is subsumed by another disjunction D(j) if every disjunct of D(j) subsumes a disjunct of D(i). Pruning Rule 3 checks the consistency of the disjuncts using Graph IDPC. If a disjunct D(i; j) is found to be inconsistent, it can be discarded, resulting in a shorter disjunction D(i). The worst-case complexity of preprocessing is O(jNjjDj 2 jdj 2 nw 2 ) where jnj is the number of non-disjunctive constraints, jdj is the number of disjunctions, jdj is the maximum number of disjuncts in a disjunction, n is the number of variables, and W is the width of graph G. After the preprocessing rules have been applied, the disjunctions are ordered in ascending order of domains. This can reduce the number of backtracks required signicantlly [Tsa93]. In the rest of this paper we will assume that all the sets of disjunctions used in the examples have been preprocessed. 9

10 Procedure Solve state UNKNOWN consistent TRUE count 1 While (state=unknown) Do If (consistent 6=FALSE) then count Forward(count) Else count Backward(count) If (count = dis num + 1) then state SUCCESS Else If (count=0) then state FAILURE EndWhile If (state=success) then print(solution) Else If (state=failure) then print(\no solution exists") Figure 2: Procedure Solve: The calling environment 4.3 Implementation of BT In the style of [Pro93, Dec90, DP90] all the search algorithms we present are described by two functions, Forward and Backward, that correspond to the forward and the backward moves of the algorithms respectively, and a calling procedure Solve. The functions are called iteratively by the procedure. Function Forward tries to instantiate the current disjunction, while function Backward backtracks to one of the previous disjunctions (depending on the algorithm used) whenever a dead-end is encountered. The benet of this approach is that the forward and backward moves, as well as the search knowledge, are made explicit. Moreover, as we shall see later the combination of various backtracking algorithms into hybrids is performed in a more natural way. The implementation of BT is based on the corresponding functions and procedures for binary CSPs, as presented in [Pro93]. All the functions and procedures in this paper are described using Pascal-like pseudocode The Calling Environment Procedure Solve is shown in Figure 2. Solve rst initializes the global variables state, consistent and count and then enters the loop where the two functions Forward and Backward are iteratively called. Function Forward attempts to instantiate disjunction D(count), for 1 count dis num. If D(count) is consistently instantiated, Forward increases the value of count by one and returns it. Then Solve calls Forward again with the new value of count passed as argument. The same process continues until some disjunction D(i) cannot be consistently instantiated (dead-end) or count = dis num + 1. In the former case Forward changes the value of consistent from TRUE to FALSE and returns count. The change in the value of consistent causes Backward to be called by Solve with count as the argument. In the latter case state becomes SUCCESS, and the algorithm terminates, since all disjunctions have been instantiated. Finally, the solution (recovered from the array solution) 10

11 is returned. Function Backward is called when consistent becomes FALSE to deal with the dead-end. It backtracks to one of the past disjunctions D(j), sets count to j, and uninstantiates the instantiated disjunct of D(j). If there are no more available disjuncts in D(j), it returns without changing the value of consistent. As a result, Solve calls Backward again and it backtracks further. Otherwise, consistent is changed from FALSE to TRUE and Forward is called with count=j. If the backtrack point j is 0, state becomes FAILURE and the algorithm terminates unsuccessfully, since all possible combinations have been tried and failed Functions Forward and Backward Functions Forward and Backward of BT are shown in Figure 3. Function Forward tries to nd a disjunct of the current disjunction D(count) that can be consistently added to G. The while loop checks all the available disjuncts of D(count), using variable disjunct to index the disjuncts, until a consistency check succeeds or there are no more disjuncts left. Since all the disjunctions are not of the same length (i.e., they do not contain the same number of disjuncts), we need to know how many are the disjuncts of the current disjunction. A function called No of disjuncts is used for that purpose. This function takes the number of a disjunction as argument (e.g., i), and returns the number of disjuncts that D(i) has. The if statement at the beginning of the loop makes sure that only the available disjuncts are picked. Consistency checking is performed using a function called Check Consistency. The arguments of Check Consistency are count and the current disjunt D(count; disjunct). Function Check Consistency checks the consistency of D(count; disjunct) by calling the algorithm Graph IDPC discussed in Section 3. If the current disjunct is consistently instantiated, Check Consistency returns SUCCESS. As a result, consistent becomes TRUE, solution[count] takes the number of the instantiated disjunct as value, and the loop is terminated. In case a value dierent than SUCCESS is returned by function Check Consistency, it means that some constraint was violated. As a result, D(count; disjunct) becomes eliminated, the eects of its propagation up to the point where the inconsistency was detected are removed from the graph, and the next available disjunct is picked. Constraints are removed from the graph using a procedure called Remove constraint. This procedure removes from the graph all the eects of the constraint that was last instantiated. Thereby, it restores the graph's previous state. The details of function Check Consistency and procedure Remove constraint are omitted and can be found in [Ste97]. Function Backward backtracks chronologically from disjunction D(count) to the previous disjunction D(count?1). This involves the following operations: 1. All the disjuncts of D(count) become available. This is done by setting every entry of current domain[count] to AVAILABLE. 2. Disjunction D(count? 1) is uninstantiated (i.e., its instantiated disjunct is removed from G using procedure Remove constraint). The instan- 11

12 Function Forward(count) consistent FALSE disjunct 1 length No of disjuncts(count) While (disjunct length and consistent=false) Do If (current domain[count][disjunct]=available) then propagation result Check Consistency(count; D(count; disjunct)) If (propagation result=success) then consistent TRUE solution[count] disjunct Else current domain[count][disjunct] ELIMINATED Remove constraint(count) EndIf EndIf disjunct disjunct + 1 EndWhile If (consistent=true) Return count+1 Else Return count Function Backward(count) disjunct 1 length No of disjuncts(count) While (disjunct length) Do current domain[count][disjunct] AVAILABLE disjunct disjunct+1 EndWhile instantiated disjunct solution[count? 1] Remove constraint(count? 1) current domain[count? 1][instantiated disjunct] ELIMINATED disjunct solution[count? 1] + 1 length No of disjuncts(count? 1) While (disjunct length and consistent=false) Do If (current domain[count? 1][disjunct] =AVAILABLE) then consistent TRUE EndIf disjunct disjunct + 1 EndWhile solution[count? 1] 0 Return count? 1 Figure 3: Functions Forward and Backward for BT 12

13 tiated disjunct is found using the array solution (its number is stored in solution[count? 1]). A variable instantiated disjunct is used to keep the number of the disjunct. 3. The disjunct D(count? 1; instantiated disjunct) is eliminated. This is done by changing current domain[count? 1][instantiated disjunct] from AVAILABLE to ELIMINATED. 4. D(count? 1) is searched in order to determine if there are any available disjuncts left (the second while loop). The search begins from the disjunct immediately after D(count? 1; instantiated disjunct) since its preceding disjuncts have been eliminated. The search stops if an available disjunct is discovered, in which case consistent becomes TRUE, or if there are no more disjuncts left, in which case consistent remains FALSE. 5. solution[count? 1] is set to 0 to denote that D(count? 1) is not instantiated. Backward returns count? 1 as the new current disjunction. If consistent has become TRUE, procedure Solve will call Forward and another instantiation of D(count? 1) will be attempted. Otherwise Backward will be called again and BT will backtrack further. BT is a simple and inecient algorithm. It is an exhaustive search algorithm which systematically explores the whole search space. We will now look at more ecient algorithms that try to prune the search space. 5 Backjumping Backjumping (BJ) [Gas77] is a variation of BT that behaves more eciently when dead-ends are encountered. BJ instantiates the disjunctions one by one, starting with the rst, until a dead-end is encountered. If a dead-end is encountered at disjunction D(i) then, instead of backtracking chronologically, BJ will jump back to one of the past disjunctions that preclude a disjunct of D(i). The rejection of D(i)'s disjuncts is denitely caused by the instantiations of past disjunctions because all the disjuncts of all the disjunctions are consistent relative to the initial graph (this is guaranteed by the preprocessing step). For each disjunct of D(i) there can be more than one set of past disjunctions that is responsible for its rejection as the following example shows. Example 5.1 Let us assume that the set of instantiated disjuncts at any point in time is: x 3? x 1 1; x 3? x 2 2; x 2? x 4 0; x 1? x 4 0 and that the current disjunction contains the disjunct x 4? x 3?3. When this disjunct will be added to the set of instantiated disjuncts there will be two sources of inconsistency: 1. The constraints x 3? x 2 2, x 2? x 4 0 and x 4? x 3?3 13

14 2. The constraints x 3? x 1 1, x 1? x 4 0 and x 4? x 3?3 In the above example there are two sets of constraints, and therefore two sets of disjunctions that are responsible for the rejection of the current disjunct. For each disjunct D(i; j), these sets of past disjunctions will be called the conict sets of D(i; j). BJ will discover only one of the conict sets of D(i; j). This set will be called the culprit set of D(i; j), and will be denoted by Culprit set i;j. The aim of BJ is to select the deepest possible disjunction to backjump to. Therefore, BJ will select the deepest disjunction among the disjunctions in the culprit sets of the disjuncts of D(i). Before getting into any details about the design and implementation of the algorithm, we present an example that demonstrates the behaviour of BJ when dead-ends are encountered. Example 5.2 Suppose that the set of disjunctions D to be decided is: D(1) x 2? x 1 5 _ x 1? x 4?1 D(2) x 5? x 4?1 _ x 1? x 3 2 D(3) x 3? x 2 2 _ x 5? x 2 7 D(4) x 6? x 5 3 _ x 1? x 2?2 D(5) x 7? x 2 3 _ x 1? x 7?8 D(6) x 4? x 6?4 _ x 1? x 3?10 _ x 4? x 5 0 BJ proceeds as follows: D(1; 1), D(2; 1), D(3; 1), D(4; 1), and D(5; 1) are instantiated. As a result, the constraints x 2? x 1 5, x 5? x 4?1, x 3? x 2 2, x 6? x 5 3, and x 7? x 2 3 are added to G. We now try to instantiate D(6). The rst disjunct of D(6) is added to G. Now the constraints x 4? x 6?4, x 6? x 5 3, and x 5? x 4?1 are inconsistent. Therefore D(6; 1) is rejected. The constraints which cause the inconsistency are x 5? x 4?1 and x 6? x 5 3. These two constraints were added to G as a result of the instantiation of D(2) and D(4), respectively. Therefore, the culprit set of D(6; 1) is fd(2); D(4)g. Since D(6; 1) has been rejected, we try to instantiate D(6; 2). D(6; 2) is also inconsistent with G. The constraints responsible for the inconsistency are x 2? x 1 5 and x 3? x 2 2. These two constraints were added to G as a result of the instantiation of D(1) and D(3), respectively. Therefore, the culprit set of D(6; 2) is fd(1); D(3)g. We now try the last disjunct D(6; 3). This constraint is also inconsistent with G. The culprit for the inconsistency is constraint x 5?x 4?1. This constraint is a result of the instantiation of D(2). Therefore, the culprit set of D(6; 3) is fd(2)g. Since all the disjuncts of D(6) have been rejected, we have reached a dead-end. BJ will backjump to one of past disjunctions that preclude a disjunct of D(6), and uninstantiate it. 14

15 The disjunctions that preclude the disjuncts of D(6) are the ones that appear in the culprit sets of the disjuncts. Similarly to BJ for binary CSPs, the deepest past disjunction is selected as the backjump point. The culprit sets are: Culprit set 6;1 = fd(2); D(4)g, Culprit set 6;2 = fd(1); D(3)g, and Culprit set 6;3 = fd(2)g. The deepest past disjunction is D(4) in Culprit set 6;1. Thus, BJ will backjump to D(4), uninstantiate it, and try a new instantiation. Disjunct D(4; 2) is consistenctly instantiated, and so is disjunct D(5; 1). Now BJ moves on to D(6). This time, disjunct D(6; 1) is consistent with G. Thus, BJ terminates having found a consistent instantiation of the set of disjunctions. From the previous simple example we can see the benets of BJ over BT. After reaching the dead-end at D(6), BT would have chronologically backtracked to D(5) and tried to reinstantiate it. This would be meaningless, since D(5) does not appear in the culprit set of any disjunct of D(6), and therefore its instantiation has nothing to do with the dead-end. BJ, on the other hand, displays an intelligent backtracking behaviour. It jumps back to a disjunction which precludes one of the disjuncts of D(6). Thereby, it decreases the number of search nodes visited, and consequently decreases the number of consistency checks performed. 5.1 Discovering the Causes of Inconsistencies In order to identify the culprit set of a disjunct D(i; j), we have to know which constraints have produced the current labels on the edges involved in the inconsistency. If we have that information then we can \roll back" the changes, for each of the edges involved in the inconsistency, until we reach the instantiated disjuncts of past disjunctions. These disjunctions will form the culprit set of D(i; j). The rolling back of the changes requires that each edge should be connected with the edges it is derived from. This can be done by using dependency pointers. If the current label on edge x k! x l is a result of the addition of the labels on edges x k! x m and x m! x l then edge x k! x l should be associated through dependency pointers with edges x k! x m and x m! x l. Instead of using two pointers to point to edges x k! x m and x m! x l, we have chosen to use only one pointer that points to node x m. Obviously, if we can identify node x m then we automatically know that the edges responsible are x k! x m and x m! x l. Using these dependency pointers we can trace the changes in every edge back to an instantiated disjunct. This is done simply by following the dependency pointers backwards. The search for the inconsistency cause stops when we reach a point where there are no more dependency pointers to be followed. That is, when all the paths of pointers lead us to edges which are not the result of propagated disjuncts, but have been directly added to the graph. 5.2 Implementation of BJ BJ uses a one dimensional array max check of dis num elements to determine the backjump points in cases of dead-ends. All the elements of the array are initialized to 0. The disjuncts of each disjunction are checked one by one until 15

16 Function Forward(count) consistent FALSE disjunct 1 length No of disjuncts(count) While (disjunct length and consistent=false) Do If (current domain[count][disjunct] =AVAILABLE) then propagation result Check Consistency1(count; D(count; disjunct)) If (propagation result=success) then consistent TRUE solution[count] disjunct max check[count] count? 1 Else current domain[count][disjunct] ELIMINATED Remove constraint(count) If (propagation result > max check[count]) then max check[count] propagation result EndIf EndIf disjunct disjunct + 1 EndWhile If (consistent=true) then Return count + 1 Else Return count Figure 4: Function Forward for BJ one of them is consistently instantiated or there are no more left. When a disjunction D(i) is consistently instantiated, max check[i] becomes i? 1. This suggests, in a way, that one of the disjuncts of D(i), namely the instantiated disjunct, has been successfully checked against all the instantiations of the past disjunctions. Therefore, as in [Pro93], we could say that the last past disjunction D(i) was checked against is D(i?1) and as a result, max check[i] becomes i?1. If no consistent instantiation is found for D(i) then max check[i] is the deepest of all the disjunctions in the culprit set of D(i). BJ behaves in a similar way to BT, until a dead-end is reached. If a dead-end is encountered at a disjunction, let us say D(i), BJ backjumps to D(j), where j = max check[i], and tries to reinstantiate it. All the disjunctions D(k), where j < k i, are restored (i.e., the eliminated disjuncts become available again and max check[k] is set to 0). If D(j) has no more available disjuncts or all its available disjuncts are inconsistent, the algorithm backtracks chronologically from D(j) to its immediately preceeding disjunction. This happens because when BJ backjumps to D(j), max check[j] is j?1. As we can see, BJ backjumps only when it moves forward and it reaches a dead-end. In all other cases it backtracks chronologically. 16

17 5.2.1 Functions Forward and Backward Function Forward (Figure 4) checks all the available disjuncts of D(count) until one is consistently instantiated or there are no more left. It performs the same operations as function Forward of BT, with the addition that each time a disjunct is tried, max check[count] is updated. A function called Check Consistency1 is called to instantiate the currently attempted disjunct. This function is similar to function Check Consistency for BT (see Section 4.3.2). The dirence is that if the disjunct is inconsistent then Check Consistency1 returns the culprit of the inconsistency. The value propagation result returned by Check Consistency1 is compared with the current value of max check[count]. If propagation result is greater than max check[count] then the value of max check[count] is changed to propagation result so that max check[count] always contains the deepest past disjunction among the disjunctions that are in conict with the disjuncts of D(count). If disjunct D(count; disjunct) is consistently instantiated then max check[count] becomes count? 1. Function Backward (Figure 5) deals with dead-ends by jumping back to bjpoint = max check[count]. Backward for BJ is similar to Backward for BT. That is, it restores the disjuncts of D(count) (i.e., they become available again) and it uninstantiates disjunction D(bjpoint). In addition, all the disjunctions D(j), with bjpoint < j < level, are uninstantiated, and their disjuncts are restored. 6 Forward Checking Forward checking (commonly known as FC) [HE80] is a search algorithm that \looks forward". That is, instead of performing consistency checks between the current variable and the past variables, as all the algorithms we have discussed so far, it performs consistency checks between the current and the future variables. In the context of deciding the consistency of a set of disjunctive temporal constraints, FC will attempt to instantiate a disjunct from each disjunction, starting from the rst. Attempting to instantiate a disjunct D(i,j) consists of two steps. First D(i,j) is added to G using function Graph IDPC. Then all disjuncts of the future disjunctions D(k), for k = i+1; : : :; dis num, are checked to see whether they are consistent with G, one at a time. If a disjunct fails it is \removed" from the disjunction it belongs to. If during this process, which is known as ltering of the domains [HE80], one of the future disjunctions becomes empty then the disjuncts that were removed due to D(i,j) are restored, the attempted instantiation is rejected, and the next disjunct of the current disjunction D(i) is tried. In case there are no more disjuncts left in D(i), FC backtracks to D(i?1), uninstantiates its instantiated disjunct and tries the next available one. We should notice that because of the ltering that takes place during the attempt to instantiate a disjunct, it is certain that all the available disjuncts of the current disjunction can be consistently added to G. The strength of forward checking is its ability to discover inconsistencies early and therefore save the eort spent in exploring paths that lead to dead ends [HE80]. However, since FC checks all future variables during every at- 17

18 Function Backward(count) bjpoint max check[count] max check[count] 0 disjunct 1 length No of disjuncts(count) While (disjunct length) Do current domain[count][disjunct] AVAILABLE disjunct disjunct + 1 EndWhile For(j = count? 1 downto bjpoint + 1) Do max check[j] = 0 instantiated disjunct solution[j] Remove constraint(j) solution[j] = 0 disjunct 1 length No of disjuncts(count) While (disjunct length) Do current domain[j][disjunct] =AVAILABLE disjunct disjunct + 1 EndWhile EndFor instantiated disjunct solution[bjpoint] Remove constraint(bjpoint) current domain[bjpoint][instantiated disjunct] ELIMINATED disjunct solution[bjpoint] + 1 length No of disjuncts(bjpoint) While (disjunct length and consistent=false) Do If (current domain[bjpoint][disjunct] =AVAILABLE) then consistent TRUE EndIf EndWhile solution[bjpoint] 0 Return bjpoint Figure 5: Function Backward for BJ 18

19 tempted instantiation, it may perform more consistency checks per node than the algorithms we discussed previously. 6.1 Forward Checking with Backjumping Since FC backtraks chronologically when dead-ends are encountered, it demonstrates the same weaknesses as BT with respect to backtracking. In order to overcome these weaknesses, Prosser introduced a hybrid algorithm called forward checking with backjumping (known as FC-BJ) [Pro93]. FC-BJ is a hybrid search algorithm that combines the forward move of FC with the backward move of BJ. In that way, the advantages of both the algorithms are exploited. Before getting into any detail about the implementation of FC-BJ we give an example that shows how the algorithm works. Example 6.1 Suppose that we want to determine the consistency of the following set of disjunctions: D(1) x 2? x 1 5 _ x 3? x 4 6 D(2) x 3? x 1 4 _ x 3? x 4 5 D(3) x 5? x 4?6 _ x 3? x 4 4 D(4) x 1? x 3 0 _ x 3? x 4 2 D(5) x 3? x 5 2 _ x 1? x 3?6 D(6) x 1? x 2?8 _ x 4? x 3 1 FC-BJ will begin by trying to instantiate the rst disjunction. Disjunct D(1; 1) is instantiated and is forward checked against all the future disjuncts. The forward checking causes the elimination of D(6; 1). In the same way, D(2; 1) is instantiated and its forward checking causes the elimination of D(5; 2). D(3; 1) and D(4; 1) are instantiated without aecting any future disjunctions. Now, FC-BJ moves on to D(5). The forward checking of D(5; 1) causes the elimination of D(6; 2). This happens because from constraints D(5; 1) and D(3; 1) we get the new constraint x 3?x 4?4, which is obviously in conict with D(6; 2). Since there are no more available disjuncts in D(6), D(5; 1) is rejected. This leaves D(5) with no available disjuncts, since D(5; 2) has been eliminated due to the forward checking of D(2; 1). Therefore, FC-BJ has reached a dead-end. In this case, FC would chronologically backtrack to D(4) and uninstantiate it. This would result in redundant consistency checks, since the instantiation of D(4) plays no part in the dead-end. FC-BJ, on the other hand, following the philosophy of BJ tries to backjump to the source of the conict. FC-BJ will backjump to the deepest past disjunction that precludes a disjunct of D(5). This disjunction can be discovered by reasoning as follows. Disjunct D(5; 2) is eliminated because of the forward checking of D(2; 1). Therefore, we can say that the culprit for the elimination of D(5; 2) is disjunction D(2). Disjunct D(5; 1) is eliminated because its forward checking results in the annihilation of D(6). If D(6) were not annihilated, D(5; 1) would be available. Therefore, the disjunctions responsible for the elimination of D(5; 1) are the 19

20 past disjunctions whose instantiations, together with D(5; 1), cause the annihilation of D(6). Disjunct D(6; 1) is eliminated because of the forward checking of D(1; 1). Thus, the culprit for the elimination of D(6; 1) is disjunction D(1). Disjunct D(6; 2) is eliminated because it is in conict with a constraint that is derived from constraints D(5; 1) and D(3; 1). Therefore, disjunction D(3) is responsible for the elimination of D(6; 2). As we can see, the past disjunctions responsible for the annihilation of D(6), and thus for the elimination of D(5; 1), are D(1) and D(3). The deepest of all the past disjunctions that cause the elimination of the disjuncts of D(5) is therefore D(3). This means that FC-BJ will backjump to D(3). If FC-BJ jumps back to D(3) and uninstantiates it then the forward checking of D(5; 1) will not cause the elimination of D(6; 2), which means that D(5; 1) will be consistently instantiated. Finally, D(6; 2) will be consistently instantiated, and the algorithm will terminate. Having seen how FC-BJ works, we will now describe the data structures used by FC and FC-BJ, and explain how they are used. 6.2 Additional Data Structures For each disjunction D(i), FC keeps information about two things: 1. The disjuncts of D(i) that are eliminated because of the forward checking of past disjunctions. 2. The future disjunctions that D(i) forward checks against. In order to keep information about the eliminated disjuncts of D(i), we have modied the semantics of array current domain. According to the denition of current domain (Section 4.1), current domain[i][j] denotes the state in which the disjunct D(i; j) is in. In FC and FC-BJ, current domain is used to record the ltering of the disjunctions. Suppose that D(i; j) is the currently attempted disjunct. If a disjunct D(k; l), with i + 1 k dis num and 1 l max disno, fails during the forward checking of D(i; j) then i is recorded in current domain[k; l]. In that way, we know that disjunct D(k; l) is ltered out of the domain of disjunction D(k) because of the forward checking of D(i). Information about the future disjunctions that D(i) checks against is kept, in both algorithms, in the following data structure: future element: For every disjunction D(i) we keep a list of the future disjunctions that D(i) checks against. That is, if j belongs to i's list then some disjuncts of D(j) have become eliminated due to the instantiation of D(i). future fc: A one dimensional array of dis num elements. Each element of the array is a list of type future element. Initially all the lists future fc[i], for 1 i dis num, are empty. During the search process, while ltering takes place, new elements are added to the lists. When we attempt to instantiate the current disjunction D(i), each future disjunction D(j), for 20

21 j = i + 1; : : :; dis num, that checks against D(i), is added to the front of future fc[i]. Additionally, for each disjunction D(i), FC-BJ needs to keep information regarding the past disjunctions that forward check against D(i). Information about these past disjunctions is kept in the following data structures: past element: For every disjunction D(i) we keep a list of the past disjunctions that forward check against D(i). That is, if j belongs to i's list then some disjunct of D(i) has become eliminated due to the instantiation of D(j). past fc: A one dimensional array of dis num elements. Each element of the array is a list of type past element. Initially, all the lists past fc[i], for 1 i dis num, are empty. During the search process, while ltering takes place, new elements are added to the lists. Suppose that we attempt to instantiate the current disjunction D(i). For each future disjunction, D(j), that D(i) forward checks against, i is added to past fc[j]. max check: A one dimensional array of dis num elements that is used to determine the backjump point. Initially, max check[i], for i = 1; : : :; dis - num, is set to 0. If all the disjuncts of the current disjunction are rejected (i.e., a dead-end is reached), FC-BJ backjumps to a past disjunction chosen by exploiting the information in arrays past f c and max check in the following way. Suppose that FC-BJ reaches a dead-end at disjunction D(i). This means that each disjunct D(i; j) of D(i) is in one of the following two states: 1. D(i; j) is eliminated because of the forward checking of a past disjunction, or 2. D(i; j) is eliminated because its attempted instantiation results in the annihilation of a future disjunction D(k). In this case, FC would backtrack to D(i? 1) and try to reinstantiate it. The problem is that D(i? 1) might play no part in the dead-end and therefore, its reinstantiation might be redundant. As Example 6.1 shows, FC-BJ will nd the past disjunctions that preclude the disjuncts of D(i), and backjump to the deepest among them. For the disjuncts of D(i) that are in the rst of the above states, nding the disjunctions responsible for their elimination is straightforward. They are recorded in the array past f c[i]. But how do we nd the disjunctions responsible for the elimination of the disjuncts that are in the second of the above states? Let us assume that these disjuncts are D(i; j 1 ); : : :; D(i; j n ), and the disjunctions they annihilate are D(k 1 ); : : :; D(k n ). The annihilation of D(k l ), with 1 l n, is caused by the disjuncts that forward checked against it. For all D(k l ), with 1 l n, we can nd the deepest past disjunction that forward checked against D(k l ), using the information in past fc[k l ]. The deepest of these disjunctions, excluding D(i), is recorded in max check[i]. Suppose that this disjunction is 21

Backtracking algorithms for disjunctions of temporal constraints

Backtracking algorithms for disjunctions of temporal constraints Artificial Intelligence 120 (2000) 81 117 Backtracking algorithms for disjunctions of temporal constraints Kostas Stergiou a,, Manolis Koubarakis b,1 a APES Research Group, Department of Computer Science,

More information

Algebraic Properties of CSP Model Operators? Y.C. Law and J.H.M. Lee. The Chinese University of Hong Kong.

Algebraic Properties of CSP Model Operators? Y.C. Law and J.H.M. Lee. The Chinese University of Hong Kong. Algebraic Properties of CSP Model Operators? Y.C. Law and J.H.M. Lee Department of Computer Science and Engineering The Chinese University of Hong Kong Shatin, N.T., Hong Kong SAR, China fyclaw,jleeg@cse.cuhk.edu.hk

More information

Eddie Schwalb, Rina Dechter. It is well known that all these tasks are NP-hard.

Eddie Schwalb, Rina Dechter.  It is well known that all these tasks are NP-hard. Coping With Disjunctions in Temporal Constraint Satisfaction Problems 3 Eddie Schwalb, Rina Dechter Department of Information and Computer Science University of California at Irvine, CA 977 eschwalb@ics.uci.edu,

More information

GSAT and Local Consistency

GSAT and Local Consistency GSAT and Local Consistency Kalev Kask Computer Science Department University of California at Irvine Irvine, CA 92717 USA Rina Dechter Computer Science Department University of California at Irvine Irvine,

More information

A CSP Search Algorithm with Reduced Branching Factor

A CSP Search Algorithm with Reduced Branching Factor A CSP Search Algorithm with Reduced Branching Factor Igor Razgon and Amnon Meisels Department of Computer Science, Ben-Gurion University of the Negev, Beer-Sheva, 84-105, Israel {irazgon,am}@cs.bgu.ac.il

More information

Constraint-Directed Backtracking Algorithm. Wanlin Pang. Scott D. Goodwin. May 1996

Constraint-Directed Backtracking Algorithm. Wanlin Pang. Scott D. Goodwin. May 1996 Constraint-Directed Backtracking Algorithm for Constraint-Satisfaction Problems Wanlin Pang Scott D. Goodwin Technical Report CS-96-05 May 1996 cwanlin Pang and Scott D. Goodwin Department of Computer

More information

In search of the best constraint satisfaction search 3. Daniel Frost and Rina Dechter.

In search of the best constraint satisfaction search 3. Daniel Frost and Rina Dechter. In search of the best constraint satisfaction search 3 Daniel Frost and Rina Dechter Dept. of Information and Computer Science University of California, Irvine, CA 92717 fdfrost,dechterg@ics.uci.edu Abstract

More information

Path Consistency Revisited. Moninder Singh. University of Pennsylvania. Philadelphia, PA

Path Consistency Revisited. Moninder Singh. University of Pennsylvania. Philadelphia, PA Proceedings of the 7th IEEE International Conference on Tools with Articial Intelligence, 318-325, 1995. c Institute of Electrical and Electronics Engineers, Inc. (IEEE). Path Consistency Revisited Moninder

More information

Kalev Kask and Rina Dechter. Department of Information and Computer Science. University of California, Irvine, CA

Kalev Kask and Rina Dechter. Department of Information and Computer Science. University of California, Irvine, CA GSAT and Local Consistency 3 Kalev Kask and Rina Dechter Department of Information and Computer Science University of California, Irvine, CA 92717-3425 fkkask,dechterg@ics.uci.edu Abstract It has been

More information

of m clauses, each containing the disjunction of boolean variables from a nite set V = fv 1 ; : : : ; vng of size n [8]. Each variable occurrence with

of m clauses, each containing the disjunction of boolean variables from a nite set V = fv 1 ; : : : ; vng of size n [8]. Each variable occurrence with A Hybridised 3-SAT Algorithm Andrew Slater Automated Reasoning Project, Computer Sciences Laboratory, RSISE, Australian National University, 0200, Canberra Andrew.Slater@anu.edu.au April 9, 1999 1 Introduction

More information

Module 4. Constraint satisfaction problems. Version 2 CSE IIT, Kharagpur

Module 4. Constraint satisfaction problems. Version 2 CSE IIT, Kharagpur Module 4 Constraint satisfaction problems Lesson 10 Constraint satisfaction problems - II 4.5 Variable and Value Ordering A search algorithm for constraint satisfaction requires the order in which variables

More information

Exploring A Two-Solver Architecture for Clause Learning CSP Solvers. Ozan Erdem

Exploring A Two-Solver Architecture for Clause Learning CSP Solvers. Ozan Erdem Exploring A Two-Solver Architecture for Clause Learning CSP Solvers by Ozan Erdem A thesis submitted in conformity with the requirements for the degree of Doctor of Philosophy Graduate Department of Computer

More information

Reduced branching-factor algorithms for constraint satisfaction problems

Reduced branching-factor algorithms for constraint satisfaction problems Reduced branching-factor algorithms for constraint satisfaction problems Igor Razgon and Amnon Meisels Department of Computer Science, Ben-Gurion University of the Negev, Beer-Sheva, 84-105, Israel {irazgon,am}@cs.bgu.ac.il

More information

Rina Dechter. Irvine, California, USA A constraint satisfaction problem (csp) dened over a constraint network

Rina Dechter. Irvine, California, USA A constraint satisfaction problem (csp) dened over a constraint network Constraint Satisfaction Rina Dechter Department of Computer and Information Science University of California, Irvine Irvine, California, USA 92717 dechter@@ics.uci.edu A constraint satisfaction problem

More information

General Methods and Search Algorithms

General Methods and Search Algorithms DM811 HEURISTICS AND LOCAL SEARCH ALGORITHMS FOR COMBINATORIAL OPTIMZATION Lecture 3 General Methods and Search Algorithms Marco Chiarandini 2 Methods and Algorithms A Method is a general framework for

More information

Constraint (Logic) Programming

Constraint (Logic) Programming Constraint (Logic) Programming Roman Barták Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic bartak@ktiml.mff.cuni.cz Sudoku Combinatorial puzzle, whose goal is to enter

More information

A Uniform View of Backtracking

A Uniform View of Backtracking A Uniform View of Backtracking Fahiem Bacchus 1 Department. of Computer Science, 6 Kings College Road, University Of Toronto, Toronto, Ontario, Canada, M5S 1A4, fbacchus@cs.toronto.edu? Abstract. Backtracking

More information

in conjunction with algorithms which check forwards, the Fail-First (FF) and Brelaz (Bz) heuristics are cheap to evaluate and are generally considered

in conjunction with algorithms which check forwards, the Fail-First (FF) and Brelaz (Bz) heuristics are cheap to evaluate and are generally considered An Empirical Study of Dynamic Variable Ordering Heuristics for the Constraint Satisfaction Problem? Ian P. Gent 1, Ewan MacIntyre 1, Patrick Prosser 1, Barbara M. Smith 2 and Toby Walsh 3 1 Department

More information

Constraint Satisfaction Problems. Chapter 6

Constraint Satisfaction Problems. Chapter 6 Constraint Satisfaction Problems Chapter 6 Constraint Satisfaction Problems A constraint satisfaction problem consists of three components, X, D, and C: X is a set of variables, {X 1,..., X n }. D is a

More information

space. We will apply the idea of enforcing local consistency to GSAT with the hope that its performance can

space. We will apply the idea of enforcing local consistency to GSAT with the hope that its performance can GSAT and Local Consistency 3 Kalev Kask Computer Science Department University of California at Irvine Irvine, CA 92717 USA Rina Dechter Computer Science Department University of California at Irvine Irvine,

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Constraint Satisfaction Problems In which we see how treating states as more than just little black boxes leads to the invention of a range of powerful new search methods and a deeper understanding of

More information

Hybrid Algorithms for SAT. Irina Rish and Rina Dechter.

Hybrid Algorithms for SAT. Irina Rish and Rina Dechter. To Guess or to Think? Hybrid Algorithms for SAT Irina Rish and Rina Dechter Information and Computer Science University of California, Irvine fdechter,irinarg@ics.uci.edu http://www.ics.uci.edu/f~irinar,~dechterg

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Constraint Satisfaction Problems CE417: Introduction to Artificial Intelligence Sharif University of Technology Spring 2013 Soleymani Course material: Artificial Intelligence: A Modern Approach, 3 rd Edition,

More information

Example: Map coloring

Example: Map coloring Today s s lecture Local Search Lecture 7: Search - 6 Heuristic Repair CSP and 3-SAT Solving CSPs using Systematic Search. Victor Lesser CMPSCI 683 Fall 2004 The relationship between problem structure and

More information

A Theoretical Evaluation of Selected Backtracking. Algorithms. Grzegorz Kondrak and Peter van Beek. Department of Computing Science

A Theoretical Evaluation of Selected Backtracking. Algorithms. Grzegorz Kondrak and Peter van Beek. Department of Computing Science A Theoretical Evaluation of Selected Backtracking Algorithms Grzegorz Kondrak and Peter van Beek Department of Computing Science University of Alberta Edmonton, Alberta, Canada T6G 2H1 kondrak@cs.toronto.edu,

More information

VALCSP solver : a combination of Multi-Level Dynamic Variable Ordering with Constraint Weighting

VALCSP solver : a combination of Multi-Level Dynamic Variable Ordering with Constraint Weighting VALCS solver : a combination of Multi-Level Dynamic Variable Ordering with Constraint Weighting Assef Chmeiss, Lakdar Saïs, Vincent Krawczyk CRIL - University of Artois - IUT de Lens Rue Jean Souvraz -

More information

Heap-on-Top Priority Queues. March Abstract. We introduce the heap-on-top (hot) priority queue data structure that combines the

Heap-on-Top Priority Queues. March Abstract. We introduce the heap-on-top (hot) priority queue data structure that combines the Heap-on-Top Priority Queues Boris V. Cherkassky Central Economics and Mathematics Institute Krasikova St. 32 117418, Moscow, Russia cher@cemi.msk.su Andrew V. Goldberg NEC Research Institute 4 Independence

More information

Constructive Search Algorithms

Constructive Search Algorithms Constructive Search Algorithms! Introduction Historically the major search method for CSPs Reference: S.W.Golomb & L.D.Baumert (1965) Backtrack Programming, JACM 12:516-524 Extended for Intelligent Backtracking

More information

Conflict based Backjumping for Constraints Optimization Problems

Conflict based Backjumping for Constraints Optimization Problems Conflict based Backjumping for Constraints Optimization Problems Roie Zivan and Amnon Meisels {zivanr,am}@cs.bgu.ac.il Department of Computer Science, Ben-Gurion University of the Negev, Beer-Sheva, 84-105,

More information

Some Applications of Graph Bandwidth to Constraint Satisfaction Problems

Some Applications of Graph Bandwidth to Constraint Satisfaction Problems Some Applications of Graph Bandwidth to Constraint Satisfaction Problems Ramin Zabih Computer Science Department Stanford University Stanford, California 94305 Abstract Bandwidth is a fundamental concept

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Constraint Satisfaction Problems Constraint satisfaction problems Backtracking algorithms for CSP Heuristics Local search for CSP Problem structure and difficulty of solving Search Problems The formalism

More information

The problem of minimizing the elimination tree height for general graphs is N P-hard. However, there exist classes of graphs for which the problem can

The problem of minimizing the elimination tree height for general graphs is N P-hard. However, there exist classes of graphs for which the problem can A Simple Cubic Algorithm for Computing Minimum Height Elimination Trees for Interval Graphs Bengt Aspvall, Pinar Heggernes, Jan Arne Telle Department of Informatics, University of Bergen N{5020 Bergen,

More information

Improving search using indexing: a study with temporal CSPs

Improving search using indexing: a study with temporal CSPs Improving search using indexing: a study with temporal CSPs Nikos Mamoulis Dimitris Papadias Department of Computer Science Hong Kong University of Science Technology Clear Water Bay, Hong Kong http://www.es.ust.hk/{-mamoulis,

More information

UNIVERSITY OF ALBERTA. A Theoretical Evaluation of Selected Backtracking Algorithms. Grzegorz Kondrak

UNIVERSITY OF ALBERTA. A Theoretical Evaluation of Selected Backtracking Algorithms. Grzegorz Kondrak UNIVERSITY OF ALBERTA A Theoretical Evaluation of Selected Backtracking Algorithms BY Grzegorz Kondrak A thesis submitted to the Faculty of Graduate Studies and Research in partial fulllment of the requirements

More information

A Polynomial Algorithm for Continuous Non-binary Disjunctive CSPs

A Polynomial Algorithm for Continuous Non-binary Disjunctive CSPs A Polynomial Algorithm for Continuous Non-binary Disjunctive CSPs Miguel A. Salido, Federico Barber Departamento de Sistemas Informáticos y Computación, Universidad Politécnica de Valencia, 46020 Valencia,

More information

Unifying and extending hybrid tractable classes of CSPs

Unifying and extending hybrid tractable classes of CSPs Journal of Experimental & Theoretical Artificial Intelligence Vol. 00, No. 00, Month-Month 200x, 1 16 Unifying and extending hybrid tractable classes of CSPs Wady Naanaa Faculty of sciences, University

More information

2 Keywords Backtracking Algorithms, Constraint Satisfaction Problem, Distributed Articial Intelligence, Iterative Improvement Algorithm, Multiagent Sy

2 Keywords Backtracking Algorithms, Constraint Satisfaction Problem, Distributed Articial Intelligence, Iterative Improvement Algorithm, Multiagent Sy 1 The Distributed Constraint Satisfaction Problem: Formalization and Algorithms IEEE Trans. on Knowledge and DATA Engineering, vol.10, No.5 September 1998 Makoto Yokoo, Edmund H. Durfee, Toru Ishida, and

More information

A New Algorithm for Singleton Arc Consistency

A New Algorithm for Singleton Arc Consistency A New Algorithm for Singleton Arc Consistency Roman Barták, Radek Erben Charles University, Institute for Theoretical Computer Science Malostranské nám. 2/25, 118 Praha 1, Czech Republic bartak@kti.mff.cuni.cz,

More information

Constraint Satisfaction Problems Chapter 3, Section 7 and Chapter 4, Section 4.4 AIMA Slides cstuart Russell and Peter Norvig, 1998 Chapter 3, Section

Constraint Satisfaction Problems Chapter 3, Section 7 and Chapter 4, Section 4.4 AIMA Slides cstuart Russell and Peter Norvig, 1998 Chapter 3, Section Constraint Satisfaction Problems Chapter 3, Section 7 and Chapter 4, Section 4.4 AIMA Slides cstuart Russell and Peter Norvig, 1998 Chapter 3, Section 7 and Chapter 4, Section 4.4 1 Outline } CSP examples

More information

Lecture 6: Constraint Satisfaction Problems (CSPs)

Lecture 6: Constraint Satisfaction Problems (CSPs) Lecture 6: Constraint Satisfaction Problems (CSPs) CS 580 (001) - Spring 2018 Amarda Shehu Department of Computer Science George Mason University, Fairfax, VA, USA February 28, 2018 Amarda Shehu (580)

More information

2 [Ben96]. However, this study was limited to a single mapping. Since the choice of mapping can have a very large impact on our ability to solve probl

2 [Ben96]. However, this study was limited to a single mapping. Since the choice of mapping can have a very large impact on our ability to solve probl Reformulating propositional satisability as constraint satisfaction Toby Walsh University of York, York, England. tw@cs.york.ac.uk Abstract. We study how propositional satisability (SAT) problems can be

More information

Constraint processing for optimal maintenance. scheduling. Daniel Frost and Rina Dechter. ffrost, Abstract

Constraint processing for optimal maintenance. scheduling. Daniel Frost and Rina Dechter. ffrost, Abstract Constraint processing for optimal maintenance scheduling Daniel Frost and Rina Dechter Dept. of Information and Computer Science, University of California, Irvine, CA 92697-3425 ffrost, dechterg@ics.uci.edu

More information

Unrestricted Nogood Recording in CSP search

Unrestricted Nogood Recording in CSP search Unrestricted Nogood Recording in CSP search George Katsirelos and Fahiem Bacchus Department of Computer Science, University Of Toronto, Toronto, Ontario, Canada [gkatsi,fbacchus]@cs.toronto.edu Abstract.

More information

Chapter 8. NP-complete problems

Chapter 8. NP-complete problems Chapter 8. NP-complete problems Search problems E cient algorithms We have developed algorithms for I I I I I finding shortest paths in graphs, minimum spanning trees in graphs, matchings in bipartite

More information

size, runs an existing induction algorithm on the rst subset to obtain a rst set of rules, and then processes each of the remaining data subsets at a

size, runs an existing induction algorithm on the rst subset to obtain a rst set of rules, and then processes each of the remaining data subsets at a Multi-Layer Incremental Induction Xindong Wu and William H.W. Lo School of Computer Science and Software Ebgineering Monash University 900 Dandenong Road Melbourne, VIC 3145, Australia Email: xindong@computer.org

More information

Crossword Puzzles as a Constraint Problem

Crossword Puzzles as a Constraint Problem Crossword Puzzles as a Constraint Problem Anbulagan and Adi Botea NICTA and Australian National University, Canberra, Australia {anbulagan,adi.botea}@nicta.com.au Abstract. We present new results in crossword

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Constraint Satisfaction Problems Greedy Local Search Bernhard Nebel, Julien Hué, and Stefan Wölfl Albert-Ludwigs-Universität Freiburg June 19, 2007 Nebel, Hué and Wölfl (Universität Freiburg) Constraint

More information

Andrew Davenport and Edward Tsang. fdaveat,edwardgessex.ac.uk. mostly soluble problems and regions of overconstrained, mostly insoluble problems as

Andrew Davenport and Edward Tsang. fdaveat,edwardgessex.ac.uk. mostly soluble problems and regions of overconstrained, mostly insoluble problems as An empirical investigation into the exceptionally hard problems Andrew Davenport and Edward Tsang Department of Computer Science, University of Essex, Colchester, Essex CO SQ, United Kingdom. fdaveat,edwardgessex.ac.uk

More information

Chronological Backtracking Conflict Directed Backjumping Dynamic Backtracking Branching Strategies Branching Heuristics Heavy Tail Behavior

Chronological Backtracking Conflict Directed Backjumping Dynamic Backtracking Branching Strategies Branching Heuristics Heavy Tail Behavior PART III: Search Outline Depth-first Search Chronological Backtracking Conflict Directed Backjumping Dynamic Backtracking Branching Strategies Branching Heuristics Heavy Tail Behavior Best-First Search

More information

A generic framework for solving CSPs integrating decomposition methods

A generic framework for solving CSPs integrating decomposition methods A generic framework for solving CSPs integrating decomposition methods L. Blet 1,3, S. N. Ndiaye 1,2, and C. Solnon 1,3 1 Université de Lyon - LIRIS 2 Université Lyon 1, LIRIS, UMR5205, F-69622 France

More information

Constraint Satisfaction

Constraint Satisfaction Constraint Satisfaction Philipp Koehn 1 October 2015 Outline 1 Constraint satisfaction problems (CSP) examples Backtracking search for CSPs Problem structure and problem decomposition Local search for

More information

Backtracking algorithms for constraint. satisfaction problems { a tutorial survey. Rina Dechter and Daniel Frost

Backtracking algorithms for constraint. satisfaction problems { a tutorial survey. Rina Dechter and Daniel Frost Backtracking algorithms for constraint satisfaction problems { a tutorial survey Rina Dechter and Daniel Frost Department of Information and Computer Science University of California, Irvine Irvine, California,

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Constraint Satisfaction Problems Adrian Groza Department of Computer Science Technical University of Cluj-Napoca 12 Nov 2014 Outline 1 Constraint Reasoning 2 Systematic Search Methods Improving backtracking

More information

On the Complexity of Interval-Based Constraint. Networks. September 19, Abstract

On the Complexity of Interval-Based Constraint. Networks. September 19, Abstract On the Complexity of Interval-Based Constraint Networks Rony Shapiro 1, Yishai A. Feldman 2, and Rina Dechter 3 September 19, 1998 Abstract Acyclic constraint satisfaction problems with arithmetic constraints

More information

Title of Publication: Encyclopedia of Cognitive Science. Article title: Constraint Satisfaction. Article code: 26. Authors: Rina Dechter

Title of Publication: Encyclopedia of Cognitive Science. Article title: Constraint Satisfaction. Article code: 26. Authors: Rina Dechter Title of Publication: Encyclopedia of Cognitive Science. Article title: Constraint Satisfaction. Article code: 26. Authors: Rina Dechter Department of Computer and Information Science University of California,

More information

Mathematical Programming Formulations, Constraint Programming

Mathematical Programming Formulations, Constraint Programming Outline DM87 SCHEDULING, TIMETABLING AND ROUTING Lecture 3 Mathematical Programming Formulations, Constraint Programming 1. Special Purpose Algorithms 2. Constraint Programming Marco Chiarandini DM87 Scheduling,

More information

Temporal Constraint Satisfaction Problems An Evaluation of Search Strategies

Temporal Constraint Satisfaction Problems An Evaluation of Search Strategies Introduction Temporal Constraint Satisfaction Problems An Evaluation of Search Strategies Bruce Lo, John Duchi, and James Connor brucelo@cs.stanford.edu, jduchi@stanford.edu, jconnor@stanford.edu Stanford

More information

P Is Not Equal to NP. ScholarlyCommons. University of Pennsylvania. Jon Freeman University of Pennsylvania. October 1989

P Is Not Equal to NP. ScholarlyCommons. University of Pennsylvania. Jon Freeman University of Pennsylvania. October 1989 University of Pennsylvania ScholarlyCommons Technical Reports (CIS) Department of Computer & Information Science October 1989 P Is Not Equal to NP Jon Freeman University of Pennsylvania Follow this and

More information

The Resolution Algorithm

The Resolution Algorithm The Resolution Algorithm Introduction In this lecture we introduce the Resolution algorithm for solving instances of the NP-complete CNF- SAT decision problem. Although the algorithm does not run in polynomial

More information

Constraint Optimisation Problems. Constraint Optimisation. Cost Networks. Branch and Bound. Dynamic Programming

Constraint Optimisation Problems. Constraint Optimisation. Cost Networks. Branch and Bound. Dynamic Programming Summary Network Search Bucket Elimination Soft Soft s express preferences over variable assignments Preferences give dierent values over variable assignment A student can follow only one class at a time

More information

1 Inference for Boolean theories

1 Inference for Boolean theories Scribe notes on the class discussion on consistency methods for boolean theories, row convex constraints and linear inequalities (Section 8.3 to 8.6) Speaker: Eric Moss Scribe: Anagh Lal Corrector: Chen

More information

What is Search For? CSE 473: Artificial Intelligence. Example: N-Queens. Example: N-Queens. Example: Map-Coloring 4/7/17

What is Search For? CSE 473: Artificial Intelligence. Example: N-Queens. Example: N-Queens. Example: Map-Coloring 4/7/17 CSE 473: Artificial Intelligence Constraint Satisfaction Dieter Fox What is Search For? Models of the world: single agent, deterministic actions, fully observed state, discrete state space Planning: sequences

More information

Conflict Directed Backjumping for Max-CSPs

Conflict Directed Backjumping for Max-CSPs Conflict Directed Backjumping for Max-CSPs Roie Zivan and Amnon Meisels, Department of Computer Science, Ben-Gurion University of the Negev, Beer-Sheva, 84-105, Israel Abstract Max-CSPs are Constraint

More information

CS 188: Artificial Intelligence Fall 2011

CS 188: Artificial Intelligence Fall 2011 CS 188: Artificial Intelligence Fall 2011 Lecture 5: CSPs II 9/8/2011 Dan Klein UC Berkeley Multiple slides over the course adapted from either Stuart Russell or Andrew Moore 1 Today Efficient Solution

More information

CSE 473: Artificial Intelligence

CSE 473: Artificial Intelligence CSE 473: Artificial Intelligence Constraint Satisfaction Luke Zettlemoyer Multiple slides adapted from Dan Klein, Stuart Russell or Andrew Moore What is Search For? Models of the world: single agent, deterministic

More information

Constraint Satisfaction Problems (CSPs)

Constraint Satisfaction Problems (CSPs) 1 Hal Daumé III (me@hal3.name) Constraint Satisfaction Problems (CSPs) Hal Daumé III Computer Science University of Maryland me@hal3.name CS 421: Introduction to Artificial Intelligence 7 Feb 2012 Many

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Constraint Satisfaction Problems Chapter 5 Chapter 5 1 Outline CSP examples Backtracking search for CSPs Problem structure and problem decomposition Local search for CSPs Chapter 5 2 Constraint satisfaction

More information

Programming Languages Third Edition

Programming Languages Third Edition Programming Languages Third Edition Chapter 12 Formal Semantics Objectives Become familiar with a sample small language for the purpose of semantic specification Understand operational semantics Understand

More information

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence Foundations of Artificial Intelligence 5. Constraint Satisfaction Problems CSPs as Search Problems, Solving CSPs, Problem Structure Wolfram Burgard, Bernhard Nebel, and Martin Riedmiller Albert-Ludwigs-Universität

More information

Local consistency for ternary numeric constraints. Boi Faltings and Esther Gelle. Articial Intelligence Laboratory (LIA)

Local consistency for ternary numeric constraints. Boi Faltings and Esther Gelle. Articial Intelligence Laboratory (LIA) Local consistency for ternary numeric constraints Boi Faltings and Esther Gelle Articial Intelligence Laboratory (LIA) Swiss Federal Institute of Technology (EPFL) IN-Ecublens, 1015 Lausanne, Switzerland

More information

Solving Quantified Constraint Satisfaction Problems

Solving Quantified Constraint Satisfaction Problems Solving Quantified Constraint Satisfaction Problems Ian P. Gent Peter Nightingale Andrew Rowley School of Computer Science, University of St Andrews St Andrews, Fife, KY16 9SS, UK. {ipg,pn,agdr}@dcs.st-and.ac.uk

More information

Constraint Satisfaction. AI Slides (5e) c Lin

Constraint Satisfaction. AI Slides (5e) c Lin Constraint Satisfaction 4 AI Slides (5e) c Lin Zuoquan@PKU 2003-2018 4 1 4 Constraint Satisfaction 4.1 Constraint satisfaction problems 4.2 Backtracking search 4.3 Constraint propagation 4.4 Local search

More information

Scan Scheduling Specification and Analysis

Scan Scheduling Specification and Analysis Scan Scheduling Specification and Analysis Bruno Dutertre System Design Laboratory SRI International Menlo Park, CA 94025 May 24, 2000 This work was partially funded by DARPA/AFRL under BAE System subcontract

More information

Example: Map-Coloring. Constraint Satisfaction Problems Western Australia. Example: Map-Coloring contd. Outline. Constraint graph

Example: Map-Coloring. Constraint Satisfaction Problems Western Australia. Example: Map-Coloring contd. Outline. Constraint graph Example: Map-Coloring Constraint Satisfaction Problems Western Northern erritory ueensland Chapter 5 South New South Wales asmania Variables, N,,, V, SA, Domains D i = {red,green,blue} Constraints: adjacent

More information

Solving quantified constraint satisfaction problems

Solving quantified constraint satisfaction problems Artificial Intelligence 172 (2008) 738 771 www.elsevier.com/locate/artint Solving quantified constraint satisfaction problems Ian P. Gent a, Peter Nightingale a, Andrew Rowley a, Kostas Stergiou b, a School

More information

EECS 219C: Formal Methods Boolean Satisfiability Solving. Sanjit A. Seshia EECS, UC Berkeley

EECS 219C: Formal Methods Boolean Satisfiability Solving. Sanjit A. Seshia EECS, UC Berkeley EECS 219C: Formal Methods Boolean Satisfiability Solving Sanjit A. Seshia EECS, UC Berkeley The Boolean Satisfiability Problem (SAT) Given: A Boolean formula F(x 1, x 2, x 3,, x n ) Can F evaluate to 1

More information

Artificial Intelligence

Artificial Intelligence Contents Artificial Intelligence 5. Constraint Satisfaction Problems CSPs as Search Problems, Solving CSPs, Problem Structure Wolfram Burgard, Andreas Karwath, Bernhard Nebel, and Martin Riedmiller What

More information

Artificial Intelligence

Artificial Intelligence Artificial Intelligence 5. Constraint Satisfaction Problems CSPs as Search Problems, Solving CSPs, Problem Structure Wolfram Burgard, Andreas Karwath, Bernhard Nebel, and Martin Riedmiller SA-1 Contents

More information

Determining if (FC-) (conflict-directed) backjumping visits a given node is NP-hard

Determining if (FC-) (conflict-directed) backjumping visits a given node is NP-hard Artificial Intelligence 32 (200) 05 7 Research Note Determining if (FC-) (conflict-directed) backjumping visits a given node is NP-hard Bernd S.W. Schröder Program of Mathematics and Statistics, Louisiana

More information

A Graph-Based Method for Improving GSAT. Kalev Kask and Rina Dechter. fkkask,

A Graph-Based Method for Improving GSAT. Kalev Kask and Rina Dechter. fkkask, A Graph-Based Method for Improving GSAT Kalev Kask and Rina Dechter Department of Information and Computer Science University of California, Irvine, CA 92717 fkkask, dechterg@ics.uci.edu Abstract GSAT

More information

Constraint Satisfaction Problems. slides from: Padhraic Smyth, Bryan Low, S. Russell and P. Norvig, Jean-Claude Latombe

Constraint Satisfaction Problems. slides from: Padhraic Smyth, Bryan Low, S. Russell and P. Norvig, Jean-Claude Latombe Constraint Satisfaction Problems slides from: Padhraic Smyth, Bryan Low, S. Russell and P. Norvig, Jean-Claude Latombe Standard search problems: State is a black box : arbitrary data structure Goal test

More information

Constraint Satisfaction Problems. Chapter 6

Constraint Satisfaction Problems. Chapter 6 Constraint Satisfaction Problems Chapter 6 Office hours Office hours for Assignment 1 (ASB9810 in CSIL): Sep 29th(Fri) 12:00 to 13:30 Oct 3rd(Tue) 11:30 to 13:00 Late homework policy You get four late

More information

Rina Dechter and Daniel Frost. September 17, Abstract

Rina Dechter and Daniel Frost. September 17, Abstract Backtracking algorithms for constraint satisfaction problems Rina Dechter and Daniel Frost Department of Information and Computer Science University of California, Irvine Irvine, California, USA 92697-3425

More information

CS 4100 // artificial intelligence

CS 4100 // artificial intelligence CS 4100 // artificial intelligence instructor: byron wallace Constraint Satisfaction Problems Attribution: many of these slides are modified versions of those distributed with the UC Berkeley CS188 materials

More information

A taxonomy of race. D. P. Helmbold, C. E. McDowell. September 28, University of California, Santa Cruz. Santa Cruz, CA

A taxonomy of race. D. P. Helmbold, C. E. McDowell. September 28, University of California, Santa Cruz. Santa Cruz, CA A taxonomy of race conditions. D. P. Helmbold, C. E. McDowell UCSC-CRL-94-34 September 28, 1994 Board of Studies in Computer and Information Sciences University of California, Santa Cruz Santa Cruz, CA

More information

EECS 219C: Computer-Aided Verification Boolean Satisfiability Solving. Sanjit A. Seshia EECS, UC Berkeley

EECS 219C: Computer-Aided Verification Boolean Satisfiability Solving. Sanjit A. Seshia EECS, UC Berkeley EECS 219C: Computer-Aided Verification Boolean Satisfiability Solving Sanjit A. Seshia EECS, UC Berkeley Project Proposals Due Friday, February 13 on bcourses Will discuss project topics on Monday Instructions

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Last update: February 25, 2010 Constraint Satisfaction Problems CMSC 421, Chapter 5 CMSC 421, Chapter 5 1 Outline CSP examples Backtracking search for CSPs Problem structure and problem decomposition Local

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Constraint Satisfaction Problems Frank C. Langbein F.C.Langbein@cs.cf.ac.uk Department of Computer Science Cardiff University 13th February 2001 Constraint Satisfaction Problems (CSPs) A CSP is a high

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Constraint Satisfaction Problems Look-Back Malte Helmert and Stefan Wölfl Albert-Ludwigs-Universität Freiburg June 5, 2007 S. Wölfl, M. Helmert (Universität Freiburg) Constraint Satisfaction Problems June

More information

CONSTRAINT SATISFACTION PROBLEM: A CASE STUDY

CONSTRAINT SATISFACTION PROBLEM: A CASE STUDY Available Online at www.ijcsmc.com International Journal of Computer Science and Mobile Computing A Monthly Journal of Computer Science and Information Technology IJCSMC, Vol. 4, Issue. 5, May 2015, pg.33

More information

10/11/2017. Constraint Satisfaction Problems II. Review: CSP Representations. Heuristic 1: Most constrained variable

10/11/2017. Constraint Satisfaction Problems II. Review: CSP Representations. Heuristic 1: Most constrained variable //7 Review: Constraint Satisfaction Problems Constraint Satisfaction Problems II AIMA: Chapter 6 A CSP consists of: Finite set of X, X,, X n Nonempty domain of possible values for each variable D, D, D

More information

NP-Hardness. We start by defining types of problem, and then move on to defining the polynomial-time reductions.

NP-Hardness. We start by defining types of problem, and then move on to defining the polynomial-time reductions. CS 787: Advanced Algorithms NP-Hardness Instructor: Dieter van Melkebeek We review the concept of polynomial-time reductions, define various classes of problems including NP-complete, and show that 3-SAT

More information

Binary vs. Non-Binary Constraints

Binary vs. Non-Binary Constraints Binary vs. Non-Binary Constraints Fahiem Bacchus Department of Computer Science University of Toronto Toronto, Canada fbacchus@cs.toronto.edu Xinguang Chen Department of Computing Science University of

More information

Stochastic greedy local search Chapter 7

Stochastic greedy local search Chapter 7 Stochastic greedy local search Chapter 7 ICS-275 Winter 2016 Example: 8-queen problem Main elements Choose a full assignment and iteratively improve it towards a solution Requires a cost function: number

More information

Backtracking and Branch-and-Bound

Backtracking and Branch-and-Bound Backtracking and Branch-and-Bound Usually for problems with high complexity Exhaustive Search is too time consuming Cut down on some search using special methods Idea: Construct partial solutions and extend

More information

SAMOS: an Active Object{Oriented Database System. Stella Gatziu, Klaus R. Dittrich. Database Technology Research Group

SAMOS: an Active Object{Oriented Database System. Stella Gatziu, Klaus R. Dittrich. Database Technology Research Group SAMOS: an Active Object{Oriented Database System Stella Gatziu, Klaus R. Dittrich Database Technology Research Group Institut fur Informatik, Universitat Zurich fgatziu, dittrichg@ifi.unizh.ch to appear

More information

CS 188: Artificial Intelligence Fall 2008

CS 188: Artificial Intelligence Fall 2008 CS 188: Artificial Intelligence Fall 2008 Lecture 4: CSPs 9/9/2008 Dan Klein UC Berkeley Many slides over the course adapted from either Stuart Russell or Andrew Moore 1 1 Announcements Grading questions:

More information

Announcements. CS 188: Artificial Intelligence Fall Large Scale: Problems with A* What is Search For? Example: N-Queens

Announcements. CS 188: Artificial Intelligence Fall Large Scale: Problems with A* What is Search For? Example: N-Queens CS 188: Artificial Intelligence Fall 2008 Announcements Grading questions: don t panic, talk to us Newsgroup: check it out Lecture 4: CSPs 9/9/2008 Dan Klein UC Berkeley Many slides over the course adapted

More information

6.034 Notes: Section 3.1

6.034 Notes: Section 3.1 6.034 Notes: Section 3.1 Slide 3.1.1 In this presentation, we'll take a look at the class of problems called Constraint Satisfaction Problems (CSPs). CSPs arise in many application areas: they can be used

More information

Assignment3 CS206 Intro to Data Structures Fall Part 1 (50 pts) due: October 13, :59pm Part 2 (150 pts) due: October 20, :59pm

Assignment3 CS206 Intro to Data Structures Fall Part 1 (50 pts) due: October 13, :59pm Part 2 (150 pts) due: October 20, :59pm Part 1 (50 pts) due: October 13, 2013 11:59pm Part 2 (150 pts) due: October 20, 2013 11:59pm Important Notes This assignment is to be done on your own. If you need help, see the instructor or TA. Please

More information