Linear time online algorithms for constructing linear-size suffix trie

IF 0.9 4区 计算机科学 Q3 COMPUTER SCIENCE, THEORY & METHODS Theoretical Computer Science Pub Date : 2024-08-06 DOI:10.1016/j.tcs.2024.114765
{"title":"Linear time online algorithms for constructing linear-size suffix trie","authors":"","doi":"10.1016/j.tcs.2024.114765","DOIUrl":null,"url":null,"abstract":"<div><p>The suffix trees are fundamental data structures for various kinds of string processing. The suffix tree of a text string <em>T</em> of length <em>n</em> has <span><math><mi>O</mi><mo>(</mo><mi>n</mi><mo>)</mo></math></span> nodes and edges, and the string label of each edge is encoded by a pair of positions in <em>T</em>. Thus, even after the tree is built, the input string <em>T</em> needs to be kept stored and random access to <em>T</em> is still needed. The <em>linear-size suffix tries</em> (<em>LSTs</em>), proposed by Crochemore et al. [Linear-size suffix tries, TCS 638:171-178, 2016], are a “stand-alone” alternative to the suffix trees. Namely, the LST of an input text string <em>T</em> of length <em>n</em> occupies <span><math><mi>O</mi><mo>(</mo><mi>n</mi><mo>)</mo></math></span> total space, and supports pattern matching and other tasks with the same efficiency as the suffix tree without the need to store the input text string <em>T</em>. Crochemore et al. proposed an <em>offline</em> algorithm which transforms the suffix tree of <em>T</em> into the LST of <em>T</em> in <span><math><mi>O</mi><mo>(</mo><mi>n</mi><mi>log</mi><mo>⁡</mo><mi>σ</mi><mo>)</mo></math></span> time and <span><math><mi>O</mi><mo>(</mo><mi>n</mi><mo>)</mo></math></span> space, where <em>σ</em> is the alphabet size. In this paper, we present two types of <em>online</em> algorithms which “directly” construct the LST, from right to left, and from left to right, without constructing the suffix tree as an intermediate structure. Both algorithms construct the LST incrementally when a new symbol is read, and do not access the previously read symbols. Both of the right-to-left construction algorithm and the left-to-right construction algorithm work in <span><math><mi>O</mi><mo>(</mo><mi>n</mi><mi>log</mi><mo>⁡</mo><mi>σ</mi><mo>)</mo></math></span> time and <span><math><mi>O</mi><mo>(</mo><mi>n</mi><mo>)</mo></math></span> space. The main feature of our algorithms is that the input text string does not need to be stored.</p></div>","PeriodicalId":49438,"journal":{"name":"Theoretical Computer Science","volume":null,"pages":null},"PeriodicalIF":0.9000,"publicationDate":"2024-08-06","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Theoretical Computer Science","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0304397524003827","RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, THEORY & METHODS","Score":null,"Total":0}
引用次数: 0

Abstract

The suffix trees are fundamental data structures for various kinds of string processing. The suffix tree of a text string T of length n has O(n) nodes and edges, and the string label of each edge is encoded by a pair of positions in T. Thus, even after the tree is built, the input string T needs to be kept stored and random access to T is still needed. The linear-size suffix tries (LSTs), proposed by Crochemore et al. [Linear-size suffix tries, TCS 638:171-178, 2016], are a “stand-alone” alternative to the suffix trees. Namely, the LST of an input text string T of length n occupies O(n) total space, and supports pattern matching and other tasks with the same efficiency as the suffix tree without the need to store the input text string T. Crochemore et al. proposed an offline algorithm which transforms the suffix tree of T into the LST of T in O(nlogσ) time and O(n) space, where σ is the alphabet size. In this paper, we present two types of online algorithms which “directly” construct the LST, from right to left, and from left to right, without constructing the suffix tree as an intermediate structure. Both algorithms construct the LST incrementally when a new symbol is read, and do not access the previously read symbols. Both of the right-to-left construction algorithm and the left-to-right construction algorithm work in O(nlogσ) time and O(n) space. The main feature of our algorithms is that the input text string does not need to be stored.

查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
构建线性大小后缀三元组的线性时间在线算法
后缀树是各种字符串处理的基本数据结构。长度为 n 的文本字符串 T 的后缀树有 O(n) 个节点和边,每条边的字符串标签由 T 中的一对位置编码。Crochemore 等人提出的线性大小后缀尝试(LST)[Linear-size suffix tries, TCS 638:171-178, 2016]是后缀树的 "独立 "替代品。Crochemore 等人提出了一种离线算法,可以在 O(nlogσ) 时间和 O(n) 空间内将 T 的后缀树转化为 T 的 LST,其中 σ 是字母表大小。本文提出了两种在线算法,分别从右向左和从左向右 "直接 "构建 LST,而不将后缀树作为中间结构。这两种算法都是在读取新符号时增量构建 LST,而不访问之前读取的符号。从右到左构建算法和从左到右构建算法的工作时间和空间分别为 O(nlogσ) 和 O(n)。我们算法的主要特点是无需存储输入文本字符串。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
Theoretical Computer Science
Theoretical Computer Science 工程技术-计算机:理论方法
CiteScore
2.60
自引率
18.20%
发文量
471
审稿时长
12.6 months
期刊介绍: Theoretical Computer Science is mathematical and abstract in spirit, but it derives its motivation from practical and everyday computation. Its aim is to understand the nature of computation and, as a consequence of this understanding, provide more efficient methodologies. All papers introducing or studying mathematical, logic and formal concepts and methods are welcome, provided that their motivation is clearly drawn from the field of computing.
期刊最新文献
Editorial Board Finding and counting small tournaments in large tournaments Truthful two-facility location with candidate locations Path partitions of phylogenetic networks On the existence of funneled orientations for classes of rooted phylogenetic networks
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1