Cartesian Tree Subsequence Matching

02/09/2022
by   Tsubasa Oizumi, et al.
0

Park et al. [TCS 2020] observed that the similarity between two (numerical) strings can be captured by the Cartesian trees: The Cartesian tree of a string is a binary tree recursively constructed by picking up the smallest value of the string as the root of the tree. Two strings of equal length are said to Cartesian-tree match if their Cartesian trees are isomorphic. Park et al. [TCS 2020] introduced the following Cartesian tree substring matching (CTMStr) problem: Given a text string T of length n and a pattern string of length m, find every consecutive substring S = T[i..j] of a text string T such that S and P Cartesian-tree match. They showed how to solve this problem in Õ(n+m) time. In this paper, we introduce the Cartesian tree subsequence matching (CTMSeq) problem, that asks to find every minimal substring S = T[i..j] of T such that S contains a subsequence S' which Cartesian-tree matches P. We prove that the CTMSeq problem can be solved efficiently, in O(m n p(n)) time, where p(n) denotes the update/query time for dynamic predecessor queries. By using a suitable dynamic predecessor data structure, we obtain O(mn loglog n)-time O(n log m)-space solution for CTMSeq. This contrasts CTMSeq with closely related order-preserving subsequence matching (OPMSeq) which was shown to be NP-hard by Bose et al. [IPL 1998].

READ FULL TEXT

page 1

page 2

page 3

page 4

research
08/03/2018

Right-to-left online construction of parameterized position heaps

Two strings of equal length are said to parameterized match if there is ...
research
09/25/2019

Weighted Shortest Common Supersequence Problem Revisited

A weighted string, also known as a position weight matrix, is a sequence...
research
05/07/2019

Order-Preserving Pattern Matching Indeterminate Strings

Given an indeterminate string pattern p and an indeterminate string text...
research
06/03/2020

Dynamic Longest Common Substring in Polylogarithmic Time

The longest common substring problem consists in finding a longest strin...
research
12/28/2017

On the Decision Tree Complexity of String Matching

String matching is one of the most fundamental problems in computer scie...
research
10/26/2018

Efficient learning of neighbor representations for boundary trees and forests

We introduce a semiparametric approach to neighbor-based classification....
research
04/07/2021

Accurate and Efficient Suffix Tree Based Privacy-Preserving String Matching

The task of calculating similarities between strings held by different o...

Please sign up or login with your details

Forgot password? Click here to reset