Tree Edit Distance Cannot be Computed in Strongly Subcubic Time (Unless APSP Can)

Karl Bringmann, Pawe Gawrychowski, Shay Mozes, Oren Weimann

Research output: Contribution to journalArticlepeer-review

Abstract

The edit distance between two rooted ordered trees with n nodes labeled from an alphabet is the minimum cost of transforming one tree into the other by a sequence of elementary operations consisting of deleting and relabeling existing nodes, as well as inserting new nodes. Tree edit distance is a well-known generalization of string edit distance. The fastest known algorithm for tree edit distance runs in cubic O(n3) time and is based on a similar dynamic programming solution as string edit distance. In this article, we show that a truly subcubic O(n3-ϵ) time algorithm for tree edit distance is unlikely: For || = ω (n), a truly subcubic algorithm for tree edit distance implies a truly subcubic algorithm for the all pairs shortest paths problem. For || = O(1), a truly subcubic algorithm for tree edit distance implies an O(nk-ϵ) algorithm for finding a maximum weight k-clique. Thus, while in terms of upper bounds string edit distance and tree edit distance are highly related, in terms of lower bounds string edit distance exhibits the hardness of the strong exponential time hypothesis (Backurs, Indyk STOC'15) whereas tree edit distance exhibits the hardness of all pairs shortest paths. Our result provides a matching conditional lower bound for one of the last remaining classic dynamic programming problems.

Original languageAmerican English
Article number3381878
JournalACM Transactions on Algorithms
Volume16
Issue number4
DOIs
StatePublished - Sep 2020

Keywords

  • Conditional lower bound
  • string edit distance
  • tree edit distance

All Science Journal Classification (ASJC) codes

  • Mathematics (miscellaneous)

Fingerprint

Dive into the research topics of 'Tree Edit Distance Cannot be Computed in Strongly Subcubic Time (Unless APSP Can)'. Together they form a unique fingerprint.

Cite this