Balancing Run-Length Straight-Line Programs*

06/27/2022
by   Gonzalo Navarro, et al.
0

It was recently proved that any SLP generating a given string w can be transformed in linear time into an equivalent balanced SLP of the same asymptotic size. We show that this result also holds for RLSLPs, which are SLPs extended with run-length rules of the form A → B^t for t>2, deriving (A) = (B)^t. An immediate consequence is the simplification of the algorithm for extracting substrings of an RLSLP-compressed string. We also show that several problems like answering RMQs and computing Karp-Rabin fingerprints on substrings can be solved in 𝒪(g_rl) space and 𝒪(log n) time, g_rl being the size of the smallest RLSLP generating the string, of length n. We extend the result to solving more general operations on string ranges, in 𝒪(g_rl) space and 𝒪(log n) applications of the operation. In general, the smallest RLSLP can be asymptotically smaller than the smallest SLP by up to an 𝒪(log n) factor, so our results can make a difference in terms of the space needed for computing these operations efficiently for some string families.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/01/2021

Compression by Contracting Straight-Line Programs

In grammar-based compression a string is represented by a context-free g...
research
04/19/2021

A Separation of γ and b via Thue–Morse Words

We prove that for n≥ 2, the size b(t_n) of the smallest bidirectional sc...
research
12/12/2020

String Attractors for Automatic Sequences

We show that it is decidable, given an automatic sequence s and a consta...
research
12/20/2021

String Sampling with Bidirectional String Anchors

The minimizers sampling mechanism is a popular mechanism for string samp...
research
07/05/2023

Compressibility measures for two-dimensional data

In this paper we extend to two-dimensional data two recently introduced ...
research
07/06/2022

Computing NP-hard Repetitiveness Measures via MAX-SAT

Repetitiveness measures reveal profound characteristics of datasets, and...
research
10/31/2021

Computing Matching Statistics on Repetitive Texts

Computing the matching statistics of a string P[1..m] with respect to a ...

Please sign up or login with your details

Forgot password? Click here to reset