Cartesian tree matching and indexing

Sung Gwan Park, Amihood Amir, Gad M. Landau, Kunsoo Park

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

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 languageEnglish
Title of host publication30th Annual Symposium on Combinatorial Pattern Matching, CPM 2019
EditorsNadia Pisanti, Solon P. Pissis
PublisherSchloss Dagstuhl- Leibniz-Zentrum fur Informatik GmbH, Dagstuhl Publishing
Pages16:1-16:14
ISBN (Electronic)9783959771030
DOIs
StatePublished - 1 Jun 2019
Event30th Annual Symposium on Combinatorial Pattern Matching, CPM 2019 - Pisa, Italy
Duration: 18 Jun 201920 Jun 2019

Publication series

NameLeibniz International Proceedings in Informatics, LIPIcs
Volume128
ISSN (Print)1868-8969

Conference

Conference30th Annual Symposium on Combinatorial Pattern Matching, CPM 2019
Country/TerritoryItaly
CityPisa
Period18/06/1920/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

Fingerprint

Dive into the research topics of 'Cartesian tree matching and indexing'. Together they form a unique fingerprint.

Cite this