Order-preserving matching

Jinil Kim, Peter Eades, Rudolf Fleischer, Seok-Hee Hong, Costas S. Iliopoulos, Kunsoo Park*, Simon J. Puglisi, Takeshi Tokuyama

*Corresponding author for this work

Research output: Contribution to journalArticlepeer-review

79 Citations (Scopus)

Abstract

We introduce a new string matching problem called order-preserving matching on numeric strings, where a pattern matches a text if the text contains a substring of values whose relative orders coincide with those of the pattern. Order-preserving matching is applicable to many scenarios such as stock price analysis and musical melody matching in which the order relations should be matched instead of the strings themselves. Solving order-preserving matching is closely related to the representation of order relations of a numeric string. We define the prefix representation and the nearest neighbor representation of the pattern, both of which lead to efficient algorithms for order-preserving matching. We present efficient algorithms for single and multiple pattern cases. For the single pattern case, we give an O(n logm) time algorithm and optimize it further to obtain O(n+m logm) time. For the multiple pattern case, we give an O(n logm) time algorithm.
Original languageEnglish
Pages (from-to)68-79
Number of pages12
JournalTheoretical Computer Science
Volume525
DOIs
Publication statusPublished - 13 Mar 2014

Keywords

  • String matching
  • Numeric string
  • Order relation
  • Multiple pattern matching
  • KMP algorithm
  • Aho-Corasick algorithm
  • APPROXIMATE
  • ALGORITHMS
  • DELTA

Fingerprint

Dive into the research topics of 'Order-preserving matching'. Together they form a unique fingerprint.

Cite this