Cartesian Tree Matching and Indexing

05/22/2019
by   Sung Gwan Park, et al.
0

We introduce a new metric of match, called Cartesian tree matching, which means that two strings match if they have the same Cartesian trees. Based on Cartesian tree matching, we define single pattern matching for a text of length n and a pattern of length m, and multiple pattern matching for a text of length n and k patterns of total length m. We present an O(n+m) time algorithm for single pattern matching, and an O((n+m) log k) deterministic time or O(n+m) randomized time algorithm for multiple pattern matching. We also define an index data structure called Cartesian suffix tree, and present an O(n) randomized time algorithm to build the Cartesian suffix tree. Our efficient algorithms for Cartesian tree matching use a representation of the Cartesian tree, called the parent-distance representation.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
06/28/2023

Approximate Cartesian Tree Matching: an Approach Using Swaps

Cartesian tree pattern matching consists of finding all the factors of a...
research
01/16/2020

Generalised Pattern Matching Revisited

In the problem of Generalised Pattern Matching (GPM) [STOC'94, Muthukris...
research
11/15/2018

Vectorized Character Counting for Faster Pattern Matching

Many modern sequence alignment tools implement fast string matching usin...
research
08/05/2019

Heuristic Algorithm for Generalized Function Matching

The problem of generalized function matching can be defined as follows: ...
research
03/07/2018

Flexible and Efficient Algorithms for Abelian Matching in Strings

The abelian pattern matching problem consists in finding all substrings ...
research
08/11/2022

Diamonds are Forever in the Blockchain: Geometric Polyhedral Point-Set Pattern Matching

Motivated by blockchain technology for supply-chain tracing of ethically...
research
04/06/2022

Faster Pattern Matching under Edit Distance

We consider the approximate pattern matching problem under the edit dist...

Please sign up or login with your details

Forgot password? Click here to reset