,
Emil Toftegaard Gæde
,
Tim Ophelders
,
Willem Sonke
,
Bettina Speckmann
,
Kevin Verbeek
Creative Commons Attribution 4.0 International license
Merge trees are a popular topological descriptor for scalar field data. A common measure to compare two merge trees is the interleaving distance, which relies on a mapping between the two merge trees, also referred to as an interleaving. Despite its desirable properties, the interleaving distance has not been used much in practice, largely due to the fact that computing the exact interleaving distance is NP-hard. In this paper, we show that the exact interleaving distance can be computed efficiently for merge trees encountered in practice: we present the first implementation of the exact fixed-parameter tractable (FPT) algorithm by Touli and Wang [Touli and Wang, 2022]. This algorithm uses a dynamic program to test if a specific interleaving distance δ is feasible. They bound the running time using a parameter τ that captures the number of mapping options between the two merge trees for the output distance δ. Our experiments show that, even though τ can become quite large for real-world merge trees, the running time of our implementation does not depend very heavily on τ. Furthermore, we modify the FPT algorithm into a sweepline algorithm that runs much faster in practice. Finally, we introduce a natural restriction for the interleaving distance capturing the geometric similarity between the underlying scalar fields. This restricted interleaving distance can be computed more efficiently and can, in some settings, also result in more meaningful interleavings. We extend our implementations to support these restrictions and demonstrate their effect on the running time of the algorithms.
@InProceedings{beurskens_et_al:LIPIcs.SEA.2026.6,
author = {Beurskens, Thijs and G{\ae}de, Emil Toftegaard and Ophelders, Tim and Sonke, Willem and Speckmann, Bettina and Verbeek, Kevin},
title = {{A Practical Algorithm for (Geometry-Aware) Interleavings Between Merge Trees}},
booktitle = {24th International Symposium on Experimental Algorithms (SEA 2026)},
pages = {6:1--6:18},
series = {Leibniz International Proceedings in Informatics (LIPIcs)},
ISBN = {978-3-95977-422-2},
ISSN = {1868-8969},
year = {2026},
volume = {371},
editor = {Aum\"{u}ller, Martin and Finocchi, Irene},
publisher = {Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
address = {Dagstuhl, Germany},
URL = {https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.SEA.2026.6},
URN = {urn:nbn:de:0030-drops-260100},
doi = {10.4230/LIPIcs.SEA.2026.6},
annote = {Keywords: interleaving distance, geometry-aware, exact algorithm, implementation}
}