Subcubic algorithm for (Unweighted) Unrooted Tree Edit Distance

04/17/2023
by   Krzysztof Pióro, et al.
0

The tree edit distance problem is a natural generalization of the classic string edit distance problem. Given two ordered, edge-labeled trees T_1 and T_2, the edit distance between T_1 and T_2 is defined as the minimum total cost of operations that transform T_1 into T_2. In one operation, we can contract an edge, split a vertex into two or change the label of an edge. For the weighted version of the problem, where the cost of each operation depends on the type of the operation and the label on the edge involved, 𝒪(n^3) time algorithms are known for both rooted and unrooted trees. The existence of a truly subcubic 𝒪(n^3-ϵ) time algorithm is unlikely, as it would imply a truly subcubic algorithm for the APSP problem. However, recently Mao (FOCS'21) showed that if we assume that each operation has a unit cost, then the tree edit distance between two rooted trees can be computed in truly subcubic time. In this paper, we show how to adapt Mao's algorithm to make it work for unrooted trees and we show an 𝒪(n^(7ω + 15)/(2ω + 6)) ≤𝒪(n^2.9417) time algorithm for the unweighted tree edit distance between two unrooted trees, where ω≤ 2.373 is the matrix multiplication exponent. It is the first known subcubic algorithm for unrooted trees. The main idea behind our algorithm is the fact that to compute the tree edit distance between two unrooted trees, it is enough to compute the tree edit distance between an arbitrary rooting of the first tree and every rooting of the second tree.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
09/15/2022

Õ(n+poly(k))-time Algorithm for Bounded Tree Edit Distance

Computing the edit distance of two strings is one of the most basic prob...
research
05/17/2018

Revisiting the tree edit distance and its backtracing: A tutorial

Almost 30 years ago, Zhang and Shasha published a seminal paper describi...
research
04/26/2018

Edit Distance between Unrooted Trees in Cubic Time

Edit distance between trees is a natural generalization of the classical...
research
12/15/2016

Orthogonal Edge Routing for the EditLens

The EditLens is an interactive lens technique that supports the editing ...
research
07/26/2021

An A*-algorithm for the Unordered Tree Edit Distance with Custom Costs

The unordered tree edit distance is a natural metric to compute distance...
research
05/11/2021

Tree Edit Distance with Variables. Measuring the Similarity between Mathematical Formulas

In this article, we propose tree edit distance with variables, which is ...
research
01/06/2020

Codes over Trees

In graph theory, a tree is one of the more popular families of graphs wi...

Please sign up or login with your details

Forgot password? Click here to reset