Abstract

We present a cost-optimal parallel algorithm for traversing a general tree in breadth-first fashion. For a tree with n nodes, this algorithm requires O( n/ p+log n) time employing p processors on the EREW PRAM model. To the best of our knowledge, it is the first parallel algorithm for breadth-first tree-traversal, which has O(log n) time complexity and yet being cost-optimal for p=O( n/log n) on the EREW PRAM. Our approach is based on a novel idea which converts the breadth-first traversal problem into a parentheses matching problem. As an application of this technique, we design a simple but elegant parallel algorithm for sorting a special class of integers in which elements in any two consecutive places of the input sequence differ at most by unity. The proposed sorting algorithm is stable and it achieves the same performance as that of our breadth-first traversal algorithm.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.