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 and a text string , find all substrings of which have the same relative orders as . 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 of length and a text tree of size can be solved in time if the characters of are drawn from an integer alphabet of polynomial size. The time complexity becomes if the pattern is over a general ordered alphabet. We then show that the OPPM problem for a single pattern and a text DAG is NP-complete.
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}
}