Generalized straight-line programs

IF 0.4 4区 计算机科学 Q4 COMPUTER SCIENCE, INFORMATION SYSTEMS
Gonzalo Navarro, Francisco Olivares, Cristian Urbina
{"title":"Generalized straight-line programs","authors":"Gonzalo Navarro,&nbsp;Francisco Olivares,&nbsp;Cristian Urbina","doi":"10.1007/s00236-025-00481-3","DOIUrl":null,"url":null,"abstract":"<div><p>It was recently proved that any straight-line program (SLP) generating a given string can be transformed in linear time into an equivalent balanced SLP of the same asymptotic size. We generalize this proof to a general class of grammars we call generalized SLPs (GSLPs), which allow rules of the form <span>\\(A \\rightarrow x\\)</span> where <i>x</i> is any Turing-complete representation (of size |<i>x</i>|) of a sequence of symbols (potentially much longer than |<i>x</i>|). We then specialize GSLPs to so-called Iterated SLPs (ISLPs), which allow rules of the form <span>\\(A \\rightarrow \\Pi _{i=k_1}^{k_2} B_1^{i^{c_1}}\\cdots B_t^{i^{c_t}}\\)</span> of size <span>\\(\\mathcal {O}(t)\\)</span>. We prove that ISLPs break, for some text families, the measure <span>\\(\\delta \\)</span> based on substring complexity, a lower bound for most measures and compressors exploiting repetitiveness. Further, ISLPs can extract any substring of length <span>\\(\\lambda \\)</span>, from the represented text <span>\\(T[1\\mathinner {.\\,.}n]\\)</span>, in time <span>\\(\\mathcal {O}(\\lambda + \\log ^2 n\\log \\log n)\\)</span>. This is the first compressed representation for repetitive texts breaking <span>\\(\\delta \\)</span> while, at the same time, supporting direct access to arbitrary text symbols in polylogarithmic time. We also show how to compute some substring queries, like range minima and next/previous smaller value, in time <span>\\(\\mathcal {O}(\\log ^2 n \\log \\log n)\\)</span>. Finally, we further specialize the grammars to run-length SLPs (RLSLPs), which restrict the rules allowed by ISLPs to the form <span>\\(A \\rightarrow B^t\\)</span>. Apart from inheriting all the previous results with the term <span>\\(\\log ^2 n \\log \\log n\\)</span> reduced to the near-optimal <span>\\(\\log n\\)</span>, we show that RLSLPs can exploit balancedness to efficiently compute a wide class of substring queries we call “composable”—i.e., <span>\\(f(X \\cdot Y)\\)</span> can be obtained from <i>f</i>(<i>X</i>) and <i>f</i>(<i>Y</i>). As an example, we show how to compute Karp-Rabin fingerprints of texts substrings in <span>\\(\\mathcal {O}(\\log n)\\)</span> time. While the results on RLSLPs were already known, ours are much simpler and require little precomputation time and extra data associated with the grammar.</p></div>","PeriodicalId":7189,"journal":{"name":"Acta Informatica","volume":"62 1","pages":""},"PeriodicalIF":0.4000,"publicationDate":"2025-02-13","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Acta Informatica","FirstCategoryId":"94","ListUrlMain":"https://link.springer.com/article/10.1007/s00236-025-00481-3","RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q4","JCRName":"COMPUTER SCIENCE, INFORMATION SYSTEMS","Score":null,"Total":0}
引用次数: 0

Abstract

