The Community for Technology Leaders
RSS Icon
Subscribe
Issue No.09 - September (1994 vol.5)
pp: 995-1008
ABSTRACT
<p>We present four polylog-time parallel algorithms for matching parentheses on anexclusive-read and exclusive-write (EREW) parallel random-access machine (PRAM)model. These algorithms provide new insights into the parentheses-matching problem.The first algorithm has a time complexity of O(log/sup 2/ n) employing O(n/(log n))processors for an input string containing n parentheses. Although this algorithm is notcost-optimal, it is extremely simple to implement. The remaining three algorithms, whichare based on a different approach, achieve O(log n) time complexity in each case, andrepresent successive improvements. The second algorithm requires O(n) processors andworking space, and it is comparable to the first algorithm in its ease of implementation.The third algorithm uses O(n/(log n)) processors and O(n log n) space. Thus, it iscost-optimal, but uses extra space compared to the standard stack-based sequentialalgorithm. The last algorithm reduces the space complexity to O(n) while maintaining thesame processor and time complexities. Compared to other existing time-optimal algorithms for the parentheses-matching problem that either employ extensive pipelining or use linked lists and comparable data structures, and employ sorting or a linked list ranking algorithm as subroutines, the last two algorithms have two distinct advantages. First, these algorithms employ arrays as their basic data structures, and second, they do not use any pipelining, sorting, or linked list ranking algorithms.</p>
INDEX TERMS
Index Termsparallel algorithms; parallel machines; random-access storage; computational complexity;pattern recognition; data structures; EREW PRAM algorithms; parentheses-matching;polylog-time parallel algorithms; exclusive-read and exclusive-write; parallelrandom-access machine; PRAM model; time complexity; input string; working space;space complexity; time-optimal algorithms; arrays; data structures
CITATION
S.K. Das, S.K. Prasad, "Efficient EREW PRAM Algorithms for Parentheses-Matching", IEEE Transactions on Parallel & Distributed Systems, vol.5, no. 9, pp. 995-1008, September 1994, doi:10.1109/71.308536
14 ms
(Ver 2.0)

Marketing Automation Platform Marketing Automation Tool