New common ancestor problems in trees and directed acyclic graphs

  • Authors:
  • Johannes Fischer;Daniel H. Huson

  • Affiliations:
  • Universität Tübingen, Center for Bioinformatics (ZBIT), Sand 14, D-72076 Tübingen, Germany;Universität Tübingen, Center for Bioinformatics (ZBIT), Sand 14, D-72076 Tübingen, Germany

  • Venue:
  • Information Processing Letters
  • Year:
  • 2010

Quantified Score

Hi-index 0.90

Visualization

Abstract

We derive a new generalization of lowest common ancestors (LCAs) in dags, called the lowest single common ancestor (LSCA). We show how to preprocess a static dag in linear time such that subsequent LSCA-queries can be answered in constant time. The size is linear in the number of nodes. We also consider a ''fuzzy'' variant of LSCA that allows to compute a node that is only an LSCA of a given percentage of the query nodes. The space and construction time of our scheme for fuzzy LSCAs is linear, whereas the query time has a sub-logarithmic slow-down. This ''fuzzy'' algorithm is also applicable to LCAs in trees, with the same complexities.