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
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

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