English

Order preserving pattern matching on trees and DAGs

Data Structures and Algorithms 2017-07-26 v2

Abstract

The order preserving pattern matching (OPPM) problem is, given a pattern string pp and a text string tt, find all substrings of tt which have the same relative orders as pp. In this paper, we consider two variants of the OPPM problem where a set of text strings is given as a tree or a DAG. We show that the OPPM problem for a single pattern pp of length mm and a text tree TT of size NN can be solved in O(m+N)O(m+N) time if the characters of pp are drawn from an integer alphabet of polynomial size. The time complexity becomes O(mlogm+N)O(m \log m + N) if the pattern pp is over a general ordered alphabet. We then show that the OPPM problem for a single pattern and a text DAG is NP-complete.

Keywords

Cite

@article{arxiv.1706.00148,
  title  = {Order preserving pattern matching on trees and DAGs},
  author = {Temma Nakamura and Shunsuke Inenaga and Hideo Bannai and Masayuki Takeda},
  journal= {arXiv preprint arXiv:1706.00148},
  year   = {2017}
}
R2 v1 2026-06-22T20:05:44.213Z