Table of Contents
Fetching ...

Dynamic direct (ranked) access of MSO query evaluation over SLP-compressed strings

Martín Muñoz

Abstract

We present an algorithm that, given an index $t$, produces the $t$-th (lexicographically ordered) answer of an MSO query over a string. The algorithm requires linear-time preprocessing, and builds a data structure that answers each of these calls in logarithmic time. We then show how to extend this algorithm for a string that is compressed by a straight-line program (SLP), also with linear-time preprocessing in the (compressed encoding of the) string, and maintaining direct access in logtime of the original string. Lastly, we extend the algorithm by allowing complex edits on the SLP after the direct-access data structure has been processsed, which are translated into the data structure in logtime. We do this by adapting a document editing framework introduced by Schmid and Schweikardt (PODS 2022). This work improves on a recent result of dynamic direct access of MSO queries over strings (Bourhis et. al., ICDT 2025) by a log-factor on the access procedure, and by extending the results to SLPs.

Dynamic direct (ranked) access of MSO query evaluation over SLP-compressed strings

Abstract

We present an algorithm that, given an index , produces the -th (lexicographically ordered) answer of an MSO query over a string. The algorithm requires linear-time preprocessing, and builds a data structure that answers each of these calls in logarithmic time. We then show how to extend this algorithm for a string that is compressed by a straight-line program (SLP), also with linear-time preprocessing in the (compressed encoding of the) string, and maintaining direct access in logtime of the original string. Lastly, we extend the algorithm by allowing complex edits on the SLP after the direct-access data structure has been processsed, which are translated into the data structure in logtime. We do this by adapting a document editing framework introduced by Schmid and Schweikardt (PODS 2022). This work improves on a recent result of dynamic direct access of MSO queries over strings (Bourhis et. al., ICDT 2025) by a log-factor on the access procedure, and by extending the results to SLPs.
Paper Structure (34 sections, 8 theorems, 8 equations, 4 figures, 6 algorithms)

This paper contains 34 sections, 8 theorems, 8 equations, 4 figures, 6 algorithms.

Key Result

Theorem 1

Fix a set of variables $X$. Let $\mathcal{A}$ be an unambiguous vset automata and let $w\in\Sigma^*$.

Figures (4)

  • Figure 1: (left) The running example $\mathcal{A}^{\sf ex}$ illustrated by the automaton, and (right) the list of mappings in ${\llbracket\mathcal{A}^{\sf ex}\rrbracket}(w_0)$ for string $w_0= {\sf abababcab}$.
  • Figure 2: The transition matrices for $\mathcal{A}^{\sf ex}$ after being restricted by different sets $Y\subseteq X$. The bold blue values highlight the only differences of a matrix with the one above
  • Figure 3: The trees $\mathbb{T}_0 = \mathbb{T}_{\{x_1,x_2\}}$ (on the left) and $\mathbb{T}_1 = \mathbb{T}_{\{x_2\}}$ built from $\mathcal{A}^{\sf ex}$.
  • Figure 4: (left) The matrices as set in $\mathbb{D}_0$; (right) in gray and black, the matrices as set in $\mathbb{D}_1$, and in blue, the new matrices after performing $\textsc{Update}(\mathbb{D}_1, x\mapsto 3)$.

Theorems & Definitions (8)

  • Theorem 1
  • Lemma 2
  • Lemma 3
  • Lemma 4
  • Lemma 5
  • Theorem 6
  • Theorem 7: slpbalancing
  • Theorem 8