arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2409.19576cs.DS
收藏

基于滑动后缀树的在线与离线算法用于计数不同闭合因子

Online and Offline Algorithms for Counting Distinct Closed Factors via Sliding Suffix Trees

Takuya Mieno, Shun Takahashi, Kazuhisa Seto, Takashi Horiyama

AI总结:

本文提出两种基于滑动后缀树的算法,分别以O(n log σ)在线和O(n)离线时间计数长度为n的字符串中不同闭合因子的数量,解决了闭合因子计数问题。

摘要:

一个字符串被称为闭合的,如果其长度为一,或者它有一个非空因子同时作为该字符串的前缀和后缀出现,但在其他地方不出现。闭合词的概念由[Fici, WORDS 2011]提出。最近,[Parshina and Puzynina, Theor. Comput. Sci. 2024]研究了字符串中出现的不同闭合因子的最大数量,并证明了一个渐近紧界。在本文中,我们提出两种算法来计数长度为n、字母表大小为σ的字符串T中的不同闭合因子。第一种算法对于以在线方式给出的字符串T,使用O(n)空间,运行时间为O(n log σ)。第二种算法对于以离线方式给出的字符串T,使用O(n)空间,运行时间为O(n)。两种算法都利用了滑动窗口的后缀树。

英文摘要:

A string is said to be closed if its length is one, or if it has a non-empty factor that occurs both as a prefix and as a suffix of the string, but does not occur elsewhere. The notion of closed words was introduced by [Fici, WORDS 2011]. Recently, the maximum number of distinct closed factors occurring in a string was investigated by [Parshina and Puzynina, Theor. Comput. Sci. 2024], and an asymptotic tight bound was proved. In this paper, we propose two algorithms to count the distinct closed factors in a string T of length n over an alphabet of size σ. The first algorithm runs in O(n log σ) time using O(n) space for string T given in an online manner. The second algorithm runs in O(n) time using O(n) space for string T given in an offline manner. Both algorithms utilize suffix trees for sliding windows.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