It was recently proved that any straight-line program (SLP) generating a given string can be transformed in linear time into an equivalent balanced SLP of the same asymptotic size. We generalize this proof to a general class of grammars we call generalized SLPs (GSLPs), which allow rules of the form \(A \rightarrow x\) where x is any Turing-complete representation (of size |x|) of a sequence of symbols (potentially much longer than |x|). We then specialize GSLPs to so-called Iterated SLPs (ISLPs), which allow rules of the form \(A \rightarrow \Pi _{i=k_1}^{k_2} B_1^{i^{c_1}}\cdots B_t^{i^{c_t}}\) of size \(\mathcal {O}(t)\). We prove that ISLPs break, for some text families, the measure \(\delta \) based on substring complexity, a lower bound for most measures and compressors exploiting repetitiveness. Further, ISLPs can extract any substring of length \(\lambda \), from the represented text \(T[1\mathinner {.\,.}n]\), in time \(\mathcal {O}(\lambda + \log ^2 n\log \log n)\). This is the first compressed representation for repetitive texts breaking \(\delta \) while, at the same time, supporting direct access to arbitrary text symbols in polylogarithmic time. We also show how to compute some substring queries, like range minima and next/previous smaller value, in time \(\mathcal {O}(\log ^2 n \log \log n)\). Finally, we further specialize the grammars to run-length SLPs (RLSLPs), which restrict the rules allowed by ISLPs to the form \(A \rightarrow B^t\). Apart from inheriting all the previous results with the term \(\log ^2 n \log \log n\) reduced to the near-optimal \(\log n\), we show that RLSLPs can exploit balancedness to efficiently compute a wide class of substring queries we call “composable”—i.e., \(f(X \cdot Y)\) can be obtained from f(X) and f(Y). As an example, we show how to compute Karp-Rabin fingerprints of texts substrings in \(\mathcal {O}(\log n)\) time. While the results on RLSLPs were already known, ours are much simpler and require little precomputation time and extra data associated with the grammar.

Abstract Image

广义直线规划
最近证明了产生给定字符串的任何直线规划(SLP)都可以在线性时间内转化为具有相同渐近大小的等价平衡SLP。我们将这个证明推广到我们称为广义slp (gslp)的一般语法类,它允许形式为\(A \rightarrow x\)的规则,其中x是符号序列(可能比|x|长得多)的任何图灵完全表示(大小为|x|)。然后,我们将gslp专一化为所谓的迭代slp (islp),它允许大小为\(\mathcal {O}(t)\)的形式\(A \rightarrow \Pi _{i=k_1}^{k_2} B_1^{i^{c_1}}\cdots B_t^{i^{c_t}}\)的规则。我们证明,对于某些文本族,islp打破了基于子字符串复杂性的度量\(\delta \),大多数度量和利用重复的压缩器的下界。此外,islp可以及时从表示的文本\(T[1\mathinner {.\,.}n]\)中提取长度为\(\lambda \)的任何子字符串\(\mathcal {O}(\lambda + \log ^2 n\log \log n)\)。这是重复文本中断\(\delta \)的第一个压缩表示,同时支持在多对数时间内直接访问任意文本符号。我们还展示了如何计算一些子字符串查询,如范围最小值和下一个/前一个较小的值,在时间\(\mathcal {O}(\log ^2 n \log \log n)\)。最后,我们进一步将语法专门化到运行长度的slp (rlslp),它将islp允许的规则限制为\(A \rightarrow B^t\)的形式。除了继承之前所有的结果,将\(\log ^2 n \log \log n\)降为接近最优的\(\log n\)之外,我们还表明rlslp可以利用平衡性来有效地计算我们称之为“可组合”的子类查询。,由f(X)和f(Y)可得\(f(X \cdot Y)\)。作为一个例子,我们展示了如何在\(\mathcal {O}(\log n)\)时间内计算文本子字符串的Karp-Rabin指纹。虽然rlslp的结果已经已知,但我们的结果要简单得多,只需要很少的预计算时间和与语法相关的额外数据。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
Acta Informatica
Acta Informatica 工程技术-计算机:信息系统
CiteScore
2.40
自引率
16.70%
发文量
24
审稿时长
>12 weeks
期刊介绍: Acta Informatica provides international dissemination of articles on formal methods for the design and analysis of programs, computing systems and information structures, as well as related fields of Theoretical Computer Science such as Automata Theory, Logic in Computer Science, and Algorithmics. Topics of interest include: • semantics of programming languages • models and modeling languages for concurrent, distributed, reactive and mobile systems • models and modeling languages for timed, hybrid and probabilistic systems • specification, program analysis and verification • model checking and theorem proving • modal, temporal, first- and higher-order logics, and their variants • constraint logic, SAT/SMT-solving techniques • theoretical aspects of databases, semi-structured data and finite model theory • theoretical aspects of artificial intelligence, knowledge representation, description logic • automata theory, formal languages, term and graph rewriting • game-based models, synthesis • type theory, typed calculi • algebraic, coalgebraic and categorical methods • formal aspects of performance, dependability and reliability analysis • foundations of information and network security • parallel, distributed and randomized algorithms • design and analysis of algorithms • foundations of network and communication protocols.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信