• No results found

Recognizing signature-bounded prime implicates

5.2 Signature-bounded prime implicates

5.2.3 Recognizing signature-bounded prime implicates

We know from Example 5.2.6 that L-prime implicates may not be standard prime implicates, which means that the Pspace-completeness result for standard prime implicate recognition is not much help to us. Indeed, it turns out that L-prime implicate recognition is considerably more difficult computationally than standard prime implicate recognition.We can show this task to be CoNExptime- hard:

Theorem 5.2.17.

L-prime implicate recognition is CoNExptime-hard.

Proof. The proof is via a reduction of the conservative extension decision problem for K = K1 formulae to the L-prime implicate recognition problem. We recall that a formula ϕ1 ∧ ϕ2 is a conservative extension of ϕ1 if and only if for every formula ψ with var(ψ) ⊆ var(ϕ1) we have ϕ1 ∧ ϕ2 |= ψ only if ϕ1 |= ψ. We will show that ϕ1 ∧ ϕ2 is a conservative extension of ϕ1 if and only if 31Nnf (ϕ1) is a var(ϕ1) ∪ {1}-prime implicate of 31(ϕ1 ∧ ϕ2). As the conservative extension

decision problem for K formulae was proven CoNExptime-complete in [GLWZ06], it follows that L-prime implicate recognition must be CoNExptime-hard.

For the first direction, let us suppose that ϕ1∧ ϕ2 is a conservative extension of ϕ1. It follows that ϕ1is a var(ϕ1)∪{1}-interpolant of ϕ1∧ϕ2. Using Lemma 2.6.10, we then find that 31ϕ1 is a var(ϕ1) ∪ {1}-interpolant of 31(ϕ1∧ ϕ2). That means that if λ is a clause such that sig(λ) ⊆ var(ϕ1) ∪ {1} and 31(ϕ1∧ ϕ2) |= λ |= 31ϕ1, we must also have 31ϕ1 |= λ. This means that the clause 31Nnf (ϕ1) ≡ 31ϕ1 must be a var(ϕ1) ∪ {1}-prime implicate of the formula 31(ϕ1∧ ϕ2).

For the other direction, suppose that 31Nnf(ϕ1) is a var(ϕ1)∪{1}-prime impli- cate of 31(ϕ1∧ϕ2). That means that for every clause λ with sig(λ) ⊆ var(ϕ1)∪{1} and 31(ϕ1 ∧ ϕ2) |= λ |= 31Nnf (ϕ1), we have 31Nnf (ϕ1) |= λ. In particular, if 31ψ is a clause with signature in var(ϕ1) ∪ {1} such that 31(ϕ1 ∧ ϕ2) |= 31ψ |= 31Nnf (ϕ1), then 31Nnf (ϕ1) |= 31ψ. It follows then from Theorem 2.3.1 and the fact that Nnf is equivalence- and signature-preserving (Theorem 2.4.2) that for every formula ψ which is implied by ϕ1∧ ϕ2 and with sig(ψ) ⊆ var(ϕ1) ∪ {1}, we have ϕ1 |= ψ, i.e. ϕ1 is a var(ϕ1) ∪ {1}-interpolant of ϕ1 ∧ ϕ2. It follows that ϕ1∧ ϕ2 is a conservative extension of ϕ1.

We now provide an Expspace upper bound. Our proof makes reference to the algorithm TestLangPI defined below:

Algorithm 5.1 TestLangPI

Input: a formula ϕ, a clause λ, and a signature L

Output: yes is λ is not an L-prime implicate of ϕ, and no otherwise (1) If Entails(ϕ, λ)=no or sig(λ) 6⊆ L, return yes.

(2) Guess some clause π of length at most 2|ϕ|∗ (2f(2|ϕ)| + 1) with signature in L. (3) If Entails(ϕ, π)=no or Entails(π, λ)=no, then return no.

(4) If Entails(λ, π)=no, return yes. Otherwise, return no.

