首页 | 本学科首页   官方微博 | 高级检索  
     


Reconstructing a Binary Tree from Its Traversals in Doubly Logarithmic CREW Time
Affiliation:1. Department of Software Engineering, Nanzan University, Seirei-cho 27, Seto city, Aichi 489-0863, Japan;2. DIKU, Department of Computer Science, University of Copenhagen, DK-2100 Copenhagen, Denmark;1. Nuclear Engineering Program, Department of Materials Science and Engineering, University of Florida, Gainesville, FL 32611, USA;2. Savannah River National Laboratory, Aiken, SC 29808, USA;1. DIKU, Department of Computer Science, University of Copenhagen, Denmark;2. Department of Electronics and Communication Technology, Nanzan University, Japan
Abstract:We consider the following problem. For a binary tree T = (V, E) where V = {1, 2, ..., n}, given its inorder traversal and either its preorder or its postorder traversal, reconstruct the binary tree. We present a new parallel algorithm for this problem. Our algorithm requires O(n) space. The main idea of our algorithm is to reduce the reconstruction process to merging two sorted sequences. With the best parallel merging algorithms, our algorithm can be implemented in O(log log n) time using O(n/log log n) processors on the CREW PRAM (or in O(log n) time using O(n/log n) processors on the EREW PRAM). Our result provides one more example of a fundamental problem which can be solved by optimal parallel algorithms in O(log log n)time on the CREW PRAM.
Keywords:
本文献已被 ScienceDirect 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号