FINDING LEVEL-ANCESTORS IN TREES
FINDING LEVEL-ANCESTORS IN TREES
复制标题
DOI:
10.1016/s0022-0000(05)80002-9
复制
发表时间:
1994-04-01
影响因子:
1.1
通讯作者:
VISHKIN, U
中科院分区:
文献类型:
--
作者:
BERKMAN, O;VISHKIN, U
The level-ancestor problem is considered. Suppose a rooted tree T is given for preprocessing. Answer quickly queries of the following form. Given a vertex v and an integer i > 0, find the i th vertex on the path from v to the root. Given any m, 1 less-than-or-equal-to m less-than-or-equal-to log* n, we achieve the following results: (1) O(log(m) n)1 time using an optimal number of processors for preprocessing and constant time using a single processor for processing a query if m is constant. (2) O(log* n) time using an optimal number of processors for preprocessing and O(log* n) time using a single processor for processing a query. These results assume that the Euler tour of the tree and the level (distance from the root) of each vertex are given. Without these assumptions, the only change in result (1) above is that preprocessing time increases to O(log n) An immediate corollary is a serial linear-time bound for preprocessing and a constant-time bound for processing a query. (C) 1994 Academic Press, Inc.