Streaming Algorithms for Some Problems in Log-Space

  • Ajesh Babu
  • Nutan Limaye
  • Girish Varma
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6108)


In this paper, we give streaming algorithms for some problems which are known to be in deterministic log-space, when the number of passes made on the input is unbounded. If the input data is massive, the conventional deterministic log-space algorithms may not run efficiently. We study the complexity of the problems when the number of passes is bounded.

The first problem we consider is the membership testing problem for deterministic linear languages, DLIN. Extending the recent work of Magniez et al.[11](to appear in STOC 2010), we study the use of fingerprinting technique for this problem. We give the following streaming algorithms for the membership testing of DLIN s: a randomized one pass algorithm that uses O(logn) space (one-sided error, inverse polynomial error probability), and also a p-pass O(n/p)-space deterministic algorithm. We also prove that there exists a language in DLIN, for which any p-pass deterministic algorithm for membership testing, requires Ω(n/p) space. We also study the application of fingerprinting technique to visibly pushdown languages, VPL s.

The other problem we consider is, given a degree sequence and a graph, checking whether the graph has the given degree sequence, Deg-Seq. We prove that, any p-pass deterministic algorithm that takes as its input a degree sequence, followed by an adjacency list of a graph, requires Ω(n/p) space to decide Deg-Seq. However, using randomness, for a more general input format: degree sequence, followed by a list of edges in any arbitrary order, Deg-Seq can be decided in O(logn) space. We also give a p-pass, O(n/p)-space deterministic algorithm for Deg-Seq.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Alon, N., Matias, Y., Szegedy, M.: The space complexity of approximating the frequency moments. In: STOC 1996: Proceedings of the twenty-eighth annual ACM symposium on Theory of computing, pp. 20–29 (1996)Google Scholar
  2. 2.
    Alur, R., Madhusudan, P.: Visibly pushdown languages. In: STOC, pp. 202–211 (2004)Google Scholar
  3. 3.
    Alur, R., Madhusudan, P.: Adding nesting structure to words. J. ACM 56(3) (2009)Google Scholar
  4. 4.
    Nanongkai, D., Sarma, A.D., Lipton, R.J.: Best-order streaming model. In: Chen, J., Cooper, S.B. (eds.) TAMC 2009. LNCS, vol. 5532, pp. 178–191. Springer, Heidelberg (2009)Google Scholar
  5. 5.
    Von Braunmühl, B., Verbeek, R.: Input-driven languages are recognized in logn space. In: Karpinski, M. (ed.) FCT 1983. LNCS, vol. 158, pp. 40–51. Springer, Heidelberg (1983)Google Scholar
  6. 6.
    Dymond, P.W.: Input-driven languages are in logn depth. Information Processing Letters 26, 247–250 (1988)CrossRefMathSciNetGoogle Scholar
  7. 7.
    Feigenbaum, J., Kannan, S., Strauss, M., Viswanathan, M.: Testing and spot-checking of data streams. Algorithmica 34(1), 67–80 (2002)zbMATHCrossRefMathSciNetGoogle Scholar
  8. 8.
    Holzer, M., Lange, K.-J.: On the complexities of linear LL(1) and LR(1) grammars. In: Ésik, Z. (ed.) FCT 1993. LNCS, vol. 710, pp. 299–308. Springer, Heidelberg (1993)Google Scholar
  9. 9.
    Hopcroft, J.E., Motwani, R., Ullman, J.D.: Introduction to Automata Theory, Languages, and Computation, 3rd edn. Addison-Wesley Longman Publishing Co., Inc., Boston (2006)Google Scholar
  10. 10.
    Ibarra, O.H., Jiang, T., Ravikumar, B.: Some subclasses of context-free languages in NC 1. Information Processing Letters 29, 111–117 (1988)zbMATHCrossRefMathSciNetGoogle Scholar
  11. 11.
    Magniez, F., Mathieu, C., Nayak, A.: Recognizing well-parenthesized expressions in the streaming model. In: STOC (2010)Google Scholar
  12. 12.
    Mehlhorn, K.: Pebbling mountain ranges and its application to DCFL recognition. In: de Bakker, J.W., van Leeuwen, J. (eds.) ICALP 1980. LNCS, vol. 85, pp. 422–432. Springer, Heidelberg (1980)Google Scholar
  13. 13.
    Motwani, R., Raghavan, P.: Randomized algorithms. ACM Comput. Surv. 28(1), 33–37 (1996)CrossRefGoogle Scholar
  14. 14.
    Muthukrishnan, S.: Data streams: algorithms and applications. In: SODA 2003: Proceedings of the fourteenth annual ACM-SIAM symposium on Discrete algorithms, p. 413 (2003)Google Scholar
  15. 15.
    Vollmer, H.: Introduction to Circuit Complexity: A Uniform Approach. Springer, New York (1999)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Ajesh Babu
    • 1
  • Nutan Limaye
    • 1
  • Girish Varma
    • 1
  1. 1.Tata Institute of Fundamental ResearchMumbaiIndia

Personalised recommendations