Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
144 tokens/sec
GPT-4o
7 tokens/sec
Gemini 2.5 Pro Pro
45 tokens/sec
o3 Pro
4 tokens/sec
GPT-4.1 Pro
38 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Computing Longest Common Subsequence under Cartesian-Tree Matching Model (2402.19146v3)

Published 29 Feb 2024 in cs.DS

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 can be solved in polynomial time. This current article follows and extends this line of research: We present the first polynomial-time algorithm that finds the longest common subsequence under CT-matching of two given strings $S$ and $T$ of length $n$, in $O(n6)$ time and $O(n4)$ space for general ordered alphabets. We then show that the problem has a faster solution in the binary case, by presenting an $O(n2 / \log n)$-time and space algorithm.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (18)
  1. Tight hardness results for LCS and other sequence similarity measures. In FOCS 2015, pages 59–78, 2015.
  2. Fast linear-space computations of longest common subsequences. Theor. Comput. Sci., 92(1):3–17, 1992.
  3. On economical construction of the transitive closure of a directed graph. Soviet Mathematics Doklady, 11(5):1209–1210, 1970.
  4. Pattern matching for permutations. Inf. Process. Lett., 65(5):277–283, 1998.
  5. K. Bringmann and M. Künnemann. Quadratic conditional lower bounds for string problems and dynamic time warping. In FOCS 2015, pages 79–97, 2015.
  6. Order-preserving indexing. Theor. Comput. Sci., 638:122–135, 2016.
  7. Scaling and related techniques for geometry problems. In STOC 1984, pages 135–143, 1984.
  8. On indeterminate strings matching. In CPM 2020, volume 161 of LIPIcs, pages 14:1–14:14, 2020.
  9. Pattern matching in trees. J. ACM, 29(1):68–95, 1982.
  10. A fast algorithm for computing longest common subsequences. Commun. ACM, 20(5):350–353, 1977.
  11. Order-preserving matching. Theor. Comput. Sci., 525:68–79, 2014.
  12. A linear time algorithm for consecutive permutation pattern matching. Inf. Process. Lett., 113(12):430–433, 2013.
  13. A faster algorithm computing string edit distances. J. Comput. Syst. Sci., 20(1):18–31, 1980.
  14. A longest common subsequence algorithm suitable for similar text strings. Acta Inf., 18:171–179, 1982.
  15. Cartesian tree subsequence matching. In CPM 2022, volume 223 of LIPIcs, pages 14:1–14:18, 2022.
  16. Finding patterns and periods in Cartesian tree matching. Theor. Comput. Sci., 845:181–197, 2020.
  17. Y. Sakai. Computing the longest common subsequence of two run-length encoded strings. In ISAAC 2012, pages 197–206, 2012.
  18. Fast algorithms for single and multiple pattern Cartesian tree matching. Theor. Comput. Sci., 849:47–63, 2021.

Summary

We haven't generated a summary for this paper yet.