Characterizing the NP-PSPACE Gap in the Satisfiability Problem for Modal Logic∗
Joseph Y. Halpern Leandro Chaves Regoˆ † Computer Science Department Statistics Department Cornell University, U.S.A. Federal University of Pernambuco, Brazil e-mail: [email protected] e-mail: [email protected]
Abstract By way of contrast, we show that for all of the (infinitely many) modal logics L containing K5 (that is, every modal There has been a great deal of work on character- logic containing the axiom K—Kϕ ∧ K(ϕ ⇒ ψ) ⇒ Kψ— izing the complexity of the satisfiability and valid- and the negative introspection axiom, which has traditionally ity problem for modal logics. In particular, Ladner been called axiom 5), if a formula ϕ is consistent with L,then showed that the satisfiability problem for all logics |ϕ| K S4 S5 it is satisfiable in a Kripke structure of size linear in .Us- between and is PSPACE-hard, while for it ing this result and a characterization of the set of finite struc- is NP-complete. We show that it is negative intro- L K5 ¬Kp ⇒ K¬Kp tures consistent with a logic containing due to Nagle spection,theaxiom , that causes and Thomason 1985, we can show that the consistency (i.e., the gap: if we add this axiom to any modal logic L K S4 satisfiability) problem for is NP-complete. Thus, roughly between and , then the satisfiability problem speaking, adding negative introspection to any logic between becomes NP-complete. Indeed, the satisfiability K and S4 lowers the complexity from PSPACE-hard to NP- problem is NP-complete for any modal logic that complete. includes the negative introspection axiom. The fact that the consistency problem for specific modal logics containing K5 is NP-complete has been observed be- 1 Introduction fore. As we said, Ladner already proved it for S5; an easy There has been a great deal of work on characterizing the modification (see [Fagin et al., 1995]) gives the result for complexity of the satisfiability and validity problem for KD45 and K45.1 That the negative introspection axiom modal logics (see [Halpern and Moses, 1992; Ladner, 1977; plays a significant role has also been observed before; indeed, Spaan, 1993; Vardi, 1989] for some examples). In particular, Nagle 1981 shows that every formula ϕ consistent with a nor- Ladner 1977 showed that the validity (and satisfiability) prob- mal modal logic2 L containing K5 has a finite model (indeed, lem for every modal logic between K and S4 is PSPACE- a model exponential in |ϕ|) and using that, shows that the hard; and is PSPACE-complete for the modal logics K, T, provability problem for every logic L between K and S5 is and S4. He also showed that the satisfiability problem for S5 decidable; Nagle and Thomason 1985 extend Nagle’s result is NP-complete. to all logics containing K5 not just normal logics. Despite What causes the gap between NP and PSPACE here? We all this prior work and the fact that our result follows from show that, in a precise sense, it is the negative introspection a relatively straightforward combination of results of Nagle axiom: ¬Kϕ ⇒ K¬Kϕ. It easily follows from Ladner’s and Thomason and Ladner’s techniques for proving that the proof of PSPACE-hardness that for any modal logic L be- consistency problem for S5 is NP-complete, our result seems tween K and S4, there exists a family of formulas ϕn,all to be new, and is somewhat surprising (at least to us!). consistent with L such that such that |ϕn| = O(n) but the smallest Kripke structure satisfying ϕ has at least 2n states The rest of the paper is organized as follows. In the next (where |ϕ| is the length of ϕ viewed as a string of symbols). section, we review standard notions from modal logic and the key results of Nagle and Thomason 1985 that we use. In Sec- ∗ This work was supported in part by NSF under grants CTC- tion 3, we prove the main result of the paper. We discuss 0208535, ITR-0325453, and IIS-0534064, by ONR under grants related work in Section 4. N00014-00-1-03-41 and N00014-01-10-511, and by the DoD Multi- disciplinary University Research Initiative (MURI) program admin- istered by the ONR under grant N00014-01-1-0795. The second au- thor was also supported in part by a scholarship from the Brazilian Government through the Conselho Nacional de Desenvolvimento 1Nguyen 2005 also claims the result for K5, referencing Ladner. Cient´ıfico e Tecnol´ogico (CNPq). While the result is certainly true for K5, it is not immediate from †Most of this work was done while the author was at the Ladner’s argument. School of Electrical and Computer Engineering at Cornell Univer- 2A modal logic is normal if it satisfies the generalization rule sity, U.S.A. RN: from ϕ infer Kϕ.
IJCAI-07 2306 2 Modal Logic: A Brief Review Modal logics are typically characterized by axiom systems. Consider the following axioms and inference rules, all of We briefly review basic modal logic, introducing the notation which have been well-studied in the literature [Blackburn et used in the statement and proof of our result. The syntax of al., 2001; Chellas, 1980; Fagin et al., 1995]. (We use the tra- the modal logic is as follows: formulas are formed by start- Φ={p,q,...} ditional names for the axioms and rules of inference here.) ing with a set of primitive propositions, and These are actually axiom schemes and inference schemes;we then closing off under conjunction (∧), negation (¬), and the K consider all instances of these schemes. modal operator K. Call the resulting language L1 (Φ).(We often omit the Φ if it is clear from context or does not play a Prop. All tautologies of propositional calculus ϕ∨ψ ϕ ⇒ ψ significant role.) As usual, we define and as ab- K. (Kϕ ∧ K(ϕ ⇒ ψ)) ⇒ Kψ (Distribution Axiom) breviations of ¬(¬ϕ ∧¬ψ) and ¬ϕ ∨ ψ, respectively. The in- tended interpretation of Kϕ varies depending on the context. T. Kϕ ⇒ ϕ (Knowledge Axiom) It typically has been interpreted as knowledge, as belief, or as 4. Kϕ ⇒ KKϕ (Positive Introspection Axiom) necessity. Under the epistemic interpretation, Kϕ is read as “the agent knows ϕ”; under the necessity interpretation, Kϕ 5. ¬Kϕ ⇒ K¬Kϕ (Negative Introspection Axiom) ϕ can be read “ is necessarily true”. D. ¬K(false) (Consistency Axiom) The standard approach to giving semantics to formulas in K ϕ ϕ ⇒ ψ ψ L1 (Φ) is by means of Kripke structures. A tuple F =(S, K) MP. From and infer (Modus Ponens) is a (Kripke) frame if S is a set of states, and K is a binary RN. From ϕ infer Kϕ (Knowledge Generalization) relation on S.Asituation is a pair (F, s),whereF =(S, K) is a frame and s ∈ S. A tuple M =(S, K,π) is a Kripke The standard modal logics are characterized by some sub- structure (over Φ) if (S, K) is a frame and π : S × Φ → set of the axioms above. All are taken to include Prop, MP, {true, false} is an interpretation (on S) that determines and RN; they are then named by the other axioms. For exam- K5 which primitive propositions are true at each state. Intu- ple, consists of all the formulas that are provable using itively, (s, t) ∈Kif, in state s, state t is considered pos- Prop, K, 5, MP, and RN; we can similarly define other sys- KD45 KT5 KT sible (by the agent, if we are thinking of K as representing tems such as or . has traditionally been T KT4 S4 KT45 an agent’s knowledge or belief). For convenience, we define called ; has traditionally been called ;and S5 K(s)={t :(s, t) ∈K}. has traditionally been called . L Depending on the desired interpretation of the formula For the purposes of this paper, we take a modal logic Kϕ, a number of conditions may be imposed on the binary to be any collection of formulas that contains all instances relation K. K is reflexive if for all s ∈ S, (s, s) ∈K;itis of Prop and is closed under modus ponens (MP) and substitu- ϕ L p transitive if for all s, t, u ∈ S,if(s, t) ∈Kand (t, u) ∈K, tion, so that if is a formula in and is a primitive proposi- ϕ[p/ψ] ∈ L ϕ[p/ψ] then (s, u) ∈K;itisserial if for all s ∈ S there exists t ∈ S tion, then ,where is the result of replacing p ϕ ψ such that (s, t) ∈K;itisEuclidean iff for all s, t, u ∈ S,if all instances of in by . A logic is normal if it contains (s, t) ∈Kand (s, u) ∈Kthen (t, u) ∈K. We use the super- all instances of the axiom K and is closed under the inference scripts r, e, t and s to indicate that the K relation is restricted rule RN. In terms of this notation, Ladner 1977 showed that L K S4 to being reflexive, Euclidean, transitive, and serial, respec- if is a normal modal logic between and (since we tively. Thus, for example, Srt is the class of all situations are identifying a modal logic with a set of formulas here, that K ⊆ L ⊆ S4 ϕ ∈ L where the K relation is reflexive and transitive. just means that ), then determining if We write (M,s) |= ϕ if ϕ is true at state s in the Kripke is PSPACE-hard. (Of course, if we think of a modal logic as M being characterized by an axiom system, then ϕ ∈ L iff ϕ is structure . The truth relation is defined inductively as fol- L ϕ lows: provable from the axioms characterizing .) We say that is consistent with L if ¬ϕ/∈ L. Since consistency is just the (M,s) |= p,forp ∈ Φ,ifπ(s, p)=true dual of provability, it follows from Ladner’s result that testing (M,s) |= ¬ϕ if (M,s) |= ϕ consistency is PSPACE-hard for every normal logic between K and S4. Ladner’s proof actually shows more: the proof (M,s) |= ϕ ∧ ψ (M,s) |= ϕ (M,s) |= ψ if and holds without change for non-normal logics, and it shows that (M,s) |= Kϕ if (M,t) |= ϕ for all t ∈K(s) some formulas consistent with logics between K and S4 are satisfiable only in large models. More precisely, it shows the Aformulaϕ is said to be satisfiable in Kripke structure following: M if there exists s ∈ S such that (M,s) |= ϕ; ϕ is said to be valid in M, written M |= ϕ,if(M,s) |= ϕ for all Theorem 2.1: [Ladner, 1977] s ∈ S N . A formula is satisfiable (resp., valid) in a class of (a) Checking consistency is PSPACE complete for every Kripke structures if it is satisfiable in some Kripke structure logic between K and S4 (even non-normal logics). in N (resp., valid in all Kripke structures in N ). There are analogous definitions for situations. A Kripke structure M = (b) For every logic L between K and S4, there exists a fam- L (S, K,π) is based on a frame F =(S , K ) if S = S and ily of formulas ϕn , n =1, 2, 3,..., such that (i) for all L K = K ϕ (F, s) n, ϕn is consistent with L, (ii) there exists a constant d . The formula is valid in situation , written L (F, s) |= ϕ F =(S, K) s ∈ S (M,s) |= ϕ such that |ϕn |≤dn, (iii) the smallest Kripke structure ,where and ,if for n all Kripke structure M based on F . that satisfies ϕ has at least 2 states.
IJCAI-07 2307 There is a well-known correspondence between properties That is, if ϕ is satisfiable at all, it is satisfiable in a situation of the K relation and axioms: reflexivity corresponds to T, with a number of states that is linear in |ϕ|. transitivity corresponds to 4, the Euclidean property corre- One more observation made by Nagle and Thomason will sponds to 5, and the serial property corresponds to D. This be important in the sequel. correspondence is made precise in the following well-known theorem (see, for example, [Fagin et al., 1995]). Definition 2.4 : A p-morphism (short for pseudo- epimorphism) from situation ((S , K ),s ) to situation Theorem 2.2: Let C be a (possibly empty) subset of {T, 4, 5, ((S, K),s) is a function f : S → S such that } C {r, t, e, s} D and let be the corresponding subset of .Then • f(s )=s; {Prop, K, MP, RN}∪Cis a sound and complete axiomatiza- K C 3 • (s ,s ) ∈K (f(s ),f(s )) ∈K tion of the language L1 (Φ) with respect to S (Φ). if 1 2 ,then 1 2 ; L • (f(s ),s ) ∈K s ∈ S Given a modal logic L,letS consist of all situations if 1 3 , then there exists some 2 such (s ,s ) ∈K f(s )=s (F, s) such that ϕ ∈ L implies that (F, s) |= ϕ. An imme- that 1 2 and 2 3. diate consequence of Theorem 2.2 is that Se, the situations where the K relation is Euclidean, is a subset of SK5. Nagle and Thomason 1985 provide a useful semantic char- This notion of p-morphism of situations is a variant of stan- acterization of all logics that contain K5. We review the rele- dard notions of p-morphism of frames and structures [Black- ] vant details here. Consider all the finite situations ((S, K),s) burn et al., 2001 . It is well known that if there is a p- such that either morphism from one structure to another, then the two struc- tures satisfy the same formulas. An analogous result, which 1. S is the disjoint union of S1, S2,and{s} and K = is proved in the full paper, holds for situations. ({s}×S1) ∪ ((S1 ∪ S2) × (S1 ∪ S2)),whereS2 = ∅ if (F ,s ) S1 = ∅;or Theorem 2.5: If there is a p-morphism from situation to (F, s), then for every modal logic L,if(F ,s ) ∈SL then K = S × S L 2. . (F, s) ∈S . Using (a slight variant of) Nagle and Thomason’s nota- S m ≥ 1 n ≥ 0 (m, n)=(0, 0) Now consider a partial order on pairs of numbers, so that tion, let m,n, with and or , (m, n) ≤ (m ,n ) iff m ≤ m and n ≤ n . Nagle and denote all situations of the first type where |S1| = m and Thomason observed that if (F, s) ∈Sm,n, (F ,s) ∈Sm,n , |S2| = n,andletSm,−1 denote all situations of the second (1, −1) ≤ (m, n) ≤ (m ,n ) |S| = m and , then there is an obvi- type where . (The reason for taking -1 to be the ous p-morphism from (F ,s ) to (F, s):ifF =(S, K), second subscript for situations of the second type will be- S = S1 ∪ S2, F =(S , K ), S = S1 ∪ S2 (where Si and come clearer below.) It is immediate that all situations in Si for i =1, 2 are as in the definition of Sm,n), then define Sm,n for fixed m and n are isomorphic—they differ only in f : S → S so that f(s )=s, f maps S1 onto S1, and, if the names assigned to states. Thus, the same formulas are S2 = ∅,thenf maps S2 onto S2;otherwise,f maps S2 to valid in any two situations in Sm,n. Moreover, it is easy to S1 arbitrarily. The following result (which motivates the sub- check that the K relation in each of the situations above in script −1 in Sm,−1) is immediate from this observation and Euclidean, so each of these situations is in SK5.Itiswell K5 Theorem 2.5. known that the situations in Sm,−1 are all in S and the sit- KD45 Sm,−1 ∪Sm,0 S S5 Theorem 2.6: If (F, s) ∈Sm,n, (F ,s) ∈Sm,n , and uations in are all in . In fact, (resp., KD45) is sound and complete with respect to the situations (1, −1) ≤ (m, n) ≤ (m ,n), then for every modal logic L (F ,s ) ∈TL (F, s) ∈TL in Sm,−1 (resp., Sm,−1 ∪Sm,0). Nagle and Thomason show ,if then . L that much more is true. Let T =(∪{Sm,n : m ≥ 1,n ≥ −1 or (m, n)=(0, 0)}) ∩SL. 3 The Main Results Theorem 2.3: [Nagle and Thomason, 1985] For every logic We can now state our key technical result. L K5 L containing , is sound and complete with respect to Theorem 3.1: If L is a modal logic containing K5 and ¬ϕ/∈ T L the situations in . L, then there exist m, n such that m + n<|ϕ|, a situation L The key result of this paper shows that if a formula ϕ is (F, s) ∈S ∩Sm,n, and structure M based on F such that consistent with a logic L containing K5, then there exists (M,s) |= ϕ. m, n M =(S, K,π) s ∈ S ,aKripkestructure , and a state Proof: By Theorem 2.3, if ¬ϕ/∈ L, there is a situation ((S, K),s) ∈S S ⊆TL m + n<|ϕ| L such that m,n, m,n ,and . (F ,s0) ∈T such that (F ,s0) |= ¬ϕ. Thus, there exists a Kripke structure M based on F such that (M ,s0) |= ϕ. 3We remark that soundness and completeness is usually stated C Suppose that F ∈Sm,n .Ifm + n < |ϕ|, we are done, so with respect to the appropriate class M of structures, rather than C suppose that m + n ≥|ϕ|. Note that this means m ≥ 1. the class S of situations. However, the same proof applies without S C S C We now construct a a situation (F, s) ∈Sm.n such that change to show completeness with respect to , and using (1, −1) ≤ (m, n) ≤ (m ,n ) m + n<|ϕ| (M,s) |= ϕ allows us to relate this result to our later results. While for normal , ,and logics it suffices to consider only validity with respect to structures, for some Kripke structure based on F . This gives the desired for non-normal logics, we need to consider validity with respect to result. The construction of M is similar in spirit to Ladner’s situations. 1977 proof of the analogous result for the case of S5.
IJCAI-07 2308 L Let C1 be the set of subformulas of ϕ of the form Kψ such Say that (m, n) is a maximal index of T if m ≥ 1, L L that (M ,s0) |= ¬Kψ,andletC2 be the set of subformulas Sm,n ⊆T , and it is not the case that Sm,n ⊆T for some of ϕ of the form Kψ such that KKψ is a subformula of ϕ and (m ,n ) with (m, n) < (m ,n ). It is easy to see that T L can (M ,s0) |= ¬KKψ ∧ Kψ. (We remark that it is not hard to have at most finitely many maximal indices. Indeed, if (m, n) show that if K is either reflexive or transitive, then C2 = ∅.) is a maximal index, then there can be at most m + n − 1 max- Suppose that M =(S , K ,π ). For each formula imal indices, for if (m ,n) is another maximal index, then C1 m