Note: in Step 2, we let f be some function such that |LangInt(ψ, L)| ≤ 2f(|ψ|) on every input (ψ, L). The existence of such a function is guaranteed by Corollary 2.6.8.

Theorem 5.2.18.

L-prime implicate recognition is in Expspace.

Proof. We will show that the non-deterministic algorithm TestLangPI decides the complement of the L-prime implicate recognition problem, and moreover that

140 5.2. Signature-bounded prime implicates

it runs using only single exponential space. This is sufficient to prove the result since CoNExpspace=Expspace.

We start by showing the correctness of our procedure. First suppose that λ is not an L-prime implicate of ϕ. Then either λ is not an implicate of ϕ, or it does not have signature in L, or there is some L-prime implicate ζ of ϕ such that ζ |= λ 6|= ζ. In the first two cases, the algorithm will return yes in Step 1. In the third case, we proceed to Step 2 where we guess a clause of length at most 2|ϕ|∗ (2f(2|ϕ)|+ 1) and with signature in L. We know from the proof of Theorem 5.2.11 that every L-prime implicate of ϕ must be equivalent to some clause with signature in L and with length at most 2|ϕ|∗ (2f(2|ϕ)|+ 1). It follows then that in Step 2 we can choose the clause π so that π ≡ ζ, which means we will satisfy the tests in Step 3 and proceed on to Step 4. In this step, we test whether λ 6|= π. As we know that λ 6|= ζ and ζ ≡ π, we must also have λ 6|= π, so the algorithm will return yes in Step 5.

Next suppose that λ is an L-prime implicate of ϕ. Then the tests in Step 1 will not succeed, and we will go directly to Step 2, where we guess some clause π of length at most 2|ϕ|∗ (2f(2|ϕ)|+ 1) and with signature in L. If π does not satisfy the required conditions, then we will output no in Step 3. Otherwise, in Step 4, we will test whether λ 6|= π. Now since λ is an L-prime implicate of ϕ and π is a clause with signature in L such that ϕ |= π |= λ, it follows that λ |= π, so we will return no.

Now we consider the spatial complexity of TestLangPI. The first step runs in polynomial space in |ϕ| + |λ| by Theorem 2.5.7. The second step takes single- exponential space since we guess a clause of length at most 2|ϕ|∗ (2f(2|ϕ)|+ 1) (and f is assumed to be a polynomial function). Steps 3 and 4 also require at most single-exponential space since we are performing entailment tests on formulae with length at most single-exponentially larger than |ϕ| + |λ|.

The exact complexity L-prime implicate recognition is currently unknown, but we conjecture that the problem is CoNExptime-complete.

6

Prime Implicate Normal Form

In this chapter, we introduce a normal form for Kn formulae which is based upon the notion of prime implicate studied in the previous chapters. We investigate the properties of our normal form, showing in particular that entailment between formulae in prime implicate normal form can be carried out in quadratic time using a simple structural comparison algorithm. We also show that uniform interpolation is tractable for formulae in our normal form. Afterwards, we propose an algorithm for putting concepts into prime implicate normal form, and we investigate the spatial complexity of this transformation, showing there to be an at most double exponential blowup in formula size. At the end of the chapter, we compare our normal form to other normal forms previously proposed in the literature.

6.1

Motivation

As we mentioned in Chapter 1, knowledge compilation is a technique for deal- ing with the high complexity of reasoning which consists in a preliminary off-line phase in which a knowledge base is transformed into an equivalent base which al- lows for tractable reasoning, followed by a second online phase in which reasoning is performed on the compiled knowledge base. One well-known target language for knowledge compilation in propositional logic is prime implicate normal form, in which a formula is represented as the conjunction of its prime implicates. A natural idea would be to use our selected definition of prime implicate to define in an analogous manner a notion of prime implicate normal form for Kn formulae. Unfortunately, the normal form we obtain satisfies few of the nice properties of the propositional case. For instance, we find that entailment between two Kn formulae