Complexity of only knowing: the propositional case Riccardo Rosati Dipartimento di Informatica e Sistemistica Universita di Roma \La Sapienza" Via Salaria 113, 00198 Roma, Italy email:
[email protected] Abstract. We study the computational properties of the propositional fragment of Levesque's logic of only knowing. In particular, we show that the problem of reasoning with only knowing in the propositional case lies at the second level of the polynomial hierarchy. Thus, it is as hard as reasoning in the majority of propositional formalisms for nonmonotonic reasoning, like default logic, circumscription and autoepistemic logic, and it is easier than reasoning in propositional formalisms based on the minimal knowledge paradigm, which is strictly related to the notion of only knowing.
1 Introduction Research in the formalization of commonsense reasoning through epistemic logics [14,19,21,15], has pointed out the necessity of providing the systems (agents) with the ability of introspecting on their own knowledge and ignorance. To this aim, it is generally adopted an \epistemic closure assumption", which informally can be stated as follows: \the logical theory formalizing the agent is a complete speci cation of the knowledge of the agent". As a consequence, any fact that is not implied by such a theory is assumed to be not known by the agent1 . As shown in [15], this paradigm underlies the vast majority of the logical formalizations of nonmonotonic reasoning. Roughly speaking, there exist two dierent ways to embed such a principle into a logic: 1. by considering a nonmonotonic formalism, whose semantics implicitly realizes such a \closed" interpretation of the information representing the agent; 2. by representing the closure assumption explicitly in the framework of a monotonic logic, suitably extending its syntax and semantics. The rst approach has been pursued in the de nition of several modal formalizations of nonmonotonic reasoning, e.g. McDermott and Doyle's nonmonotonic modal logics [18], Halpern and Moses's logic of minimal epistemic states [6] and 1
The use of the notion of implication here may be misleading: more precisely, the closure assumption acts by \maximizing ignorance" (in a way that changes according to the dierent proposals) in each possible epistemic state of the agent.
Lifschitz's logic of minimal belief and negation as failure [17]. On the other hand, the second approach has been followed by Levesque [15] in the de nition of the logic of only knowing. The logic of only knowing is obtained by adding an \all-I-know" modal operator O to modal logic K45. Informally, such an interpretation of the O modality is obtained through a maximization of the set of successors of each world satisfying O-formulas. There is a strict similarity between the modality O and the semantics of nonmonotonic modal logics. As an example, let ' be a modal formula specifying the knowledge of the agent. In the logic of only knowing, satis ability of the formula O' in a world w requires maximization of the possible worlds connected to w and satisfying ', whereas an analogous kind of maximization is generally realized by the preference semantics of nonmonotonic modal logics, by choosing, among the models for ', only those models having a \maximal" set of possible worlds, where such a notion of maximality changes according to the dierent proposals. Hence, the logic of only knowing is a monotonic formalism, in which the modality O allows for an explicit representation of the epistemic closure assumption at the object level (i.e. in the language of the logic), whereas in nonmonotonic formalisms the closure assumption is a meta-level notion. More precisely, in Levesque's original proposal (which in the following will be denoted as OLK45 ) the modality O is interpreted in terms of only believing rather than only knowing. This is due to the usage of the modal system K45. Other studies [12] have proposed a slight variation of Levesque's logic, based on the system S5, thus obtaining an interpretation of O in terms of \genuine" only knowing. We will call OLS5 such an \S5-based" version of Levesque's system. The studies investigating the relationship between only knowing and nonmonotonic logics [1] have stressed the analogies between the two approaches from an epistemological viewpoint. An analogous analysis from the computational viewpoint is not known. Indeed, there exist several studies on the computational properties of nonmonotonic logics, in particular propositional nonmonotonic modal formalisms [5,4,18,20,3,2,23]. On the other hand, the computational properties of only knowing in the propositional case have not been thoroughly investigated. The only related studies appearing in the literature concern a fragment of OLK45 built upon a very restricted subclass of propositional formulas, for which satis ability is tractable [13], and a computational study of a framework in which only knowing is added to a formal model of limited reasoning [10,11]. Moreover, a lower bound for reasoning in OLK45 (2p ) is known, due to the fact that autoepistemic logic [19] can be embedded in polynomial time into OLK45. The goal of the present work is to give a computational characterization of only knowing in the propositional case. To this end, we exploit the similarity between this formalism and nonmonotonic modal logics in order to de ne a deduction method for only knowing.
The main result of the paper is the following: the problem of reasoning with only knowing in the propositional case lies at the second level of the polynomial hierarchy. More precisely, satis ability is a 2p -complete problem both in OLK45 and in OLS5 . Thus, reasoning with only knowing is as hard as reasoning in the majority of propositional formalisms for nonmonotonic reasoning, like autoepistemic logic, default logic, circumscription, and several McDermott and Doyle's logics. Also, reasoning with only knowing is easier (unless the polynomial hierarchy collapses) than reasoning in nonmonotonic modal formalisms based on the minimal knowledge paradigm [26], like Halpern and Moses's logic of minimal epistemic states [3], Lifschitz's logic MBNF [23] and the moderately grounded version of autoepistemic logic [4]. This last observation can be rephrased as follows: minimal knowledge is harder than only knowing. In the following, we rst brie y introduce modal logics with only knowing, in particular the systems OLK45 and OLS5 . Then, we de ne deduction methods for satis ability (validity) in the propositional fragments of OLK45 and OLS5 , which allow us to characterize the complexity of reasoning in these formalisms. Finally, we investigate the relationship between only knowing and the minimal knowledge paradigm.
2 Modal logics with only knowing In this section we brie y recall the formalization of only knowing in the propositional case (see [15] for further details). We use L to denote a xed propositional language with propositional connectives _; ^; :; ; and whose generic atoms are elements of an alphabet A of propositional symbols and the symbols true, false. A propositional valuation (also called world ) over L is a function that assigns a truth value to every atom of L. For each propositional valuation w, w(true) = TRUE and w(false) = FALSE. We use LO to denote the modal extension of L with the modalities K and O, and LK to denote the modal extension of L with the only modality K . Notice that, with respect to [15], we slightly change the language of the logic, using the modality K instead of B . Moreover, we are interested in nite theories, hence we restrict our attention to single formulas, since a nite theory corresponds to the conjunction of all the formulas contained in the theory. The semantics of a formula ' 2 LO is de ned in terms of satis ability in a structure (w; M ) where w is a propositional valuation (called initial world ) and M is a set of such valuations.
De nition 1. Let w be a propositional valuation on L, and let M be a set of such valuations. We say that a formula ' 2 LO is satis ed in (w; M ), and write (w; M ) j= ', i the following conditions hold: 1. if ' is a propositional symbol, then (w; M ) j= ' i w(') = TRUE; 2. if ' = :'1 , then (w; M ) j= ' i (w; M ) 6j= '1 ; 3. if ' = '1 ^ '2 , then (w; M ) j= ' i (w; M ) j= '1 and (w; M ) j= '2 ; 4. if ' = '1 _ '2 , then (w; M ) j= ' i (w; M ) j= '1 or (w; M ) j= '2 ;
5. if ' = '1 '2 , then (w; M ) j= ' i (w; M ) j= :'1 or (w; M ) j= '2 ; 6. if ' = K'1 , then (w; M ) j= ' i for every w 2 M , (w ; M ) j= '1 ; 7. if ' = O'1 , then (w; M ) j= ' i for every w , w 2 M i (w ; M ) j= '1 . In the following, Th(M ) denotes the set of formulas ' from LK such that, for each w 2 M , (w; M ) j= ', while ThK (M ) denotes the set of formulas K' such that ' 2 LK and, for each w 2 M , (w; M ) j= K'. Let M1 ; M2 be sets of propositional valuations. Then, M1 is equivalent to M2 i ThK (M1 ) = ThK (M2 ). De nition 2. A set of propositional valuations M is maximal i, for each set of propositional valuations M , if M is equivalent to M then M M . De nition 3. A formula ' 2 LO is OLK45-satis able i there exists a pair (w; M ) such that: 1. (w; M ) j= '; 2. M is a maximal set. We say that a formula ' 2 LO is OLK45 -valid i :' is not OLK45 -satis able. We also say that a formula ' 2 LO logically implies a formula 2 LO in OLK45 (and write ' j= ) i ' is OLK45 -valid. Notice that the above semantics strictly relates the logic OLK45 with modal logic K45, which is equivalent to OLK45 for the subset of formulas without occurrences of the operator O. In fact, there is a precise correspondence between the pairs (w; M ) used in the above de nition and K45 models. We recall that, with respect to the satis ability problem, a K45 model can be considered without loss of generality as a pair (w; M), where w is a world, M is a set of worlds (not necessarily non-empty), w is connected to all the worlds in M, the worlds in M are connected with each other (i.e. M is a cluster) and no world in M is connected to w. Thus, in the following we will refer to such pairs as K45 models. We now de ne satis ability in OLS5 . Basically, the dierence between OLK45 and OLS5 is that axiom schema T (i.e. K' ') is valid in OLS5 . De nition 4. We say that a formula ' 2 LO is OLS5-satis able i there exists a pair (w; M ) such that (w; M ) j= ' and w 2 M . We say that a formula ' 2 LO is OLS5 -valid i :' is not OLS5 -satis able. Moreover, ' j= i ' is OLS5 -valid. Informally, the interpretation of the O modality is obtained through the maximization of the set of successors of each world satisfying an O-formula. As pointed out e.g. in [12], the meaning of an O-formula O' such that ' is nonmodal is intuitive, whereas it is quite complicated to understand the semantics of an O-formula with nested modalities. Example 5. Suppose ' 2 L. Then, (w; M ) is a model for O' i M = fw : w j= 'g. Hence, the eect of pre xing ' with the modality O is that of maximizing the possible worlds in M , which contains all the interpretations consistent with '. Moreover, it is easy to see that, if ' is consistent (i.e. propositionally satis able), then O' is OLS5 -satis able. ut 0
0
0
OLK45
OLS5
0
0
0
0
0
Example 6. Suppose ' 2 L and ' is not a tautology. Then, the formula OK' is OLK45 -unsatis able. Again, suppose M = fw : w j= 'g. Since ' is not a tautology, there exists an interpretation w 62 M . Now, (w ; M ) j= K', since the evaluation of K' does not depend on the initial world. Hence, by De nition 1, if (for any w) (w; M ) j= O', then w must belong to M . But this implies that, for any w, (w; M ) 6j= K'. Hence, OK' is not OLK45-satis able. On the contrary, O(K' ^ ') is OLK45 -satis able, under the assumption that ' is consistent. Analogously, it can be shown that OK' is not OLS5 -satis able, which is rather counterintuitive, since schema T is valid in OLS5 , hence K' should not need to be \supported" as in O(K' ^ '). ut 0
0
0
3 A deduction method for OLK45 We rst brie y recall some basic notions from complexity theory (see [7] for further details). We denote as P the class of problems solvable in polynomial time by a deterministic Turing machine. The class NP contains all problems that can be solved by a nondeterministic Turing machine in polynomial time. The class coNP comprises all problems that are the complement of a problem in NP. A problem P1 is said to be NP-complete if it is in NP and for every problem P2 in NP, there is a polynomial-time reduction from P2 to P1 . If there is a polynomial-time reduction from an NP-complete problem P2 to a problem P1 , then P1 is said to be NP-hard. With a slight abuse of terminology, we call NPalgorithm a nondeterministic algorithm that runs in polynomial time. PA (NPA ) is the class of problems that are solved in polynomial time by deterministic (nondeterministic) Turing machines using an oracle for A (i.e. that solves in constant time any problem in A). Finally, the classes kp , kp and pk of the polynomial hierarchy are de ned by 0p = 0pp = p0 = P, and for k 0, p kp+1 = NPk , kp+1 = cokp+1 and pk+1 = Pk . We now present an algorithm for computing satis ability in OLK45 . The technique we employ is based on the use of partitions of modal subformulas of a modal theory, as in several methods for reasoning in nonmonotonic modal logics (e.g. [18,4,20,3]). Such partitions are used in these logics to provide a nite characterization of the epistemic states of the agent, which correspond to in nite modal theories. In fact, such partitions can also be used in order to provide a nite characterization of an S5 model. In particular, a partition satisfying certain properties is able to identify a particular S5 model M, by uniquely determining a non-modal theory (called the objective knowledge of M). M is then de ned as the set of all propositional interpretations satisfying such objective knowledge. Now, in order to check whether an O-formula O' is satis ed in a particular K45 model, we exploit the possibility of expressing the objective knowledge of the \S5 component" of the K45 model, which allows us to establish whether ' is \all that is known" in the S5 component of the model.
We rst introduce the following preliminary de nitions. We say that a propositional symbol p 2 A occurs objectively in 2 LO if there exists an occurrence of p in which is neither in the scope of a K nor in the scope of a O. De nition 7. Let 2 LO . We call propositional atoms of (and denote with PA( )) the set fp : p 2 A and p occurs objectively in g Moreover, we call modal atoms of (and denote with MA( )) the set fK' : K' or O' is a subformula of g [ fO' : O' is a subformula of g Finally, we call atoms of (and denote with A( )) the set A( ) = PA( ) [ MA( ) De nition 8. Let 2 LO and let P; N be sets of atoms such that P \ N = ; and A( ) n L P [ N A( ). We denote with jP;N the formula obtained from by substituting each occurrence in of a formula from P with true and each occurrence in of a formula from N with false, and simplifying whenever possible. Notice that only the subformulas which are not within the scope of a K or an O operator are replaced. Notice also that jP;N 2 L: informally, the pair P; N identi es a \guess" on the subformulas from , and jP;N represents the \objective knowledge" implied by under such a guess. Clearly, if P [ N = A( ), then jP;N = true or jP;N = false. Let (P; N ) be a partition of A( ). Then, we de ne the following symbols: Pp = P \ L Np = N \ L Pm = P n Pp Nm = N n N p P+ = 'jPm ;Nm
^
K' P 2
Roughly speaking, the propositional formula P + represents the objective knowledge implied by the guess P; N on the modal subformulas belonging to P . Example 9. Suppose = a ^ O(:a _ Kb). Then, A( ) = fa; O(:a _ Kb); K (:a _ Kb); Kbg One possible partition of A( ) is the following: P = fa; O(:a _ Kb); K (:a _ Kb)g N = fKbg Then, Pp = fag, Pm = fO(:a _ Kb); K (:a _ Kb)g, Np = ;, Nm = fKbg. ut Moreover, jP;N = true, and P + = (:a _ Kb)jPm ;Nm = :a _ false = :a.
De nition 10. We say that a K45 model (w; M ) induces the partition (P; N ) on A( ) i, for each atom a 2 A( ), (w; M ) j= a i a 2 P . Below we present the algorithm OLK45 -Sat for computing satis ability in OLK45. Algorithm OLK45-Sat( ) Input: formula 2 LO ; Output: true if is OLK45-satis able, false otherwise. begin if there exists partition (P; N ) of A( ) such that (a) ( jP;N = true) and (b1) ((P + is consistent) or (Nm \ LK = ;)) and (b2) ((P + is consistent) or (for each O' 2 Nm, 'jPm ;Nm is consistent)) and (c) (for each K' 2 Nm , P + 6` 'jPm ;Nm ) and (d) (for each O' 2 Pm , (K' 2 Pm ) and ('jPm ;Nm ` P + ) and (for each O 2 Nm , 6` 'jPm ;Nm jPm ;Nm )) then return true else return false end Informally, the above algorithm checks the existence of a partition of A( ) satisfying certain conditions. Intuitively, the partition must satisfy (condition (a)) and cannot be contradictory (conditions (b1) and (c)). Moreover, if a subformula O' is assumed to hold, that is, O' 2 P , then it is necessary to check whether the objective knowledge implied by the whole partition (and represented by P + ) coincides with the objective knowledge implied by ' under the guess on A( ) represented by P; N (i.e. 'jPm ;Nm ). Also, if a subformula O' is assumed to hold and another subformula O is assumed not to hold, then the objective knowledge implied by ' under the guess P; N cannot coincide with the objective knowledge implied by under the same guess; hence, 6` 'jPm ;Nm jPm ;Nm . Finally, if the objective knowledge implied by the whole partition is inconsistent (that is, P + is inconsistent), then all the subformulas O' which are assumed not to hold cannot imply inconsistent objective knowledge. This is checked in the algorithm by condition (b2). Example 11. Let us consider the formula and the partition P; N of A( ) as de ned in Example 9. As shown, jP;N = true, and P + = :a, hence P; N satis es conditions (a), (b1) and (b2) of the algorithm. Moreover, :a 6` b, hence P; N satis es condition (c). Finally, since K (:a _ Kb) 2 P and (:a _ Kb)jPm ;Nm = :a, then (:a _ Kb)jPm ;Nm ` P + . Hence, OLK45 -Sat( ) returns true. In fact, the partition P; N identi es a K45 model (w; M ) such that w(a) = TRUE, and M = fw : w j= :ag. It is easy to see that (w; M ) j= . ut
Correctness of the algorithm is established by the following theorem.
Theorem 12. Let 2 LO . Then, is OLK45-satis able i OLK45-Sat( )
returns true.
Proof. If part. Suppose OLK45-Sat( ) returns true. Then, there exists a partition (P; N ) of A( ) such that conditions (a), (b1), (b2), (c), (d), in the algorithm hold. Let (w; M ) be a K45 model where w and M satisfy the following conditions:
1. M = fw : w j= P + g 2. if p 2 Pp , then w(p) = TRUE 3. if p 2 Np , then w(p) = FALSE 0
0
and let (w; M ) be the K45 model such that 0
M = M n fw : w j= p g 0
0
0
0
where p is a propositional symbol not appearing in . Condition (b1) of the algorithm implies the existence of at least one world w satisfying the above conditions 2. and 3.. Now we prove that if there is an atom O' 2 P , then (w; M ) induces the partition (P; N ) on A( ), otherwise (w; M ) induces the partition (P; N ) on A( ). The proof is by induction on the modal depth of the modal atoms. The base case corresponds to a modal atom of the form K' with ' 2 L. If K' 2 P , then P + ` ', hence by construction both (w; M ) j= K' and (w; M ) j= K' hold. If K' 2 N , then by condition (c) P + 6` ', hence both (w; M ) 6j= K' and (w; M ) 6j= K' hold. The proof of the inductive step is divided according to the following two possibilities: 0
0
0
0
1. suppose there exists a modal atom O 2 P . There are four possible cases: (a) consider a modal atom K' 2 P . Then, P + ` 'jPm ;Nm . By the induction hypothesis each occurrence of a modal atom a in ' is such that a 2 P i (w; M ) j= a. Moreover, (w; M ) j= KP + by construction. Therefore, (w; M ) j= K'; (b) consider a modal atom K' 2 N . By the induction hypothesis each occurrence of a modal atom a in ' is such that a 2 P i (w; M ) j= a. Now, by condition (c) it follows that P + 6` 'jPm ;Nm , hence (w; M ) 6j= K'; (c) consider a modal atom O' 2 P . Condition (d) of the algorithm implies K' 2 P and 'jPm ;Nm ` P + , hence 'jPm ;Nm P + is a tautology. Now, since by the induction hypothesis each occurrence of a modal atom a in ' is such that a 2 P i (w; M ) j= a, it follows that (w; M ) j= O'; (d) consider a modal atom O' 2 N . By hypothesis there exists O 2 P , hence condition (d) in the algorithm implies that jPm ;Nm P + is a tautology and that 'jPm ;Nm jPm ;Nm is not a tautology. Hence, 'jPm ;Nm P + is not a tautology. Now suppose (w; M ) j= O'; since by the induction hypothesis each occurrence of a modal atom a in ' is such that a 2 P i (w; M ) j= a, and since M = fw : w j= P + g, it follows that 'jPm ;Nm P + is a tautology. Contradiction. Therefore, (w; M ) 6j= O'. 2. suppose there exist no modal atoms O 2 P . There are three possible cases:
(a) consider a modal atom K' 2 P . Then, P + ` 'jPm ;Nm . By the induction hypothesis each occurrence of a modal atom a in ' is such that a 2 P i (w; M ) j= a. Moreover, (w; M ) j= KP + by construction. Therefore, (w; M ) j= K'; (b) consider a modal atom K' 2 N . By the induction hypothesis each occurrence of a modal atom a in ' is such that a 2 P i (w; M ) j= a. Now, by condition (c) it follows that P + 6` 'jPm ;Nm , hence (w; M ) 6j= K'; (c) consider a modal atom K' 2 N . There are two possibilities: i. P + is consistent. In this case, M 6= ; and therefore (w; M ) 6j= O', since (w; M ) j= K :p and p does not appear in '; ii. P + is inconsistent. Hence, M = ; and M = M . Now, condition (b2) implies that 'jPm ;Nm is consistent, and by the induction hypothesis each occurrence of a modal atom a in ' is such that a 2 P i (w; M ) j= a, hence (w; M ) 6j= O'. 0
0
0
0
0
0
0
0
0
0
0
0
Consequently, either (w; M ) or (w; M ) induces (P; N ) on A( ), which, together with condition (a), implies that either (w; M ) j= or (w; M ) j= holds. Moreover, both M and M are maximal sets, since M is the maximal set of valuations satisfying KP + , and M is the maximal set of valuations satisfying K (P + ^ :p ). Hence, is OLK45-satis able. Only-If part. Suppose is OLK45 -satis able. Then, there exists a K45 model (w; M ) such that (w; M ) j= . Let (P; N ) be the partition induced by (w; M ) on A( ). Clearly, jP;N = true, hence condition (a) in the algorithm holds for (P; N ). Then, there are two possibilities: either M = ;, and therefore Nm \LK = ;, or M 6= ;, in which case the propositional formula P + must be consistent, since P + must hold in each world of M . Therefore condition (b1) in the algorithm holds for (P; N ). Then, it is easy to see that for each K' 2 N , it cannot be the case that P + ` 'jPm ;Nm , since K' 2 N implies that there exists a world w in M such that both P + and :'jPm ;Nm are true in w . Thus, condition (c) in the algorithm holds for (P; N ). Now, let O' 2 P . Then, (w; M ) j= O', hence from De nition 1 it follows that K' 2 P , which in turn implies 'jPm ;Nm 2 P + , hence P + ` 'jPm ;Nm . Moreover, De nition 1 implies that M = fw : (w ; M ) j= 'jPm ;Nm g, and since P + must hold in each world of M , it follows that 'jPm ;Nm ` P + . Now suppose there exists O 2 N ; then, since P; N is the partition induced by (w; M ), (w; M ) j= O' and (w; M ) 6j= O imply that 'jPm ;Nm jPm ;Nm is not a tautology. Therefore, condition (d) of the algorithm holds for (P; N ). Finally, suppose P + is inconsistent. Then, for each O' 2 N , it must be the case that 'jPm ;Nm is consistent, otherwise (w; M ) j= O', thus contradicting the hypothesis that P; N is the partition on A( ) induced by (w; M ). Hence, P; N satis es condition (b2) of the algorithm, consequently OLK45 -Sat( ) returns true. ut 0
0
0
0
0
0
0
0
0
Since A( ) has size polynomial with respect to the size of , the algorithm
OLK45-Sat, if considered as a nondeterministic procedure, is able to establish satis ability of a formula 2 LO with a number of calls to the NP-oracle for
propositional satis ability which is polynomial in the size of . Thus, we obtain an upper bound of 2p for the problem, as stated by the following lemma.
Lemma 13. Satis ability in OLK45 is in 2p.
As for the lower bound of the problem of satis ability in OLK45, we recall that reasoning in Moore's autoepistemic logic (AEL) [19] can be reduced to reasoning in OLK45. In particular, O' is OLK45 -satis able i there exists a stable expansion for ' in AEL, as stated by the following proposition2.
Proposition 14. [15, Theorem 3.9] Let 2 LK . Then, there exists a maximal set M and a valuation w such that (w; M ) j= O i there exists a stable expansion T for . Moreover, T = Th(M ).
Lemma 15. Satis ability in OLK45 is 2p-hard. Proof. Let 2 LK . By Proposition 14, O is OLK45-satis able i there exists a stable expansion for . And since the problem of establishing whether a formula 2 LK admits a stable expansion is 2p -hard [5, Theorem 4.3], this concludes the proof. ut The last two lemmas imply the following property.
Theorem 16. Satis ability in OLK45 is 2p-complete. The previous theorem implies that validity in OLK45 is 2p -complete, and that logical implication ' j= is 2p -complete as well (wrt the size of ' ^ ).
4 A deduction method for OLS5 We now turn our attention to the the problem of reasoning in OLS5 . Below we report the algorithm OLS5 -Sat for computing satis ability in OLS5 .
Algorithm OLS5-Sat( ) Input: formula 2 LO ; Output: true if is OLS5-satis able, false otherwise. begin if there exists partition (P; N ) of A( ) such that (a) (^ jP;N = true^) and (b) (( p) ^ ( :p) ^ P + is consistent) and p P p N (c) (for each K' 2 Nm , P + 6` 'jPm ;Nm ) and (d) (for each O' 2 Pm , (K' 2 Pm ) and 2
2
2
For the sake of simplicity we denote the modality of autoepistemic logic as K (instead of L).
('jPm ;Nm ` P + ) and (for each O 2 Nm , 6` 'jPm ;Nm jPm ;Nm ))
then return true else return false end
The above algorithm is very similar to the algorithm OLK45 -Sat. The main dierence lies in condition (b), which replaces conditions (b1) and (b2) of the algorithm OLK45 -Sat. Informally, in this case we have to look for a K45 model (w; M ) for with the further condition w 2 M . This condition is realized by condition (b) of the above algorithm. Moreover, due to the fact that w must belong to M , it cannot be the case that M is empty, hence conditions (b1) and (b2) of the algorithm OLK45-Sat are subsumed by the new formulation above. Example 17. Let us again consider the formula and the partition P; N of A( ) as de ned in Example 9. As shown, jP;N = true, hence P; N satis es condition (a) of the algorithm OLS5 -Sat. Also, in Example 11 we have shown that both condition (c) and condition (d) of the algorithm hold. Now,
(
^ p) ^ ( ^ :p) ^ P + = a ^ :a;
p P 2
p N 2
hence condition (b) of the algorithm is not satis ed. It is easy to see that the only other partition satisfying condition (a) of the algorithm is the following:
P = fa; O(:a _ Kb); K (:a _ Kb); Kbg N =; Now, P + = (:a _ true) ^ b = b, hence 0
0
0
(
^ p) ^ ( ^ :p) ^ P + = a ^ b;
p P 2
p N 2
therefore condition (b) is satis ed by P ; N . On the other hand, (:a_Kb)jPm ;Nm = :a _ true = true, and true 6` b, hence condition (d) is not satis ed by P ; N . Consequently, OLS5 -Sat( ) returns false. ut 0
0
0
0
Correctness of the algorithm is established by the following theorem.
Theorem 18. Let 2 LO . Then, is OLS5 -satis able i OLS5 -Sat( ) re-
turns true.
Proof. If part. The proof is analogous to the proof of Theorem 12. Suppose OLS5 -Sat( ) returns true. Then, there exists a partition (P; N ) of A( ) such that conditions (a), (b), (c), (d) in the algorithm hold. Let (w; M ) be a K45 model where w and M are de ned as follows:
1. M = fw : w j= P + g 2. w j= P + 3. if p 2 Pp , then w(p) = TRUE 4. if p 2 Np , then w(p) = FALSE 5. w(p ) = FALSE where p is a propositional symbol not appearing in , and let (w; M ) be the K45 model such that M = M n fw : w j= p g Condition (b) of the algorithm implies the existence of at least one world w satisfying the above conditions 2., 3., 4., 5.. Moreover, w 2 M and w 2 M . Now we prove that if there is a modal atom O' 2 P , then (w; M ) induces the partition (P; N ) on A( ), otherwise (w; M ) induces the partition (P; N ) on A( ). As in Theorem 12, the proof is by induction on the modal depth of the modal atoms. The proof of the base case is the same as in the proof of Theorem 12. The inductive case is proven as follows: 1. suppose there exists a modal atom O 2 P . There are four possible cases: (a) consider a modal atom K' 2 P . Then, P + ` 'jPm ;Nm . By the induction hypothesis each occurrence of a modal atom a in ' is such that a 2 P i (w; M ) j= a. Moreover, (w; M ) j= KP + by construction. Therefore, (w; M ) j= K'; (b) consider a modal atom K' 2 N . By the induction hypothesis each occurrence of a modal atom a in ' is such that a 2 P i (w; M ) j= a. Now, by condition (c) it follows that P + 6` 'jPm ;Nm , hence (w; M ) 6j= K'; (c) consider a modal atom O' 2 P . Condition (d) of the algorithm implies K' 2 P and 'jPm ;Nm ` P + , hence 'jPm ;Nm P + is a tautology. Now, since by the induction hypothesis each occurrence of a modal atom a in ' is such that a 2 P i (w; M ) j= a, it follows that (w; M ) j= O'; (d) consider a modal atom O' 2 N . By hypothesis there exists O 2 P , hence condition (d) in the algorithm implies that jPm ;Nm P + is a tautology and that 'jPm ;Nm jPm ;Nm is not a tautology. Hence, 'jPm ;Nm P + is not a tautology. Now suppose (w; M ) j= O'; since by the induction hypothesis each occurrence of a modal atom a in ' is such that a 2 P i (w; M ) j= a, and since M = fw : w j= P + g, it follows that 'jPm ;Nm P + is a tautology. Contradiction. Therefore, (w; M ) 6j= O'. 2. suppose there exist no modal atoms O 2 P . There are three possible cases: (a) consider a modal atom K' 2 P . Then, P + ` 'jPm ;Nm . By the induction hypothesis each occurrence of a modal atom a in ' is such that a 2 P i (w; M ) j= a. Moreover, (w; M ) j= KP + by construction. Therefore, (w; M ) j= K'; (b) consider a modal atom K' 2 N . By the induction hypothesis each occurrence of a modal atom a in ' is such that a 2 P i (w; M ) j= a. Now, by condition (c) it follows that P + 6` 'jPm ;Nm , hence (w; M ) 6j= K'; (c) consider a modal atom K' 2 N . Then, since by condition (b) P + is consistent, M 6= ; and therefore (w; M ) 6j= O', since (w; M ) j= K :p and p does not appear in '. 0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
Consequently, either (w; M ) or (w; M ) induces (P; N ) on A( ), which, together with condition (a), implies that either (w; M ) j= or (w; M ) j= holds. Moreover, both M and M are maximal sets, since M is the maximal set of valuations satisfying KP + , and M is the maximal set of valuations satisfying K (P + ^ :p ). Hence, is OLS5 -satis able. Only-If part. Suppose is OLS5 -satis able. Then, there exists a K45 model (w; M ) such that (w; M ) j= and w 2 M . Let (P; N ) be the partition induced by (w; M ) on A( ). Clearly, jP;N = true, therefore P; N satis es condition (a). Moreover, since w 2 M , M is non-empty, and since P + must hold in each world of M , it follows that P + holds in w, which implies that the formula 0
0
0
0
0
(
^ p) ^ ( ^ :p) ^ P +
p P
p N
2
2
is satis ed in w. Consequently, P; N satis es condition (b). Then, it is easy to see that for each K' 2 N , it cannot be the case that P + ` 'jPm ;Nm , since K' 2 N implies that there exists a world w in M such that both P + and :'jPm ;Nm are true in w . Thus, condition (c) in the algorithm holds for (P; N ). Finally, let O' 2 P . Then, (w; M ) j= O', hence from De nition 1 it follows that K' 2 P , which in turn implies 'jPm ;Nm 2 P + , hence P + ` 'jPm ;Nm . Moreover, De nition 1 implies that M = fw : (w ; M ) j= 'jPm ;Nm g, and since P + must hold in each world of M , it follows that 'jPm ;Nm ` P + . Now suppose there exists O 2 N ; then, since P; N is the partition induced by (w; M ), (w; M ) j= O' and (w; M ) 6j= O imply that 'jPm ;Nm jPm ;Nm is not a tautology. Therefore, condition (d) of the algorithm holds for (P; N ), hence OLS5 -Sat( ) returns true. 0
0
0
0
ut
Again, the algorithm OLS5 -Sat, if considered as a nondeterministic procedure, computes satis ability of a formula 2 LO with a number of calls to the NP-oracle for propositional satis ability polynomial in the size of , which gives us an upper bound of 2p for the problem. Hence, the following property holds.
Lemma 19. Satis ability in OLS5 is in 2p.
As for the lower bound of the problem of satis ability in OLS5 , we prove the following lemma.
Lemma 20. Satis ability in OLS5 is 2p-hard. Proof. Let ' 2 LK . We rst prove that O' is OLS5 -satis able i there exists a consistent stable expansion for '. Suppose O' is OLS5 -satis able. Then, there exists a K45 model (w; M ) such that w 2 M and (w; M ) j= O'. Hence, M is non-
empty, which implies that Th(M ) is a consistent theory. Hence, by Proposition 14, Th(M ) is a consistent stable expansion for '. Conversely, suppose there exists a consistent stable expansion for '. Then, by Proposition 14 there exists a non-empty set M such that (w; M ) j= O' (we recall that if M = ;, then Th(M ) is inconsistent). Now, let w be any interpretation in M . Since the valuation of 0
O' does not depend on the initial world, it follows that (w ; M ) j= O', hence O' is OLS5 -satis able. Now, since the problem of establishing whether a formula ' 2 LK admits a consistent stable expansion is 2p -hard [5, Theorem 4.4], this concludes the 0
proof.
ut
The last two lemmas imply the following property.
Theorem 21. Satis ability in OLS5 is 2p-complete. The previous theorem implies that both validity and logical implication in
OLS5 are 2p -complete.
5 Only knowing vs. minimal knowledge We nally compare, from the computational viewpoint, only knowing with the minimal knowledge paradigm. since these two notions are strictly related. The principle of minimal knowledge is a very general notion which can be phrased as follows: \In each possible epistemic state, the agent has minimal objective knowledge, that is, the agent has as much ignorance as possible about the current state of the world". As a consequence, there cannot exist an epistemic state whose objective knowledge is implied by the objective knowledge of another epistemic state. There exist several proposals in the literature based on the minimal knowledge paradigm, e.g. [6,9,16,17,8,27,24]. Among them, the rst attempt in this direction is due to Halpern and Moses [6] and is the most similar to the notion of only knowing. Informally, Halpern and Moses apply minimal knowledge to modal logic S5: thus, they de ne a preference semantics [26] over S5, by considering as intended models of a modal theory only those S5 models satisfying in which the set of possible worlds is maximized. Hence, in this case the notion of maximization lies at the semantic level. Recently, it has been proven [3] that reasoning in Halpern and Moses's version of S5 (also known as ground nonmonotonic modal logic S5G ) lies at the third level of the polynomial hierarchy. In particular, skeptical entailment in S5G is a 3p -complete problem. Moreover, many other formalisms based on the minimal knowledge paradigm share the same computational properties of S5G [4,3,23]. Hence, we can conclude that, unless the polynomial hierarchy collapses, minimal knowledge is harder than only knowing. In particular, S5G cannot be \polynomially embedded" into OLK45 (or OLS5 ). This is a surprising result, since the logic of only knowing is generally considered a very expressive formalism, due to its ability of explicitly expressing minimization of knowledge, which is considered a very powerful feature. In fact, it can be shown that the logic S5G does not have a \greater" expressive power than OLK45 (or OLS5 ), in the sense that any theory in S5G can be faithfully (although not polynomially) embedded into OLK45 . The reason why
S 5G (and more generally all logics based on S5G ) is computationally harder than OLK45 (and all major propositional nonmonotonic formalisms) is that S5G allows for a more \succint" representation of information. See [22] for a more detailed study of this topic.
Acknowledgments This research has been partially supported by MURST, \Tecniche di Ragionamento Non Monotono". The author gratefully thanks the anonymous referees for the careful reading of the paper, and for suggesting several improvements concerning both the presentation and the technical content of the paper.
References 1. J. Chen. The logic of only knowing as a uni ed framework for non-monotonic reasoning. Fundamenta Informaticae, 21, 205{220, 1994. 2. F. M. Donini, F. Massacci, D. Nardi, and R. Rosati. A uniform tableau method for nonmonotonic modal logics. In J.J. Alferes, L.M. Pereira and E. Orlowska, editors, Logics in Arti cial Intelligence { Proceedings of JELIA'96, number 1126 in Lecture Notes In Arti cial Intelligence, pages 87{103. Springer-Verlag, 1996. 3. F. M. Donini, D. Nardi, and R. Rosati. Ground nonmonotonic modal logics. Technical Report 19.95, DIS, Universita di Roma \La Sapienza", 1995. To appear in Journal of Logic and Computation. 4. T. Eiter and G. Gottlob. Reasoning with parsimonious and moderately grounded expansions. Fundamenta Informaticae, 17(1,2):31{54, 1992. 5. G. Gottlob. Complexity results for nonmonotonic logics. Journal of Logic and Computation, 2:397{425, 1992. 6. J. Y. Halpern and Y. Moses. Towards a theory of knowledge and ignorance: Preliminary report. Technical Report CD-TR 92/34, IBM, 1985. 7. D. S. Johnson. A catalog of complexity classes. In J. van Leeuwen, editor, Handbook of Theoretical Computer Science, volume A, chapter 2. Elsevier Science Publishers B. V. (North Holland), 1990. 8. M. Kaminski. Embedding a default system into nonmonotonic modal logics. Fundamenta Informaticae, 14:345{354, 1991. 9. K. Konolige. On the relation between default and autoepistemic logic. Arti cial Intelligence Journal, 35:343{382, 1988. 10. G. Lakemeyer. Limited reasoning in rst-order knowledge bases. Arti cial Intelligence Journal 71:1{42, 1994. 11. G. Lakemeyer. Limited reasoning in rst-order knowledge bases with full introspection. Arti cial Intelligence Journal 84:209{255, 1996. 12. G. Lakemeyer. Only knowing in the situation calculus. In Proceedings of the Fifth International Conference on the Principles of Knowledge Representation and Reasoning (KR-96), pages 14{25. Morgan Kaufmann, Los Altos, 1996. 13. G. Lakemeyer and H.J. Levesque. A tractable knowledge representation service with full introspection. In Proceedings of the Second International Conference on Theoretical Aspects of Reasoning About Knowledge (TARK-88), pages 145{159, 1988.
14. H.J. Levesque. Foundations of a functional approach to knowledge representation. Arti cial Intelligence Journal, 23:155{212, 1984. 15. H.J. Levesque. All I know: a study in autoepistemic logic. Arti cial Intelligence Journal, 42:263{310, 1990. 16. V. Lifschitz. Nonmonotonic databases and epistemic queries. In Proceedings of the Twelfth International Joint Conference on Arti cial Intelligence (IJCAI-91), pages 381{386, Sydney, 1991. 17. V. Lifschitz. Minimal belief and negation as failure. Arti cial Intelligence Journal, 70:53{72, 1994. 18. W. Marek and M. Truszczynski. Nonmonotonic Logics { Context-Dependent Reasoning. Springer-Verlag, 1993. 19. R. C. Moore. Semantical considerations on nonmonotonic logic. Arti cial Intelligence Journal, 25:75{94, 1985. 20. I. Niemela. On the decidability and complexity of autoepistemic reasoning. Fundamenta Informaticae, 17(1,2):117{156, 1992. 21. R. Reiter. What should a database know? Journal of Logic Programming, 14:127{ 153, 1990. 22. R. Rosati. Minimal knowledge states in nonmonotonic modal logics. Proceedings of the Second Conference on Advances in Modal Logic (AiML-96), CSLI, Stanford, USA, 1997. 23. R. Rosati. Reasoning with minimal belief and negation as failure: algorithms and complexity. To appear in Proceedings of AAAI-97. 24. G. Schwarz. Bounding introspection in nonmonotonic logics. In Proceedings of the Third International Conference on the Principles of Knowledge Representation and Reasoning (KR-92), pages 581{590. Morgan Kaufmann, Los Altos, 1992. 25. G. Schwarz and M. Truszczynski. Minimal knowledge problem: a new approach. Arti cial Intelligence Journal, 67:113{141, 1994. 26. Y. Shoham. Nonmonotonic logics: Meaning and utility. In Proceedings of the Tenth International Joint Conference on Arti cial Intelligence (IJCAI-87), pages 388{392, 1987. 27. M. Truszczynski. Modal nonmonotonic logic with restricted application of the negation as failure to prove rule. Fundamenta Informaticae, 14:355{366, 1991.