Information Processing Letters 79 (2001) 243–247
Lower bounds on the complexity of recognizing SAT by Turing machines Rahul Santhanam Department of Computer Science, University of Chicago, Chicago, IL 60637, USA Received 12 June 2000; received in revised form 1 October 2000 Communicated by S.E. Hambrusch
Keywords: Computational complexity; Time-space tradeoffs; Satisfiability
1. Introduction There has been some interest recently in establishing lower bounds on the simultaneous time and space required for the acceptance of the SAT (satisfiability) language by a Turing machine. Since SAT is NP-complete, proving super-polynomial lower bounds on time would imply P = NP. The first non-trivial time-space tradeoffs for SAT were proved by Fortnow in 1997 [4]. Here, “non-trivial” refers to any result that implies SAT cannot be solved simultaneously in linear time and constant space on a deterministic Turing machine. In fact, Fortnow proved that SAT cannot be solved in quasilinear time and space O(n1−ε ) on a deterministic Turing machine, for any ε > 0. Recently, Lipton and Viglas [9], using techniques of Kannan [7], have improved the tradeoffs in [4]. For example, they show that SAT cannot be accepted by √ 2−ε ) and polylogarithmic a TM that uses time O(n space, for any constant ε > 0. Both Fortnow [4] and Lipton and Viglas [9] use general methods such as diagonalization and translation. These methods work
E-mail address:
[email protected] (R. Santhanam).
for RAMs as well as Turing machines. The results proved by them for Turing machines (and, in some cases, improvements on the results) can be obtained more simply by considering the implications of previously known time-space tradeoffs for specific languages proved using combinatorial methods. Such methods have been used extensively to prove lower bounds or tradeoffs on restricted models — for example, in [3,6,8,11]. An early result of this kind was the tradeoff proved by Cobham [1] for the acceptance of languages on Turing machines. Cobham’s examples worked only for Turing machines with one read/write head per tape; tradeoffs for Turing machines with multiple (but constant) read/write heads per tape were proved by Duris and Galil [2]. We use the results of [1,2], and construct efficient reductions to SAT from the languages considered by them, to prove new time-space tradeoffs for the recognition of SAT by Turing machines. Specifically, we prove that if SAT is accepted by a non-deterministic Turing machine using time T (n) and space S(n), then T (n)S(n) = (n2 / polylog).
0020-0190/01/$ – see front matter 2001 Elsevier Science B.V. All rights reserved. PII: S 0 0 2 0 - 0 1 9 0 ( 0 0 ) 0 0 2 2 7 - 1
244
R. Santhanam / Information Processing Letters 79 (2001) 243–247
2. Preliminaries The main model we consider is the model of Turing machines with a fixed number of tapes and one read–write head per tape. DTIME(T (n)) is the class of languages accepted by deterministic Turing machines (DTMs) in time T (n) and NTIME(T (n)) is the class of languages accepted by non-deterministic Turing machines (NTMs) in time T (n). DSPACE(S(n)) and NSPACE(S(n)) are the corresponding classes for space. DTISP(T (n), S(n)) is the class of languages accepted by deterministic Turing machines with time bounded by T (n) and space bounded by S(n) and NTISP(T (n), S(n)) is the analogous class for NTMs. We also consider the more general model of Turing machines with a fixed number of tapes and a fixed number of read/write heads per tape. Time and space classes for such machines are denoted by the prefix MH- (for multihead) applied to the notations for classes in the conventional model. Thus, MH-NTISP(T (n), S(n)) is the class of languages accepted by non-deterministic multi-head Turing machines simultaneously in time T (n) and space S(n). SAT is the satisfiability language, i.e., the language of satisfiable formulae in propositional logic when coded by some efficient means. CNF-SAT is the language of satisfiable formulae which consist of an AND of OR-clauses and 2-SAT is the restriction of CNF-SAT to the case when each clause has at most two literals. We use the term “polylog” to refer to a function f (n) such that f belongs to O(logk (n)) for some k > 0. “Quasilinear” refers to a function f (n), that is, O(n logk (n)) for some k > 0.
3. Relationships between complexity classes In [1], Cobham proves a time-space tradeoff for the acceptance of the language {wcwR | w ∈ {0, 1}∗ } on deterministic TMs. The same bound holds for the language (1) L = wwR | w ∈ {0, 1}∗ . If T (n) and S(n) are the time and space required by any DTM accepting L, he proves that T (n)S(n) = (n2 ). Clearly L can be accepted by a 2-tape DTM
running in linear time, that just copies the contents of its input tape backwards onto its second tape and then compares the contents of the two tapes symbol by symbol. Thus, L ∈ DTIME(n). But, by the time-space tradeoff due to [1], L ∈ / DTISP(n1+δ , n1−ε ), where δ + ε < 1. Therefore, we have Proposition 3.1. ∀δ, ε > 0
such that δ + ε < 1,
DTIME(n) DTISP(n1+δ , n1−ε ). Also, by the same time-space tradeoff, we have Proposition 3.2. ∀ε > 0,
DTIME(n) DTISP(n2−ε , polylog).
Since DTIME(n) ⊆ NTIME(n), one of the results of Lipton and Viglas [9] follows: Proposition 3.3. ∀ε > 0,
NTIME(n) DTISP(n2−ε , polylog).
The interesting point here is that the methods used in [1] to establish the tradeoffs work just as well for NTMs. Thus, the language L described above does not belong to NTISP(n2−ε , polylog). This implies the stronger results in Lemmas 1.1 and 1.2. The aforementioned results hold only for Turing machines that have one read/write head per tape. But similar results can also be proved for Turing machines that have k read/write heads per tape, where k is some fixed constant. These follow from space-time tradeoffs proved by Duris and Galil in [2]. They proved their tradeoffs for the language L = x1 a n1 x2 a n2 . . . xf a nf for some g > 0, xi ∈ {0, 1}g for i = 1, 2, . . . , f, n1 , n2 , . . . , nf > 0, a = 0, 1 and ⊕ xi = 0g ,
(2)
where ⊕ represents the sum mod 2 of the strings xi . Any DTM or NTM accepting L in time T (n) and space S(n) has to satisfy T 2 (n)S(n) = (n3 ).
R. Santhanam / Information Processing Letters 79 (2001) 243–247
From the Duris–Galil tradeoffs, we obtain Proposition 3.4. ∀ε > 0, MH-DTIME(n) MH-NTISP(n3/2−ε , polylog). Proposition 3.5. ∀ε, δ > 0
such that 2ε + δ < 1,
MH-DTIME(n) MH-NTISP(n1+ε , n1−δ ). In the next section, we use efficient reductions from L to SAT to prove stronger time-space tradeoffs for SAT than are presented in [4,9].
4. Lower bounds on SAT We prove the following theorem: Theorem 4.1. If SAT is accepted by a non-deterministic TM that uses time T (n) and space S(n), then there exists a constant d such that T (n)S(n) = (n2 /(log n)d ). Proof. Assume there exists a Turing machine M using time T (n) and space S(n) that accepts SAT, such that T (n)S(n) is not (n2 /(log n)d ), where d is a constant determined later in the proof. Note that our purpose here is to prove a tradeoff of the form T (n)S(n) = (n2 / polylog(n)) — we are not interested in finding the best possible value of d. We will show how to construct a TM M that accepts L using time T (n) and space S (n) such that T (n)S (n) is not (n2 ). Essentially, we shall construct a reduction from the language L to SAT, which uses a very small amount of space and takes time quasilinear in the input length. M will work as follows: given an input w, it will construct a formula φ that expresses the fact that w is a palindrome. Let |w| be n and the ith character of w be denoted by wi . φ, which is the formula corresponding to w, will have n literals x1 , . . . , xn and 2n clauses. Each literal corresponds to one bit of w. Each of the first n clauses of φ checks for the value of one bit of w, i.e., the kth clause is xk if wk is 1 and xk if wk is 0. The other n clauses check for whether w is a palindrome
245
or not; each of the conditions wk = wn−k is checked by two clauses, xk ∨ xn−k and xk ∨ xn−k . Clearly, w is a palindrome iff φ is a satisfiable formula. M cannot store all of φ on one of its tapes, since we do not wish to use more than logarithmic space for the reduction. Therefore, we compute bits of φ as and when needed and store only the location of φ that is being accessed by the simulated input head. Since φ has length O(n log(n)), we need only logarithmic space to store a location in φ. The difficulty is that computing the j th bit of φ should take time polylog(n) rather than n, achieved by a naive simulation. Let x1 , x2 , . . . , xn be coded in {0, 1}∗ so that, given a number i in binary, the ith bit of φ is easily computable. By “easily computable” here, we mean that the computation time is bounded by some polynomial in the length of i; i.e., polylogarithmic in n. Clearly, given n, the last n clauses of φ are independent of w and hence any bit in the coding of these clauses can be easily computed. But the first n clauses depend on w and hence we need to refer to w to determine the bits in them. The trick is to maintain the input head at the “current” bit of the input, i.e., the bit that is being referred to by the algorithm for SAT. When the position of the simulated machine’s input head changes, the input head of M should also move accordingly. The whole simulation can be described as follows: when the computation of M on w starts, the input tape head points to the first symbol of w and all other tapes are blank. To decide whether it should accept w or not, M simulates M on φ. The problem, as we mentioned before, is that φ cannot be stored on any of the tapes since it is too long. Therefore, on one of its tapes, M maintains a counter which records the position on the input tape that M is currently reading. Depending on whether M moves its input tape head left or right, this counter is decremented or incremented. Also, to simulate a step of M, the input bit that it is reading should be known. This can be computed quickly from the value of the counter when the bit is in the second half of φ. For the case when the input bit is in the first half of φ, we move the input tape head of M so that the bit it reads corresponds to the clause being read by M . Since neighboring bits in w correspond to neighboring clauses in φ, this ensures that each step of M can be simulated with polylog steps of M .
246
R. Santhanam / Information Processing Letters 79 (2001) 243–247
If the algorithm M for accepting SAT takes time T (n) and space S(n), M takes time O T (n log(n)) logd (n) (for some fixed constant d) and space O(S(n)) if S(n) = (log(n)). This implies that there is an algorithm for L such that the product of time and space required is not (n2 ), by the assumption on M at the beginning of the proof. This is a contradiction, therefore the stated time-space tradeoff holds for SAT. ✷ Theorem 4.2. If SAT is accepted by a non-deterministic multihead Turing machine that takes time T (n) and space S(n), then there exists a constant d such that T 2 (n)S(n) = (n3 /(log n)d ). Proof. Analogous to the proof of Theorem 4.1, except that we use the Duris–Galil tradeoff instead of the Cobham tradeoff. The conditions for acceptance of a word in L can also be coded into a formula, in the same way as we do for L. ✷ 5. Remarks and conclusion The results proved in this paper are strengthenings of the results in [4,9] for Turing machines. The results in [4,9] hold for SAT but our results hold for 2-SAT also, since the formulae we reduce the language L to belong to 2-SAT. Therefore our techniques are less promising if the ultimate goal is to prove that SAT does not belong to P, since it is known that 2-SAT belongs to P. Moreover we obtain the same lower bounds for NTMs as for DTMs, which indicates that our techniques may not be useful in separating nondeterministic time and deterministic time. Since Fortnow [4] and Lipton and Viglas [9] use machine-theoretic techniques, the results in them hold for RAMs also (although the details of the proof for RAMs are not completely straightforward). Unfortunately, no good time-space tradeoffs are known for the acceptance of a language by a RAM. It is easy to construct a RAM that accepts the language L in quasilinear time and logarithmic space. Thus our techniques do not generalize to RAMs. Lipton and Viglas state that their results hold for RAMs, but the simulations of RAMs by Turing machines that they cite do not seem to imply the claim. We do believe that their claim is
valid and that their proof for Turing machines can be adapted to RAMs. We hope our work stimulates further research in proving lower bounds for the acceptance time for specific languages on Turing machines combinatorially. Though Cobham’s tradeoffs are optimal in the sense that we can find Turing machines accepting L in time T (n) and space S(n) with T (n)S(n) = O(n2 ), this is not known to be true for the language L . Note that no combinatorial proof of a superlinear lower bound on the acceptance time of an explicit language by a Turing machine is known. Though it is known by the time hierarchy theorem that there are languages not in DTIME(n), these languages are constructed using diagonalization, and there are no natural examples of these languages known. Proving a superlinear (say n1+ε , ε > 0) lower bound on time required for acceptance of a language using methods analogous to those of Cobham and of Duris and Galil would be a breakthrough result. The methods of [1,2] work for non-deterministic Turing machines also, but it is highly unlikely that this will be true of such a proof. This is because “naturally” defined languages such as L and L also have natural reductions to SAT, using small amounts of space and time, as we have described. But SAT ∈ NTIME(n polylog(n)), a result that follows from the facts that SAT can be accepted in n polylog(n) time on an NRAM and that there is an efficient simulation of NRAMs by NTMs, due to Gurevich and Shelah [5]. Thus a “natural” language, i.e., a language such that efficient reductions from it to SAT exist, will also be in NTIME(n polylog(n)). Proving a superlinear lower bound on the acceptance time for such a language on a DTM would imply the major result that NTIME(f (n)) = DTIME(f (n)) for all f (n) “between” n and the function that lower bounds the acceptance time. Thus far, the best result of this kind that is known is that DTIME(n) = NTIME(n), which is due to Paul, Pippenger, Szemeredi and Trotter [10].
Acknowledgements I thank my advisor, Janos Simon, for his constant support and encouragement. The ideas in this paper originated from discussions with him. I thank Dieter
R. Santhanam / Information Processing Letters 79 (2001) 243–247
Van Melkebeek for his helpful comments and suggestions. References [1] A. Cobham, The recognition problem for the set of perfect squares, in: Conference Record of the Seventh Annual Symposium on Switching and Automata Theory, IEEE, New York, 1966, pp. 78–87. [2] P. Duris, Z. Galil, A time-space tradeoff for language recognition, Math. Systems Theory 17 (1) (1984) 3–12. [3] J. Edmonds, C. Poon, A nearly optimal time-space lower bound for directed st-connectivity on the NNJAG model, in: Proceedings of the 27th ACM Symposium on the Theory of Computing, ACM, New York, 1995, pp. 147–156. [4] L. Fortnow, Nondeterministic polynomial time versus nondeterministic logarithmic space: Time-space tradeoffs for satisfiability, in: Proceedings of the 12th Annual IEEE Conference on Computational Complexity, IEEE, Los Alamitos, 1997, pp. 52–60.
247
[5] Y. Gurevich, S. Shelah, Nearly-linear time, in: Proceedings, Logic at Botik’89, Lecture Notes in Comput. Sci., Vol. 363, Springer, Berlin, 1989, pp. 108–118. [6] Y. Gurevich, S. Shelah, Nondeterministic linear-time tasks may require substantially nonlinear deterministic time in the case of sublinear work space, J. ACM 37 (3) (1990) 674–687. [7] R. Kannan, Towards separating nondeterminism from determinism, Math. Systems Theory 17 (1) (1984) 29–45. [8] M. Karchmer, Two time-space tradeoffs for element distinctness, Theoret. Comput. Sci. 47 (3) (1986) 237–246. [9] R. Lipton, A. Viglas, On the complexity of SAT, in: Proceedings of the 40th Annual Symposium on Foundations of Computer Science, IEEE, New York, 1999, pp. 459–464. [10] W. Paul, N. Pippenger, E. Szemeredi, W. Trotter, On determinism versus non-determinism and related problems, in: Proceedings of the 24th IEEE Symposium on Foundations of Computer Science, IEEE, New York, 1983, pp. 429–438. [11] A. Yao, Near-optimal time-space tradeoff for element distinctness, SIAM J. Comput. 23 (5) (1994) 966–975.