Unique lowest common ancestors in dags are almost as easy as matrix multiplication

  • Authors:
  • Mirosław Kowaluk;Andrzej Lingas

  • Affiliations:
  • Institute of Informatics, Warsaw University, Warsaw;Department of Computer Science, Lund University, Lund

  • Venue:
  • ESA'07 Proceedings of the 15th annual European conference on Algorithms
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

We consider the problem of determining for each pair of vertices of a directed acyclic graph (dag) on n vertices whether or not it has a unique lowest common ancestor, and if so, finding such an ancestor. We show that this problem can be solved in time O(nω log n), where ω n × n matrices. We show also that the problem of determining a lowest common ancestor for each pair of vertices of an arbitrary dag on n vertices is solvable in time Õ(n2p+nω), where p is the minimum number of directed paths covering the vertices of the dag. With the help of random bits, we can solve the latter problem in time Õ(n2p).