Space Complexity vs. Query Complexity

  • Oded Lachish
  • Ilan Newman
  • Asaf Shapira
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4110)


Combinatorial property testing deals with the following relaxation of decision problems: Given a fixed property and an input x, one wants to decide whether x satisfies the property or is “far” from satisfying it. The main focus of property testing is in identifying large families of properties that can be tested with a certain number of queries to the input. Unfortunately, there are nearly no general results connecting standard complexity measures of languages with the hardness of testing them. In this paper we study the relation between the space complexity of a language and its query complexity. Our main result is that for any space complexity s(n)≤logn there is a language with space complexity O(s(n)) and query complexity 2\(^{\Omega({\it s}({\it n}))}\). We conjecture that this exponential lower bound is best possible, namely that the query complexity of a languages is at most exponential in its space complexity.

Our result has implications with respect to testing languages accepted by certain restricted machines. Alon et al. [FOCS 1999] have shown that any regular language is testable with a constant number of queries. It is well known that any language in space o(loglogn) is regular, thus implying that such languages can be so tested. It was previously known that there are languages in space O(logn) which are not testable with a constant number of queries and Newman [FOCS 2000] raised the question of closing the exponential gap between these two results. A special case of our main result resolves this problem as it implies that there is a language in space O(loglogn) that is not testable with a constant number of queries, thus showing that the o(loglogn) bound is best possible. It was also previously known that the class of testable properties cannot be extended to all context-free languages. We further show that one cannot even extend the family of testable languages to the class of languages accepted by single counter machines which is perhaps the weakest (uniform) computational model that is strictly stronger than finite automata.


Space Complexity Linear Code Regular Language Query Complexity Graph Property 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Alon, N., Krivelevich, M., Newman, I., Szegedy, M.: Regular languages are testable with a constant number of queries. SIAM J. on Computing 30, 1842–1862 (2001)MATHCrossRefMathSciNetGoogle Scholar
  2. 2.
    Alon, N., Shapira, A.: A characterization of the (natural) graph properties testable with one-sided error. In: Proc. of FOCS 2005, pp. 429–438 (2005)Google Scholar
  3. 3.
    Alon, N., Fischer, E., Newman, I., Shapira, A.: A combinatorial characterization of the testable graph properties: it’s all about regularity. In: Proc. of STOC 2006, pp. 251–260 (2006)Google Scholar
  4. 4.
    Ben-Sasson, E., Harsha, P., Raskhodnikova, S.: Some 3-CNF properties are hard to test. In: Proc. of STOC 2003, pp. 345–354 (2003)Google Scholar
  5. 5.
    Blum, M., Luby, M., Rubinfeld, R.: Self-testing/correcting with applications to numerical problems. JCSS 47, 549–595 (1993)MATHMathSciNetGoogle Scholar
  6. 6.
    Fischer, E.: The art of uninformed decisions: A primer to property testing. The Computational Complexity Column of The Bulletin of the European Association for Theoretical Computer Science 75, 97–126 (2001)MATHGoogle Scholar
  7. 7.
    Fischer, E., Newman, I., Sgall, J.: Functions that have read-twice constant width branching programs are not necessarily testable. Random Struct. and Alg. (in press)Google Scholar
  8. 8.
    Goldreich, O., Goldwasser, S., Ron, D.: Property testing and its connection to learning and approximation. JACM 45(4), 653–750 (1998)MATHCrossRefMathSciNetGoogle Scholar
  9. 9.
    Goldreich, O., Trevisan, L.: Three theorems regarding testing graph properties. Random Structures and Algorithms 23(1), 23–57 (2003)MATHCrossRefMathSciNetGoogle Scholar
  10. 10.
    Justesen, J.: A class of constructive asymptotically good algebraic codes. IEEE Transcations on Information 18, 652–656 (1972)MATHCrossRefMathSciNetGoogle Scholar
  11. 11.
    Lachish, O., Newman, I.: Languages that are Recognized by Simple Counter Automata are not necessarily Testable, ECCC report TR05-152Google Scholar
  12. 12.
    MacWilliams, F., Sloane, N.: The Theory of Error-Correcting Codes. North-Holland, Amsterdam (1997)Google Scholar
  13. 13.
    Newman, I.: Testing of functions that have small width branching programs. In: Proc. of 41th FOCS, pp. 251–258 (2000)Google Scholar
  14. 14.
    Papadimitriou, C.: Computational Complexity. Addison-Wesley, Reading (1994)MATHGoogle Scholar
  15. 15.
    Ron, D.: Property testing. In: Handbook of Randomized Computing, vol. II, pp. 597–649. Kluwer Academic, Dordrecht (2001)Google Scholar
  16. 16.
    Rubinfeld, R., Sudan, M.: Robust characterization of polynomials with applications to program testing. SIAM J. on Computing 25, 252–271 (1996)MATHCrossRefMathSciNetGoogle Scholar
  17. 17.
    Sudan, M.: Lecture Notes on Algorithmic Introduction to Coding Theory, available at:
  18. 18.
    Valiant, L.G., Paterson, M.: Deterministic one-counter automata. Journal of Computer and System Sciences 10, 340–350 (1975)MATHMathSciNetCrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Oded Lachish
    • 1
  • Ilan Newman
    • 1
  • Asaf Shapira
    • 2
  1. 1.University of HaifaHaifaIsrael
  2. 2.School of Computer Science, Raymond and Beverly Sackler Faculty of Exact SciencesTel Aviv UniversityTel AvivIsrael

Personalised recommendations