Streaming Algorithms for Recognizing Nearly Well-Parenthesized Expressions

  • Andreas Krebs
  • Nutan Limaye
  • Srikanth Srinivasan
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6907)

Abstract

We study the streaming complexity of the membership problem of \(1\mbox{-turn-}\mbox{\sf Dyck}_2\) and \(\mbox{\sf Dyck}_2\) when there are a few errors in the input string.

\(1\mbox{-turn-}\mbox{\sf Dyck}_2\) with errors: We prove that there exists a randomized one-pass algorithm that given x checks whether there exists a string \(x' \in 1\mbox{-turn-}\mbox{\sf Dyck}_2\) such that x is obtained by flipping at most k locations of x′ using:
  • O(k logn) space, O(k logn) randomness, and \(\mathop{\mathrm{poly}}(k \log n)\) time per item and with error at most 1/nΩ(1).

  • O(k1 + ε + logn) space for every 0 ≤ ε ≤ 1, O(logn) randomness, O((logO(1)n + kO(1))) time per item, with error at most 1/8.

Here, we also prove that any randomized one-pass algorithm that makes error at most k/n requires at least Ω(k log(n/k)) space to accept strings which are exactly k-away from strings in \(1\mbox{-turn-}\mbox{\sf Dyck}_2\) and to reject strings which are exactly k + 2-away from strings in \(1\mbox{-turn-}\mbox{\sf Dyck}_2\). Since \(1\mbox{-turn-}\mbox{\sf Dyck}_2\) and the Hamming Distance problem are closely related we also obtain new upper and lower bounds for this problem.

\(\mbox{\sf Dyck}_2\) with errors: We prove that there exists a randomized one-pass algorithm that given x checks whether there exists a string \(x' \in \mbox{\sf Dyck}_2\) such that x is obtained from x′ by changing (in some restricted manner) at most k positions using:

  • \(O(k \log n + \sqrt{n \log n})\) space, O(k logn) randomness, \(\mathop{\mathrm{poly}}(k \log n)\) time per element and with error at most 1/nΩ(1).

  • \(O(k^{1+\epsilon}+ \sqrt{n \log n})\) space for every 0 < ε ≤ 1, O(logn) randomness, O((logO(1)n + kO(1))) time per element, with error at most 1/8.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Alon, N., Krivelevich, M., Newman, I., Szegedy, M.: Regular languages are testable with a constant number of queries. SIAM Journal on Computing, 645–655 (1999)Google Scholar
  2. 2.
    Alon, N., Matias, Y., Szegedy, M.: The space complexity of approximating the frequency moments. In: Proceedings of the Twenty-Eighth Annual ACM Symposium on Theory of Computing, STOC 1996, pp. 20–29. ACM, New York (1996), http://doi.acm.org/10.1145/237814.237823 CrossRefGoogle Scholar
  3. 3.
    Babu, A., Limaye, N., Radhakrishnan, J., Varma, G.: Streaming algorithms for language recognition problems. Tech. Rep. arXiv:1104.0848, Arxiv (2011)Google Scholar
  4. 4.
    Babu, A., Limaye, N., Varma, G.: Streaming algorithms for some problems in log-space. In: Kratochvíl, J., Li, A., Fiala, J., Kolman, P. (eds.) TAMC 2010. LNCS, vol. 6108, pp. 94–104. Springer, Heidelberg (2010), http://dx.doi.org/10.1007/978-3-642-13562-0_10, doi:10.1007/978-3-642-13562-0-10CrossRefGoogle Scholar
  5. 5.
    Barrington, D.A.M., Corbett, J.: On the relative complexity of some languages in NC 1. Information Processing Letters 32(5), 251 (1989)MathSciNetMATHCrossRefGoogle Scholar
  6. 6.
    Cao, F., Ester, M., Qian, W., Zhou, A.: Density-based clustering over an evolving data stream with noise. In: 2006 SIAM Conference on Data Mining, pp. 328–339 (2006)Google Scholar
  7. 7.
    Chakrabarti, A., Cormode, G., Kondapally, R., McGregor, A.: Information cost tradeoffs for augmented index and streaming language recognition. In: Proceedings of the 2010 IEEE 51st Annual Symposium on Foundations of Computer Science, FOCS 2010, pp. 387–396 (2010)Google Scholar
  8. 8.
    Ganguly, S.: Data stream algorithms via expander graphs. In: Proceedings of the 19th International Symposium on Algorithms and Computation, pp. 52–63 (2008)Google Scholar
  9. 9.
    Huang, W., Shi, Y., Zhang, S., Zhu, Y.: The communication complexity of the hamming distance problem. Information Processing Letters 99(4), 149–153 (2006)MathSciNetMATHCrossRefGoogle Scholar
  10. 10.
    Jain, R., Nayak, A.: The space complexity of recognizing well-parenthesized expressions. Tech. Rep. TR10-071, Electronic Colloquium on Computational Complexity (April 19, 2010) (revised July 5, 2010), http://eccc.hpi-web.de/
  11. 11.
    Kushilevitz, E., Nisan, N.: Communication Complexity. Cambridge University Press, New York (2006)Google Scholar
  12. 12.
    Magniez, F., Mathieu, C., Nayak, A.: Recognizing well-parenthesized expressions in the streaming model. In: STOC 2009 (2009)Google Scholar
  13. 13.
    Muthukrishnan, S.: Data streams: Algorithms and applications. Foundations and Trends in Theoretical Computer Science 1(2) (2005)Google Scholar
  14. 14.
    Nisan, N.: Pseudorandom generators for space-bounded computations. In: Proceedings of the Twenty-Second Annual ACM Symposium on Theory of Computing, STOC 1990, pp. 204–212. ACM, New York (1990), http://doi.acm.org/10.1145/100216.100242 CrossRefGoogle Scholar
  15. 15.
    Parnas, M., Ron, D., Rubinfeld, R.: Testing parenthesis languages. In: Proceedings of the 5th International Workshop on Randomization and Approximation Techniques in Computer Science, pp. 261–272. Springer, Heidelberg (2001)Google Scholar
  16. 16.
    Rudra, A., Uurtamo, S.: Data stream algorithms for codeword testing. In: ICALP (1), pp. 629–640 (2010)Google Scholar
  17. 17.
    Jayram, T.S, David, W.: Optimal bounds for johnson-lindenstrauss transforms and streaming problems with sub-constant error. In: SIAM: ACM-SIAM Symposium on Discrete Algorithms, SODA 2011 (2011)Google Scholar
  18. 18.
    Shaltiel, R.: Weak derandomization of weak algorithms: Explicit versions of yao’s lemma. In: Annual IEEE Conference on Computational Complexity, pp. 114–125 (2009)Google Scholar
  19. 19.
    Vadhan, S.: Pseudorandomness, monograph in preparation for FnTTCS (2010), http://people.seas.harvard.edu/~salil/pseudorandomness/
  20. 20.
    Yao, A.C.C.: On the power of quantum fingerprinting. In: Proceedings of the Thirty-Fifth Annual ACM Symposium on Theory of Computing, STOC 2003, pp. 77–81 (2003)Google Scholar

Copyright information

© Springer-Verlag GmbH Berlin Heidelberg 2011

Authors and Affiliations

  • Andreas Krebs
    • 1
  • Nutan Limaye
    • 2
  • Srikanth Srinivasan
    • 3
  1. 1.University of TübingenGermany
  2. 2.Indian Institute of TechnologyBombayIndia
  3. 3.Institute for Advanced StudyUSA

Personalised recommendations