# The Euler Path to Static Level-Ancestors

**Authors:** Amir M. Ben-Amram

arXiv: 0909.1030 · 2009-09-08

## TL;DR

This paper presents a simple, efficient algorithm for static level-ancestor queries in rooted trees, inspired by a PRAM algorithm, with extensions for related queries, improving simplicity and functionality over prior methods.

## Contribution

It introduces a straightforward algorithm for static level-ancestor queries derived from a complex PRAM algorithm, with added support for descendant and level successor queries.

## Key findings

- Linear preprocessing time with constant query time.
- Simpler algorithm compared to previous solutions.
- Extensions for descendant, ancestor, and level successor queries.

## Abstract

Suppose that a rooted tree T is given for preprocessing. The Level-Ancestor Problem is to 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 the root to v. Algorithms that achieve a linear time bound for preprocessing and a constant time bound for a query have been published by Dietz (1991), Alstrup and Holm (2000), and Bender and Farach (2002). The first two algorithms address dynamic versions of the problem; the last addresses the static version only and is the simplest so far. The purpose of this note is to expose another simple algorithm, derived from a complicated PRAM algorithm by Berkman and Vishkin (1990,1994). We further show some easy extensions of its functionality, adding queries for descendants and level successors as well as ancestors, extensions for which the formerly known algorithms are less suitable.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/0909.1030/full.md

## Figures

1 figure with captions in the complete paper: https://tomesphere.com/paper/0909.1030/full.md

## References

15 references — full list in the complete paper: https://tomesphere.com/paper/0909.1030/full.md

---
Source: https://tomesphere.com/paper/0909.1030