# Tree Edit Distance Cannot be Computed in Strongly Subcubic Time (unless   APSP can)

**Authors:** Karl Bringmann, Pawe{\l} Gawrychowski, Shay Mozes, Oren Weimann

arXiv: 1703.08940 · 2017-03-28

## TL;DR

This paper proves that computing tree edit distance cannot be done in strongly subcubic time unless major computational complexity conjectures are false, establishing a conditional lower bound based on the hardness of other fundamental problems.

## Contribution

It establishes a conditional lower bound for the computational complexity of tree edit distance, linking it to the hardness of all pairs shortest paths and maximum weight clique problems.

## Key findings

- Truly subcubic algorithms for tree edit distance imply breakthroughs in other problems.
- Tree edit distance shares similar upper bounds with string edit distance but differs in lower bound hardness.
- Provides a matching conditional lower bound for a classic dynamic programming problem.

## Abstract

The edit distance between two rooted ordered trees with $n$ nodes labeled from an alphabet~$\Sigma$ 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(n^3)$ time and is based on a similar dynamic programming solution as string edit distance. In this paper we show that a truly subcubic $O(n^{3-\varepsilon})$ time algorithm for tree edit distance is unlikely: For $|\Sigma| = \Omega(n)$, a truly subcubic algorithm for tree edit distance implies a truly subcubic algorithm for the all pairs shortest paths problem. For $|\Sigma| = O(1)$, a truly subcubic algorithm for tree edit distance implies an $O(n^{k-\varepsilon})$ 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.

## Full text

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

## Figures

9 figures with captions in the complete paper: https://tomesphere.com/paper/1703.08940/full.md

## References

66 references — full list in the complete paper: https://tomesphere.com/paper/1703.08940/full.md

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