# The Parameterized Position Heap of a Trie

**Authors:** Noriki Fujisato, Yuto Nakashima, Shunsuke Inenaga, Hideo Bannai,, Masayuki Takeda

arXiv: 1903.06289 · 2019-03-18

## TL;DR

This paper introduces a parameterized position heap data structure for tries that efficiently supports p-matching queries, enabling effective pattern matching with bijections on disjoint alphabets.

## Contribution

It proposes a space-efficient data structure and an algorithm for constructing it, specifically designed for parameterized pattern matching on tries.

## Key findings

- Supports p-matching queries in O(m log (σ + π) + m π + pocc) time.
- Uses O(N) space for the data structure.
- Construction algorithm runs in O(N (σ + π)) time.

## 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:\Sigma \cup \Pi \rightarrow \Sigma \cup \Pi$ such that (1) $f$ is identity on $\Sigma$ and (2) $f$ 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 $\mathcal{T}$ and a string pattern $P$ such that every path that p-matches $P$ has to be reported. Let $N$ be the size of the given trie $\mathcal{T}$. In this paper, we propose the parameterized position heap for $\mathcal{T}$ that occupies $O(N)$ space and supports p-matching queries in $O(m \log (\sigma + \pi) + m \pi + \mathit{pocc}))$ time, where $m$ is the length of a query pattern $P$ and $\mathit{pocc}$ is the number of paths in $\mathcal{T}$ to report. We also present an algorithm which constructs the parameterized position heap for a given trie $\mathcal{T}$ in $O(N (\sigma + \pi))$ time and working space.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1903.06289/full.md

## Figures

4 figures with captions in the complete paper: https://tomesphere.com/paper/1903.06289/full.md

## References

17 references — full list in the complete paper: https://tomesphere.com/paper/1903.06289/full.md

---
Source: https://tomesphere.com/paper/1903.06289