Subsequence Matching and LCS under Cartesian-Tree Equivalence

Abstract

Two strings of the same length are said to Cartesian-tree match (CT-match) if their Cartesian-trees are isomorphic [Park et al., TCS 2020]. Cartesian-tree matching is a natural model that allows for capturing similarities of numerical sequences. Oizumi et al. [CPM 2022] showed that subsequence pattern matching under CT-matching model (CT-MSeq) can be solved in O(nm n) time, where n and m are text and pattern lengths, respectively. This current article follows this line of research, and gives the following new results: (1) An O(nm)-time CT-MSeq algorithm for binary alphabets; (2) An O((nm)1-ε)-time conditional lower bound for the CT-MSeq problem on alphabets of size 4, for any constant ε > 0, under the Orthogonal Vector Hypothesis (OVH). Further, we introduce the new problem of longest common subsequence under CT-matching (CT-LCS) for two given strings S and T of length n, and present the following results: (3) An O(n6)-time CT-LCS algorithm for general ordered alphabets; (4) An O(n2 / n)-time CT-LCS algorithm for binary alphabets; (5) An O(n2-ε)-time conditional lower bound for the CT-LCS problem on alphabets of size 5, for any constant ε > 0, under OVH.

0

Turn this paper into a lesson

ArcXiv compiles a structured reading guide from this paper's metadata: plain-English importance, contributions, prerequisite concepts, which sections to read first, flashcards, and a quiz. Grounded in the abstract, never invented.

Discussion (0)

Sign in to join the discussion.

Loading comments…