Dynamic nested brackets

We consider the problem of maintaining a string of n brackets '('or')' under the operation reverse(i) that changes the ith bracket from '('to')' or vice versa, and returns 'yes' if and only if the resulting string is properly balanced. We show that this problem can be solved on the RAM in time O(logn/log log n) per operation using linear space and preprocessing. Moreover, we show that this is optimal in the sense that every data structure supporting reverse (no matter its space and preprocessing complexity) needs time Ω(log n/log log n) per operation in the cell probe model.

[1]  Alfred V. Aho,et al.  The Design and Analysis of Computer Algorithms , 1974 .

[2]  Thore Husfeldt,et al.  Lower Bounds for Dynamic Transitive Closure, Planar Point Location, and Parantheses Matching , 1996, Nord. J. Comput..

[3]  Stephen Alstrup,et al.  Marked Ancestor Problems , 1998 .

[4]  Neil Immerman,et al.  Dyn-FO: A Parallel, Dynamic Complexity Class , 1997, J. Comput. Syst. Sci..

[5]  Thore Husfeldt,et al.  Lower Bounds for Dynamic Transitive Closure, Planar Point Location, and Parentheses Matching , 1996, SWAT.

[6]  Alejandro A. Schäffer,et al.  Improved dynamic dictionary matching , 1995, SODA '93.

[7]  Michael L. Fredman,et al.  Surpassing the Information Theoretic Bound with Fusion Trees , 1993, J. Comput. Syst. Sci..

[8]  Peter Bro Miltersen,et al.  Dynamic Algorithms for the Dyck Languages , 1995 .

[9]  Robert E. Tarjan,et al.  A Linear-Time Algorithm for a Special Case of Disjoint Set Union , 1985, J. Comput. Syst. Sci..

[10]  Faith Ellen,et al.  Optimal Bounds for the Predecessor Problem and Related Problems , 2002, J. Comput. Syst. Sci..

[11]  Michael E. Saks,et al.  The cell probe complexity of dynamic data structures , 1989, STOC '89.

[12]  Thore Husfeldt,et al.  Hardness Results for Dynamic Problems by Extensions of Fredman and Saks' Chronogram Method , 1998, ICALP.

[13]  Peter Bro Miltersen,et al.  Dynamic Word problems , 1993 .

[14]  A. Rosser A.I.D.S. , 1986, Maryland medical journal.

[15]  Peter Bro Miltersen Lower bounds for union-split-find related problems on random access machines , 1994, STOC '94.

[16]  C. SIAMJ.,et al.  NEW LOWER BOUND TECHNIQUES FOR DYNAMIC PARTIAL SUMS AND RELATED PROBLEMS , 2003 .