Bounded treewidth as a key to tractability of knowledge representation and reasoning

Georg Gottlob, Reinhard Pichler, Fang Wei
2010 Artificial Intelligence  
Several forms of reasoning in AI -like abduction, closed world reasoning, circumscription, and disjunctive logic programming -are well known to be intractable. In fact, many of the relevant problems are on the second or third level of the polynomial hierarchy. In this paper, we show how the notion of treewidth can be fruitfully applied to this area. In particular, we show that all these problems become tractable (actually, even solvable in linear time), if the treewidth of the involved formulae
more » ... or programs is bounded by some constant. Clearly, these theoretical tractability results as such do not immediately yield feasible algorithms. However, we have recently established a new method based on monadic datalog which allowed us to design an efficient algorithm for a related problem in the database area. In this work, we exploit the monadic datalog approach to construct new algorithms for logic-based abduction. A tree decomposition T of this structure is given in Fig. 1 . Note that the maximal size of the bags in T is 3. Hence, the tree-width is at most 2. On the other hand, it is easy to check that the tree-width of T cannot be smaller than 2. In order to see this, we consider the ground atoms pos(x 1 , c 1 ), neg(x 2 , c 1 ) pos(x 2 , c 3 ), neg(x 4 , c 3 ) pos(x 4 , c 2 ), and neg(x 1 , c 2 ) in A as (undirected) edges of a graph. Clearly, these edges form a cycle. However, as we have recalled above, only forests are the simple loop-free graphs of treewidth at most 1. This tree decomposition is, therefore, optimal and we have tw In [30] , it was shown that any tree decomposition can be transformed into the following normal form in linear time: Definition 2.2. Let A be a structure with tree decomposition T = T , (A t ) t∈T of width w. We call T normalized if T is a rooted tree and conditions 1-4 are fulfilled: (1) All bags consist of pairwise distinct elements a 0 , . . . , a k with 0 k w. (2) Every internal node t ∈ T has either one or two child nodes. (3) If a node t has one child node t , then the bag A t is obtained from A t either by removing one element or by introducing a new element. (4) If a node t has two child nodes then these child nodes have identical bags as t. Example 2.3. Recall the tree decomposition T from Fig. 1 . Clearly, T is not normalized in the above sense. However, in can be easily transformed into a normalized tree decomposition T , see Fig. 2 . Let A be a τ -structure with τ = {R 1 , . . . , R K } and domain A and let w 1 denote the treewidth. Then we define the extended signature τ td as This MSO-formula expresses the following equivalence: F is true in X if and only if every clause of F is true in X . This in turn is the case if and only if every clause contains a positive occurrence of a variable z ∈ X or a negative occurrence of a variable z / ∈ X . 2 Clearly, Theorem 3.2 together with Courcelle's Theorem immediately yields the fixed-parameter tractability of the SAT problem w.r.t. the treewidth of the τ -structure A (with τ = {cl, var, pos, neg}) representing the propositional formula [15]. Actually, even if F is not in CNF, the property that X is a model of F can be expressed in terms of MSO: Theorem 3.3. Let F be a propositional formula with canonical CNF F and let F be given by a τ -structure A with τ = {var, cl , var , pos , neg }. Moreover, let X denote a set of the variables with X ⊆ Var(F ). Then the property that X is a model of F can be expressed by an MSO-formula -referred to as model (X, F ) -over the signature τ . Proof. We define the MSO-formula model (X, F ) as follows: The auxiliary formula Ext F (X, X ) means that X is an extension of the interpretation X to the variables in F . Moreover, the subformula model( X , F ) is precisely the CNF-evaluation from Theorem 3.2. 2 Finally, we also provide an MSO-formula expressing that F 1 | F 2 holds for two propositional formulae F 1 and F 2 . Theorem 3.4. Let F 1 , F 2 be propositional formulae with canonical CNFs F 1 , F 2 and let F 1 , F 2 be given by a τ -structure A with τ = {var i (.), cl i (.), var i (.), pos i (. , .), neg i (. , .) | 1 i 2}. Then the property that F 1 | F 2 holds can be expressed by means of an MSO-formula -referred to as implies(F 1 , F 2 ) -over the signature τ . Proof. We define the MSO-formula implies(F 1 , F 2 ) as follows: The subformulae model (X, F i ) with i ∈ {1, 2} are the MSO-formulae expressing the evaluation of propositional formulae F i according to Theorem 3.3. 2 Disjunctive logic programming A disjunctive logic program (DLP, for short) P is a set of DLP clauses a 1 ∨ · · · ∨ a n ← b 1 , . . . , b k , ¬b k+1 , . . . , ¬b m . Let I be an interpretation. Then the Gelfond-Lifschitz reduct P I of P w.r.t. I contains precisely the clauses a 1 ∨ · · · ∨ a n ← b 1 , . . . , b k ,
doi:10.1016/j.artint.2009.10.003 fatcat:jxcuzp4lnzejrg4oy3mcqrdxwa