Location of Repository

Recognizing wellparenthesized expressions in the streaming model

By Frédéric Magniez, Claire Mathieu and Ashwin Nayak


Motivated by a concrete problem and with the goal of understanding the relationship between the complexity of streaming algorithms and the computational complexity of formal languages, we investigate the problem DYCK(s) of checking matching parentheses, with s different types of parenthesis. We present a one-pass randomized streaming algorithm for DYCK(2) with space O ( √ n log n) bits, time per letter polylog(n), and one-sided error. We prove that this one-pass algorithm is optimal, up to a log n factor, even when two-sided error is allowed, and conjecture that a similar bound holds for any constant number of passes over the input. Surprisingly, the space requirement shrinks drastically if we have access to the input stream in reverse. We present a two-pass randomized streaming algorithm for DYCK(2) with space O((log n) 2), time polylog(n) and one-sided error, where the second pass is in the reverse direction. Both algorithms can be extended to DYCK(s) since this problem is reducible to DYCK(2) for a suitable notion of reduction in the streaming model. Except for an extra O ( √ log s) multiplicative overhead in the space required in the one-pass algorithm, the resource requirements are of the same order. For the lower bound, we exhibit hard instances ASCENSION(m) of DYCK(2) with length Θ(mn)

Year: 2011
OAI identifier: oai:CiteSeerX.psu:
Provided by: CiteSeerX
Download PDF:
Sorry, we are unable to provide the full text but you may find it at the following location(s):
  • http://citeseerx.ist.psu.edu/v... (external link)
  • http://www.math.uwaterloo.ca/%... (external link)
  • Suggested articles

    To submit an update or takedown request for this paper, please submit an Update/Correction/Removal Request.