Generalized straight-line programsGeneralized straight-line programsG. Navarro et al.

被引:0
|
作者
Gonzalo Navarro [1 ]
Francisco Olivares [2 ]
Cristian Urbina [1 ]
机构
[1] University of Chile,Department of Computer Science
[2] CeBiB — Centre for Biotechnology and Bioengineering,undefined
关键词
D O I
10.1007/s00236-025-00481-3
中图分类号
学科分类号
摘要
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→x\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$A \rightarrow x$$\end{document} 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→Πi=k1k2B1ic1⋯Btict\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$A \rightarrow \Pi _{i=k_1}^{k_2} B_1^{i^{c_1}}\cdots B_t^{i^{c_t}}$$\end{document} of size O(t)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal {O}(t)$$\end{document}. We prove that ISLPs break, for some text families, the measure δ\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\delta $$\end{document} based on substring complexity, a lower bound for most measures and compressors exploiting repetitiveness. Further, ISLPs can extract any substring of length λ\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\lambda $$\end{document}, from the represented text T[1..n]\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$T[1\mathinner {.\,.}n]$$\end{document}, in time O(λ+log2nloglogn)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal {O}(\lambda + \log ^2 n\log \log n)$$\end{document}. This is the first compressed representation for repetitive texts breaking δ\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\delta $$\end{document} 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 O(log2nloglogn)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal {O}(\log ^2 n \log \log n)$$\end{document}. Finally, we further specialize the grammars to run-length SLPs (RLSLPs), which restrict the rules allowed by ISLPs to the form A→Bt\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$A \rightarrow B^t$$\end{document}. Apart from inheriting all the previous results with the term log2nloglogn\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\log ^2 n \log \log n$$\end{document} reduced to the near-optimal logn\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\log n$$\end{document}, we show that RLSLPs can exploit balancedness to efficiently compute a wide class of substring queries we call “composable”—i.e., f(X·Y)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$f(X \cdot Y)$$\end{document} can be obtained from f(X) and f(Y). As an example, we show how to compute Karp-Rabin fingerprints of texts substrings in O(logn)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal {O}(\log n)$$\end{document} 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.
引用
收藏
相关论文
共 50 条
  • [1] Generalized straight-line programs
    Navarro, Gonzalo
    Olivares, Francisco
    Urbina, Cristian
    ACTA INFORMATICA, 2025, 62 (01)
  • [2] THERE IS NO STRAIGHT-LINE
    HARVEY, J
    EDUCATION AND TRAINING IN MENTAL RETARDATION AND DEVELOPMENTAL DISABILITIES, 1977, 12 (04): : 402 - 405
  • [3] A STRAIGHT-LINE
    ZIRKEL, PA
    PHI DELTA KAPPAN, 1993, 74 (08) : 658 - 660
  • [4] A STRAIGHT-LINE INTO THE TEXTBOOKS
    SIMPSON, MJ
    NEW SCIENTIST, 1990, 128 (1747) : 59 - 60
  • [5] STRAIGHT-LINE CITY
    不详
    NATURE, 1991, 353 (6342) : 286 - 286
  • [6] Straight-line access
    Rybicki, RM
    Heuer, MA
    JOURNAL OF THE AMERICAN DENTAL ASSOCIATION, 1999, 130 (04): : 470 - 470
  • [7] Straight-line stabilization
    Mao, JM
    Liu, ZR
    Ling, Y
    PHYSICAL REVIEW E, 2000, 62 (04): : 4846 - 4849
  • [8] STRAIGHT-LINE HYDRAULICS
    SUTTON, RD
    FIRE ENGINEERING, 1984, 137 (04) : 30 - &
  • [9] A STRAIGHT-LINE TO SUCCESS
    REGALADO, A
    SCIENCE, 1994, 266 (5188) : 1180 - 1180
  • [10] LATTICE PARTITIONS WITH A STRAIGHT-LINE
    BROWNRIGG, DRK
    CANADIAN MATHEMATICAL BULLETIN-BULLETIN CANADIEN DE MATHEMATIQUES, 1986, 29 (03): : 287 - 294