TY - GEN

T1 - Parallel algorithms for parenthesis matching and generation of random balanced sequences of parentheses

AU - Sarkar, Dilip

AU - Deo, Narsingh

N1 - Funding Information:
In this paper, we consider the parenthesis-matching problem. The problem is to find the matching parenthesis for each parenthesis in a given "legal" sequence of n parentheses. By "legal" it is meant that every parenthesis has its matching parenthesis in the sequence. It is easy to construct an O (n)-time sequential algorithm for the problem. Bar-On and Vishkin [21] have proposed an O (log n)-time parallel parenthesis-matching algorithm and used it to design an optimal parallel algorithm for generation of computation tree forms. To design the algorithm for parallel generation * This work was supported by the Washington Technology Center grant, subcontract number 384709 algorithm for generation of computation tree forms. To design the algorithm for parallel generation of computation tree form they have adopted the parenthesis-insertion technique of Knuth [6]. Their O (log n )-time parallel algorithm on a (n/log n )-processor CREW-PRAM is an improvement over Dekel and Sahni's [5] algorithm for construction of computation tree forms of arithmetic expressions on an EREW-PRAM. The motivation behind their construction of computation tree forms in logarithmic time is logarithmic-time arithmetic expression evaluation algorithms of Brent [3] and Miller and Reif [7]. They have shown that if the computation tree of an arithmetic expression is given, the expression can be evaluated in O (log n)-time using n processors, even if the height of the computation tree is greater than log n. Sarkar and Deo [8] have shown that a class of Pascal-like block-structured languages can be parsed in O (log n)-time using an O (log n)-time parenthesis-matching algorithm.
Publisher Copyright:
© 1988, Springer-Verlag.
Copyright:
Copyright 2017 Elsevier B.V., All rights reserved.

PY - 1988

Y1 - 1988

N2 - Parallel parenthesis-matching algorithm has in the past been used to design parallel algorithms for generation of computation tree forms and parsing. In this paper we present a parallel parenthesis-matching algorithm. A variant of binary search tree is constructed in parallel. The search tree is used to find the matching of each parenthesis. The algorithm takes O(log n) time on a (n / log n)-processor CREW-PRAM. We also present an O(log n)-time parallel algorithm for generation of random sequences of parentheses. These two algorithms can be used to design an O(log n)-time parallel algorithm for generation of a class of random permutations.

AB - Parallel parenthesis-matching algorithm has in the past been used to design parallel algorithms for generation of computation tree forms and parsing. In this paper we present a parallel parenthesis-matching algorithm. A variant of binary search tree is constructed in parallel. The search tree is used to find the matching of each parenthesis. The algorithm takes O(log n) time on a (n / log n)-processor CREW-PRAM. We also present an O(log n)-time parallel algorithm for generation of random sequences of parentheses. These two algorithms can be used to design an O(log n)-time parallel algorithm for generation of a class of random permutations.

UR - http://www.scopus.com/inward/record.url?scp=84942209893&partnerID=8YFLogxK

UR - http://www.scopus.com/inward/citedby.url?scp=84942209893&partnerID=8YFLogxK

U2 - 10.1007/3-540-18991-2_57

DO - 10.1007/3-540-18991-2_57

M3 - Conference contribution

AN - SCOPUS:84942209893

SN - 9783540189916

T3 - Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)

SP - 970

EP - 984

BT - Supercomputing - 1st International Conference, Proceedings

A2 - Papatheodorou, Theodore S.

A2 - Polychronopoulos, Constantine D.

A2 - Houstis, Elias N.

PB - Springer Verlag

T2 - 1st International Conference on Supercomputing, 1987

Y2 - 8 June 1987 through 12 June 1987

ER -