Table of Contents
Fetching ...

Improved Circular Dictionary Matching

Nicola Cotumaccio

TL;DR

This work addresses circular dictionary matching for arbitrary dictionaries, extending the eBWT/F M-index framework to a dictionary setting. It introduces a dictionary-oriented suffix structure, including a sampled suffix array and LCP sampling, and a graph-based interpretation that enables efficient backward/forward navigation through the dictionary suffix tree. The main result is a compressed-space data structure using $n \log \sigma (1 + o(1)) + O(n) + O(d \log n)$ bits that answers queries in $O((m + occ) \log n)$ time, where $n$ is the total dictionary length, $m$ is the pattern length, and $occ$ the number of occurrences; a faster bound is discussed for large $occ$. The approach uses a dictionary extension of suffix arrays, LCP sampling, and a suffix-tree topology over a dictionary, enabling efficient matching statistics and query processing. These results broaden the applicability of compressed pattern matching to general dictionaries, with potential impact on bioinformatics and geometric string processing, and pave the way for linear-time construction in a companion work.

Abstract

The circular dictionary matching problem is an extension of the classical dictionary matching problem where every string in the dictionary is interpreted as a circular string: after reading the last character of a string, we can move back to its first character. The circular dictionary matching problem is motivated by applications in bioinformatics and computational geometry. In 2011, Hon et al. [ISAAC 2011] showed how to efficiently solve circular dictionary matching queries within compressed space by building on Mantaci et al.'s eBWT and Sadakane's compressed suffix tree. The proposed solution is based on the assumption that the strings in the dictionary are all distinct and non-periodic, no string is a circular rotation of some other string, and the strings in the dictionary have similar lengths. In this paper, we consider arbitrary dictionaries, and we show how to solve circular dictionary matching queries in $ O((m + occ) \log n) $ time within compressed space using $ n \log σ(1 + o(1)) + O(n) + O(d \log n) $ bits, where $ n $ is the total length of the dictionary, $ m $ is the length of the pattern, $ occ $ is the number of occurrences, $ d $ is the number of strings in the dictionary and $ σ$ is the size of the alphabet. Our solution is based on an extension of the suffix array to arbitrary dictionaries and a sampling mechanism for the LCP array of a dictionary inspired by recent results in graph indexing and compression.

Improved Circular Dictionary Matching

TL;DR

This work addresses circular dictionary matching for arbitrary dictionaries, extending the eBWT/F M-index framework to a dictionary setting. It introduces a dictionary-oriented suffix structure, including a sampled suffix array and LCP sampling, and a graph-based interpretation that enables efficient backward/forward navigation through the dictionary suffix tree. The main result is a compressed-space data structure using bits that answers queries in time, where is the total dictionary length, is the pattern length, and the number of occurrences; a faster bound is discussed for large . The approach uses a dictionary extension of suffix arrays, LCP sampling, and a suffix-tree topology over a dictionary, enabling efficient matching statistics and query processing. These results broaden the applicability of compressed pattern matching to general dictionaries, with potential impact on bioinformatics and geometric string processing, and pave the way for linear-time construction in a companion work.

Abstract

The circular dictionary matching problem is an extension of the classical dictionary matching problem where every string in the dictionary is interpreted as a circular string: after reading the last character of a string, we can move back to its first character. The circular dictionary matching problem is motivated by applications in bioinformatics and computational geometry. In 2011, Hon et al. [ISAAC 2011] showed how to efficiently solve circular dictionary matching queries within compressed space by building on Mantaci et al.'s eBWT and Sadakane's compressed suffix tree. The proposed solution is based on the assumption that the strings in the dictionary are all distinct and non-periodic, no string is a circular rotation of some other string, and the strings in the dictionary have similar lengths. In this paper, we consider arbitrary dictionaries, and we show how to solve circular dictionary matching queries in time within compressed space using bits, where is the total length of the dictionary, is the length of the pattern, is the number of occurrences, is the number of strings in the dictionary and is the size of the alphabet. Our solution is based on an extension of the suffix array to arbitrary dictionaries and a sampling mechanism for the LCP array of a dictionary inspired by recent results in graph indexing and compression.

Paper Structure

This paper contains 17 sections, 30 theorems, 2 equations, 6 figures.

Key Result

Theorem 1

Let $\mathcal{T} = (T_1, T_2, \dots, T_d)$ be a dictionary of total length $n$. Then, $\mathcal{T}$ can be encoded using a data structure of $n \log \sigma (1 + o(1)) + O(n) + O(d \log n)$ bits such that, given a string $P$ of length $m$, we can compute $\mathsf{Cdm}(\mathcal{T}, P)$ in $O((m + occ)

Figures (6)

  • Figure 1: Consider the dictionary $\mathcal{T} = (abcabc, bcabc, cab)$, our running example. In (b), the strings $\mathcal{S}_j$'s are sorted lexicographically, and every block identifies strings $T_k$'s that correspond to the same $\mathcal{S}_j$. Each string $T_k$ is the orange prefix of $\mathcal{S}_j$. For example, we have $4 \in D_1$, $\mathcal{T}_4 = abcabc$ and $\mathcal{S}_1 = (abc)^\omega$.
  • Figure 2: The graph $G_\mathcal{T}$ for the dictionary $\mathcal{T} = (abcabc, bcabc, cab)$ of Figure \ref{['fig:referencetobothmain']}.
  • Figure 3: The compressed suffix array of the dictionary $\mathcal{T} = (abcabc, bcabc, cab)$ in Figure \ref{['fig:referencetobothmain']}. We use the sampling factor $s = 2$.
  • Figure 4: The LCP array of the dictionary $\mathcal{T} = (abcabc, bcabc, cab)$ in Figure \ref{['fig:referencetobothmain']}. We use the sampling factor $s = 2$. The graph in (b) is the graph $Q$ used to determine which values will be sampled. Yellow nodes are the sampled nodes.
  • Figure 5: (a) The suffix tree $\mathsf{Suff}(\mathcal{T})$ of the dictionary $\mathcal{T} = (abcabc, bcabc, cab)$ in Figure \ref{['fig:referencetobothmain']}. Marked nodes are orange. (b) The tree $\mathsf{Suff}^* (\mathcal{T})$. (c) The bit arrays to navigate $\mathsf{Suff}(\mathcal{T})$ and $\mathsf{Suff}^* (\mathcal{T})$. The first row compactly includes all indexes $t$ from $1$ to $28$.
  • ...and 1 more figures

Theorems & Definitions (40)

  • Theorem 1
  • Lemma 2
  • Definition 3
  • Lemma 4
  • Lemma 5
  • Definition 6
  • Lemma 7
  • Definition 8
  • Theorem 9
  • Theorem 10
  • ...and 30 more