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 |
Pages | 16:1-16:14 |
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
Funding Information:Acknowledgements S.G. Park and K. Park were supported by Institute for Information & communications Technology Promotion(IITP) grant funded by the Korea government(MSIT) (No. 2018-0-00551, Framework of Practical Algorithms for NP-hard Graph Problems). A. Amir and G.M. Landau were partially supported by the Israel Science Foundation grant 571/14, and Grant No. 2014028 from the United States-Israel Binational Science Foundation (BSF).
Funding Information:
S.G. Park and K. Park were supported by Institute for Information & communications Technology Promotion(IITP) grant funded by the Korea government(MSIT) (No. 2018-0-00551, Framework of Practical Algorithms for NP-hard Graph Problems). A. Amir and G.M. Landau were partially supported by the Israel Science Foundation grant 571/14, and Grant No. 2014028 from the United States-Israel Binational Science Foundation (BSF).
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