Skip to main content
QUICK REVIEW

[Paper Review] Right-to-left online construction of parameterized position heaps

Noriki Fujisato, Yuto Nakashima|arXiv (Cornell University)|Aug 3, 2018
Algorithms and Data CompressionComputer Science4 citations
TL;DR

This paper presents a right-to-left online construction algorithm for parameterized position heaps (RL p-position heaps), enabling efficient indexing and pattern matching for parameterized strings. The method constructs the data structure in O(n log(σ+π)) time with O(n) space, supporting parameterized pattern matching queries in O(m log(σ+π) + mπ + pocc) time, matching the efficiency of prior left-to-right approaches while enabling reverse-processing workflows.

ABSTRACT

Two strings of equal length are said to parameterized match if there is a bijection that maps the characters of one string to those of the other string, so that two strings become identical. The parameterized pattern matching problem is, given two strings $T$ and $P$, to find the occurrences of substrings in $T$ that parameterized match $P$. Diptarama et al. [Position Heaps for Parameterized Strings, CPM 2017] proposed an indexing data structure called parameterized position heaps, and gave a left-to-right online construction algorithm. In this paper, we present a right-to-left online construction algorithm for parameterized position heaps. For a text string $T$ of length $n$ over two kinds of alphabets $Σ$ and $Π$ of respective size $σ$ and $π$, our construction algorithm runs in $O(n \log(σ+ π))$ time with $O(n)$ space. Our right-to-left parameterized position heaps support pattern matching queries in $O(m \log (σ+ π) + m π+ \mathit{pocc}))$ time, where $m$ is the length of a query pattern $P$ and $\mathit{pocc}$ is the number of occurrences to report. Our construction and pattern matching algorithms are as efficient as Diptarama et al.'s algorithms.

Motivation & Objective

  • To develop a right-to-left online construction algorithm for parameterized position heaps, complementing existing left-to-right approaches.
  • To maintain the same time and space complexity as prior methods while enabling incremental construction from the end of the text.
  • To support efficient parameterized pattern matching queries using maximal reach pointers in the constructed structure.
  • To extend the applicability of position heap data structures to parameterized string matching with two distinct alphabets (standard and parameterized).

Proposed method

  • Adapts Ehrenfeucht et al.’s right-to-left construction for standard position heaps to the parameterized setting using reversed suffix links.
  • Uses a Weiner-type algorithm to incrementally build the RL p-position heap by processing suffixes in decreasing order of starting index.
  • Leverages forward suffix links (reversals of reversed suffix links) to efficiently compute maximal reach pointers during construction.
  • Employs a labeling scheme for reversed suffix links to maintain correct structure and enable logarithmic-time edge searches.
  • Augments the final structure with maximal reach pointers to support efficient pattern matching queries.
  • Uses a suffix link traversal strategy that ensures O(n) total node visits, each requiring O(log(σ+π)) time for edge lookup.

Experimental results

Research questions

  • RQ1Can a right-to-left online construction algorithm be designed for parameterized position heaps that matches the efficiency of existing left-to-right methods?
  • RQ2What labeling and linking strategies are required to maintain correctness and efficiency when building parameterized position heaps in reverse order?
  • RQ3Can the maximal reach pointer structure be incrementally maintained during right-to-left construction to support fast parameterized pattern matching?
  • RQ4Is it possible to achieve O(n log(σ+π)) construction time and O(n) space for RL p-position heaps over parameterized strings?
  • RQ5Can the resulting data structure support parameterized pattern matching in time comparable to existing solutions?

Key findings

  • The proposed right-to-left construction algorithm runs in O(n log(σ+π)) time and O(n) space for a text string of length n over alphabets of size σ and π.
  • The construction maintains the same time complexity as Diptarama et al.’s left-to-right algorithm, ensuring efficiency parity.
  • The resulting RL p-position heap supports parameterized pattern matching queries in O(m log(σ+π) + mπ + pocc) time, where m is the pattern length and pocc is the number of reported occurrences.
  • The use of forward suffix links and a labeling scheme for reversed suffix links enables efficient incremental construction.
  • The maximal reach pointer computation is integrated into the construction process, ensuring correctness and efficiency with total O(n log(σ+π)) time.
  • The method is extendable to trie-based indexing of multiple parameterized strings, as suggested in future work.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.