English

The Parameterized Position Heap of a Trie

Data Structures and Algorithms 2019-03-18 v1

Abstract

Let Σ\Sigma and Π\Pi be disjoint alphabets of respective size σ\sigma and π\pi. Two strings over ΣΠ\Sigma \cup \Pi of equal length are said to parameterized match (p-match) if there is a bijection f:ΣΠΣΠf:\Sigma \cup \Pi \rightarrow \Sigma \cup \Pi such that (1) ff is identity on Σ\Sigma and (2) ff maps the characters of one string to those of the other string so that the two strings become identical. We consider the p-matching problem on a (reversed) trie T\mathcal{T} and a string pattern PP such that every path that p-matches PP has to be reported. Let NN be the size of the given trie T\mathcal{T}. In this paper, we propose the parameterized position heap for T\mathcal{T} that occupies O(N)O(N) space and supports p-matching queries in O(mlog(σ+π)+mπ+pocc))O(m \log (\sigma + \pi) + m \pi + \mathit{pocc})) time, where mm is the length of a query pattern PP and pocc\mathit{pocc} is the number of paths in T\mathcal{T} to report. We also present an algorithm which constructs the parameterized position heap for a given trie T\mathcal{T} in O(N(σ+π))O(N (\sigma + \pi)) time and working space.

Keywords

Cite

@article{arxiv.1903.06289,
  title  = {The Parameterized Position Heap of a Trie},
  author = {Noriki Fujisato and Yuto Nakashima and Shunsuke Inenaga and Hideo Bannai and Masayuki Takeda},
  journal= {arXiv preprint arXiv:1903.06289},
  year   = {2019}
}
R2 v1 2026-06-23T08:08:46.248Z