Abstract
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.
Original language | English |
---|---|
Title of host publication | 30th Annual Symposium on Combinatorial Pattern Matching, CPM 2019 |
Editors | Nadia Pisanti, Solon P. Pissis |
Publisher | Schloss Dagstuhl- Leibniz-Zentrum fur Informatik GmbH, Dagstuhl Publishing |
ISBN (Electronic) | 9783959771030 |
DOIs | |
State | Published - 1 Jun 2019 |
Event | 30th Annual Symposium on Combinatorial Pattern Matching, CPM 2019 - Pisa, Italy Duration: 18 Jun 2019 → 20 Jun 2019 |
Publication series
Name | Leibniz International Proceedings in Informatics, LIPIcs |
---|---|
Volume | 128 |
ISSN (Print) | 1868-8969 |
Conference
Conference | 30th Annual Symposium on Combinatorial Pattern Matching, CPM 2019 |
---|---|
Country/Territory | Italy |
City | Pisa |
Period | 18/06/19 → 20/06/19 |
Bibliographical note
Publisher Copyright:© Sung Gwan Park, Amihood Amir, Gad M. Landau, and Kunsoo Park.
Keywords
- Cartesian tree matching
- Indexing
- Parent-distance representation
- Pattern matching
ASJC Scopus subject areas
- Software