UNIVERSITY OF ILLINOIS LIBRARY AT URBANA-CHAMPAIGN 00 for each lost k" ™ ln »««»i ■» «"*«'pMnary"l ( ^ "■*•**« of book. ? FfSP When renewing by oh**- ■ ***** due df t r h0ne * w "*new due date below L162 £ 9 lt,r 70- 97? UIUCDCS-R-79-978 UILU-ENG 79 1726 Complete Problems in the First-Order Predicate Calculus by David A. Plaisted July 1979 Complete Problems in the First-Order Predicate Calculus by David A. Plaisted Department of Computer Science University of Illinois Digital Computer Lab Urbana, IL 61801 Key words: Satisfiability, predicate calculus, resolution theorem proving, complete problems, computational complexity. This research was partially supported by the National Science Foundation under grant MCS 77-22830. Digitized by the Internet Archive in 2013 http://archive.org/details/completeproblems978plai Abstract We present a survey of recent results concerning the complexity of deciding if a first-order predicate calculus formula in Schonfinkel- Bernays form is satisfiable. We also present results concerning the complexity of deciding the existence of resolution proofs of restricted depths and sizes. In this way we obtain natural problems complete for the classes NP, PSPACE, deterministic and nondeterministic exponential time, and deterministic and nondeterministic double exponential time. The results concerning the existence of resolution proofs of restricted depths and sizes seem to have implications for the design and analysis of resolution theorem proving programs. This report mainly lists results without proof. -2- We exhibit problems involving first-order predicate calculus formulae that are complete for the classes NLOGSPACE, P, NP, PSPACE, DEXPTIME, and NEXPTIME. These problems involve satisfiability and resolution proof depth for formulae in Schdnfinkel-Bernays form (that is, the prefix is of the form 33..3W-- \/) • Most of these results are obtained by direct encoding of Turing computations, using an economical representation of the successor relation on integers. Some of the results are obtained by different methods. This work was originally motivated by a problem involving relational databases posed by Yehoshua Sagiv. It was then realized that this problem was related to recent work of Harry Lewis [ 7] involving decidable subclasses of the first-order predicate calculus. We improved his lower bound of nondeterministic time c for the Schonfinkel-Bernays class to nondeterministic time c n/ ogn . Harry Lewis has improved this to c 11 since then [8]. We have also obtained some results which precisely characterize the difficulty of resolution theorem proving in the first- order predicate calculus (not restricted to Schonfinkel-Bernays form). In particular, one of these results states that it is complete for nondeterministic exponential time to decide if a depth d proof of a particular clause exists from a set W of clauses, if d is given in unary notation. Other results deal with the special case in which W consists entirely of 2-literal clauses. Also, it is NP-complete to determine if a size d resolution proof of a particular clause from a set W of propositional clauses exists, if d is given in unary. (This last result is not just a restatement of the NP-completeness of satisfiability of Boolean expressions.) -3- Some of the results for deterministic and nondeterministic exponential time completeness are obtained by encoding Turing computations using statements of the form "The symbol on tape square i at time j is s" or "The Turing machine at time j is at tape square i in state t." In this way we encode deterministic and nondeterministic Turing com- putations. Some of the results for polynomial space completeness are obtained by letting P(x Q , x, , ..., x ) represent a configuration XqX-,...x of a Turing machine, specifying the tape symbols, the current state, and the position of the read-write head. By cycling the variables to the left or the right, we get the effect of moving the read-write head to the right or to the left. We first consider formulae of the classical first-order predicate calculus without the identity sign or function signs. In particular, an atom is a predicate symbol followed by a list of variables (and constants). A formula is said to be in Schbnfinkel-Bernays form if it is of the form 3y,3y 2 - . .3y Vx,Vx 2 . . -Vx A where A is a well- formed expression containing atoms and the Boolean connectives a( conjunction), v(disjunction) , =(equivalence) , and l(negation). We will assume that formulae in Schb'nfinkel-Bernays form have no free variables. The Skolemized (or functional) form of A is obtained by replacing each y. in A by a distinct constant symbol, and by deleting all quantifiers. For example, 3y-|3y 2 Vx.|\/x 2 (P(x.. , y,)vP(x„, yj) is a formula in Schbnfinkel-Bernays form and its Skolemized form is P(x,, c-, ) v P(x 2 , c 2 ). It is known that a formula F is satisfiable iff its Skolemized form is satisfiable. We will assume all formulae -4- are in Skolemized form. Also, we will assume all formulae are expressed as a conjunction of disjunctions of literals, where a literal L is an expression of the form B or "IB for some atom B. In the former case, we say L is a positive literal, and in the latter case we say L is a negative literal. A clause is a disjunction of literals. Hence we will assume all formulae are conjunctions of clauses. We say a problem S is complete for a class of problems if S is in the class and if e^ery other problem in the class can be reduced to it by deterministic log tape reductions. Completeness for DLOGSPACE is defined by using deterministic one-way log-tape reductions as defined in [2]. Note that a problem may be complete for DEXPTIME under this definition even if it can be solved in time c n/logn . We now give a list of results. We need more terminology. A Horn clause is a clause that has at most one positive literal. The positive literal of a Horn clause (if it exists) is called the consequent of the clause. The negative literals (if they exist) are called antecedents of the clause. We say two literals LI and L2 are unifiable if they have a common instance. For Schbnfinkel-Bernays form formulae, this means that there is some literal L that can be obtained from both LI and L2 by replacing variables by constant symbols. Thus P(x, c) and P(d, x) are unifiable because they have P(d, c) as a common instance. However, P(x, x) and P(c, d) are not unifiable, nor are P(c, x) and P(d, y). We use the notation #P < c to indicate that the number of predicate symbols in a class of formulae is bounded. Also, HORN indicates that all formulae in the class are conjunctions of HORN clauses. The notation DET means that no two consequents of distinct Horn clauses in the formula are unifiable, and that ewery (universally quantified) variable appearing in an antecedent must also appear in the consequent. -5- In particular, a clause having no consequent must have no universally quantified variables. This condition implies the determinism of a certain kind of program expressed as a set of Horn clauses, hence the notation DET. Furthermore, 3LIT means that all formulae are conjunctions of clauses having three or fewer literals, and 2LIT means all clauses have two or fewer literals. The symbol E refers to the number of existential quantifiers and U refers to the number of universal quantifiers. With each combination of conditions, we indicate which deterministic or nondeterministic time or tape complexity class the problem is complete for. Note that E = 2 is equivalent to E >_ 2 for completeness results. 1. Complexity of the satisfiability problem for formulae in Schonfinkel-Bernays form with E = 2 and #P <_ c. Restrictions Complete for a) 3LIT NEXPTIME b) 3LIT HORN DEXPTIME c) 3LIT HORN, DET PSPACE d) 2LIT PSPACE e) 2LIT HORN PSPACE f) 2LIT HORN, DET PSPACE Comments: la) is due to Lewis [7]. Id) can be obtained from the function generation problem of Kozen [6], but we have a simple direct reduction from Turing computations. 2. Complexity of the satisfiability problem for formulae in Schonfinkel-Bernays form with E = 2 and #P ^1 > ^? > •••> X J = 'M^f)) 1' •••» n ' *1 ' *2 ' " Thus we can count up or down by one by going from PI to P2 or from P2 to PI. Also, the formula A(P1, P2) consists of 2-literal Horn clauses and satisfies the restriction DET. The formula A(P1 , P2) makes use of auxiliary predicate symbols Ql and Q2, and is constructed as follows: Let c be a constant symbol other than and 1. Let x be an abbreviation for x,, x 2> ..., x , y be an abbreviation for y, , y 2 , ..., y , and z be an abbreviation for z-, , z ? , ..., z . 1. Pl(y, x) d Ql(c, y, x) Insert c 2. Ql(z, 1, x) 3 Q1(0, z, x) Change rightmost ones to zeroes 3. Ql(z, 0, x) ^ Q2(l, z, x) Change rightmost zero to one 4. Q2(z, 1, x) ^ Q2(l, z, x) Cycle past remaining bits 5. Q2(z, 0, x) 3 Q2(0, z, x) Cycle past remaining bits 6. Q2(z, c, x) d P2(z, x) Delete c Example: Pl(Ollx) 3 Ql(cOllx) 3 Ql(OcOlx) 3 Ql(OOcOx) 3 02(100cx) 3 P2(100x). 13- We represent Wl D W2 by ~IW1 v W2 and thereby obtain 2-literal Horn clauses. The above six clauses add one in going from PI to P2. There are six similar clauses which subtract one in going from P2 to PI. The formula A(P1, P2) is the conjunction of these twelve clauses. Note that adding one always requires a constant number of steps, regardless of the number involved. This is useful for establishing bounds concerning sizes of resolution proofs. Possible Extensions These results can be extended in many ways. Some gaps in the above tables of results still exist. We might look at other classes of formulae, also. For example, we can consider the satisfiability problem for formulae in which the connectives are chosen from some set other than a, v, ~1. This is related to recent work of Lewis [9]. We can consider other decidable subclasses of the first-order predicate calculus investigated by Lewis [7] with the HORN, 2LIT, or DET restrictions added. Also, we can consider decidable subclasses of the second order predicate calculus. We have shown an analogue of 3-satisfiability to be complete for nondeterministic exponential time. Are there analogues of other NP-complete problems (such as the clique problem) that are complete for nondeterministic exponential time? Many of our results are based on encodings of deterministic and nondeterministic Turing computations by predicate calculus formulae. Can parallel and alternating Turing computations also be modeled in this way? Lewis [7] has done some work along this line. Finally, we can look at inference rules other than resolution and determine the complexity of searching for proofs at restricted depths. ■14- References 1] Cook, S. A. The complexity of theorem proving procedures. Proc . 3 rd Annual ACM Symp . on Theory of Computing (1971) 151-158. 2] Hartmanis, J., Immerman, N. and Mahaney, S. One-way log tape reductions. Proc . 19th Annual Symp . on Found , of Computer Science (1978) 65-71. 3] Jones, N. D. , Lien, Y. E. and Laaser, W. T. New problems complete for nondeterministic log space. Math. Systems Theory 10 (1976) 1-18. 4] Jones, N. D. and Laaser, W. T. Complete problems for deterministic polynomial time. Theoretical Computer Science 3 (1976) 105-117. 5] Karp, R. M. Reducibility among combinatorial problems, in Miller, R. E. and Thatcher, J. W. (eds.), Complexity of Computer Computations (Plenum Press, New York, 1972) 85-103. 6] Kozen, Dexter. Lower bounds for natural proof systems. Proc . 18^ Annua l Symp. on Found , of Computer Science (1977) 254-266. 7] Lewis, Harry R. Complexity of solvable cases of the decision problem for the predicate calculus. Proc . 19th Annual Symp . on Found , of Computer Science (1978) 35-47. 8] Lewis, Harry R. Personal communication. 9] Lewis, H. R. Satisfiability problems for propositional calculi, unpublished manuscript (1978). X.L. 10] Paterson, M. S. and Wegman, M. N. Linear unifications. Proc . 8 Annual ACM Symp . on Theory of Computing (1976) 181-186. 11] Stockmeyer, L. J. and Meyer, A. R. Word problems requiring exponential time. Proc . 5th Annual ACM Symp . on Theory of Computing (1973) 1-9. BIBLIOGRAPHIC DATA SHEET 1. Report No. UIUCDCS-R-79-978 2. 3. Recipient's Accession No. 4. Title and Subt itlc Complete Problems in the First-Order Predicate Calculus 5- Report Date July 1979 6. 7. Author(sl . . - __ . David A. Plaisted 8. Performing Organization Rept. No. 9. Performing Organization Name and Address Department of Computer Science University of Illinois Urbana, IL 61801 10. Project/Task/Work Unit No. 11. Contract /Grant No. NSF MCS 77-22830 12. Sponsoring Organization Name and Address National Science Foundation Washington, D.C. 13. Type of Report & Period Covered 14. 15. Supplementary Notes 16. Abstracts We present a survey of recent results concerning the complexity of deciding if a first-order predicate calculus formula in Schonfinkel-Bernays form is satisfiable. We also present results concerning the complexity of deciding the existence of resolution proofs of restricted depths and sizes. In this way we obtain natural problems complete for the classes NP, PSPACE, deterministic and nondeterministic exponential time, and deterministic and nondeterministic double exponential time. The results concerning the existence of resolution proofs of restricted depths and sizes seem to have implications for the design and analysis of resolution theorem proving programs. This report mainly lists results without proof. 17. Key Words and Document Analysis. 17a. Descriptors Satisfiability, predicate calculus, resolution theorem proving, complete problems, comptuational complexity. 17b. Identifiers /Open-Ended Terms 17c. COSATI Field/Group 18. Availability Statement 19. Security Class (This Report) UNCLASSIFIED 21. No. of Pages 20. Security Class (This Page UNCLASSIFIED 22. Price FORM N TtS-35 I 10-70) USCOMM-DC 40329-P71 '•miKi FEB 2 1381