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

求助全文
约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学术官方微信