Fast Cartesian Tree Matching
Siwoo Song, Cheol Ryu, Simone Faro, Thierry Lecroq, Kunsoo Park

TL;DR
This paper introduces a new framework for Cartesian tree matching that improves efficiency by combining binary filtration, verification techniques, and SIMD solutions, outperforming previous methods.
Contribution
It presents a novel framework integrating filtration and verification, enabling faster Cartesian tree matching with adaptable algorithms including SIMD optimization.
Findings
New binary filtration and verification techniques improve matching speed.
Combining existing string matching algorithms enhances performance.
Experimental results show significant efficiency gains over previous solutions.
Abstract
Cartesian tree matching is the problem of finding all substrings of a given text which have the same Cartesian trees as that of a given pattern. So far there is one linear-time solution for Cartesian tree matching, which is based on the KMP algorithm. We improve the running time of the previous solution by introducing new representations. We present the framework of a binary filtration method and an efficient verification technique for Cartesian tree matching. Any exact string matching algorithm can be used as a filtration for Cartesian tree matching on our framework. We also present a SIMD solution for Cartesian tree matching suitable for short patterns. By experiments we show that known string matching algorithms combined on our framework of binary filtration and efficient verification produce algorithms of good performances for Cartesian tree matching.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAlgorithms and Data Compression · Network Packet Processing and Optimization · Natural Language Processing Techniques
