...
首页> 外文期刊>IEEE Transactions on Parallel and Distributed Systems >Efficient EREW PRAM algorithms for parentheses-matching
【24h】

Efficient EREW PRAM algorithms for parentheses-matching

机译:用于括号匹配的高效EREW PRAM算法

获取原文
获取原文并翻译 | 示例

摘要

We present four polylog-time parallel algorithms for matching parentheses on an exclusive-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 not cost-optimal, it is extremely simple to implement. The remaining three algorithms, which are based on a different approach, achieve O(log n) time complexity in each case, and represent successive improvements. The second algorithm requires O(n) processors and working 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 is cost-optimal, but uses extra space compared to the standard stack-based sequential algorithm. The last algorithm reduces the space complexity to O(n) while maintaining the same 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.
机译:我们提出了四种多对数时间并行算法,用于在专用读取和专用写入(EREW)并行随机存取机(PRAM)模型上匹配括号。这些算法为括号匹配问题提供了新的见解。对于包含n个括号的输入字符串,第一种算法的时间复杂度为O(log / sup 2 / n),采用O(n /(log n))处理器。尽管此算法不是成本最优的,但实现起来却非常简单。其余三种基于不同方法的算法在每种情况下均达到O(log n)时间复杂度,并代表了连续的改进。第二种算法需要O(n)个处理器和工作空间,并且与第一种算法相比,易于实现。第三种算法使用O(n /(log n))个处理器和O(n log n)个空间。因此,它是成本最佳的,但与标准的基于堆栈的顺序算法相比使用了额外的空间。最后一种算法将空间复杂度降低到O(n),同时保持相同的处理器和时间复杂度。与其他用于括号匹配问题的现有时间最优算法相比,后者要么使用大量流水线方法,要么使用链表和可比较的数据结构,并使用排序或链表排序算法作为子例程,但是后两种算法具有两个明显的优势。首先,这些算法将数组用作其基本数据结构,其次,它们不使用任何流水线,排序或链接列表排名算法。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号