Abstract
Cartesian tree pattern matching consists in finding all the factors of a text that have the same Cartesian tree as a given pattern. There already exist theoretical and practical solutions for the exact case. In this paper, we propose the first algorithms for solving approximate Cartesian tree pattern matching with one difference given a pattern of length m and a text of length n. We present a generic algorithm that finds all the factors of the text that have the same Cartesian tree as the pattern with one difference, using several notions of differences. We show that this algorithm has O(nm) worst-case time complexity and that, for several random models, the algorithm has a linear average-case complexity. We also present an automaton based algorithm, adapting [1], that can be generalized to deal with more than one difference.
| Original language | English |
|---|---|
| Article number | 116026 |
| Journal | Theoretical Computer Science |
| Volume | 1079 |
| DOIs | |
| State | Published - 18 Jul 2026 |
Bibliographical note
Publisher Copyright:© 2026 Elsevier B.V.
Keywords
- Approximate pattern matching
- Cartesian tree matching
- Deletion
- Insertion
- Mismatch
- Swap
- Transposition
ASJC Scopus subject areas
- Theoretical Computer Science
- General Computer Science
Fingerprint
Dive into the research topics of 'Approximate Cartesian tree matching with one difference'. Together they form a unique fingerprint.Cite this
- APA
- Author
- BIBTEX
- Harvard
- Standard
- RIS
- Vancouver