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

计算RLE字符串上的阿贝尔数

Computing Abelian regularities on RLE strings

Shiho Sugimoto, Naoki Noda, Shunsuke Inenaga, Hideo Bannai, Masayuki Takeda

摘要:

两个字符串x和y被称为阿贝尔等价,如果x是y的置换,反之亦然。如果一个字符串z满足z = xy,且x和y是阿贝尔等价的,则称z是阿贝尔平方。如果一个字符串w可以分解为一个序列v_1,...,字符串的v_s,使得v_1,.,v_{s-1}都是阿贝尔等价的,且vs是v_1的置换的子串,则称w具有正则阿贝尔周期(p,t),其中p = |v_1|且t = |v_s|。如果子串w_1[i.. i+1 -1]和子串w_2[j. j+l-1]是阿贝尔等价的,那么这些子串被称为w_1和w_2的公共阿贝尔因子,并且如果长度l是这样的最大值,那么这些子串被称为w_1和w_2的最长公共阿贝尔因子。我们提出了有效的算法,计算这些阿贝尔矩阵使用字符串的行程长度编码(RLE)。对于一个给定的字符串w的长度为n的RLE是大小为m,我们提出的算法,计算所有的阿贝尔平方发生在w在O(mn)的时间,和所有定期阿贝尔周期的w在O(mn)的时间。对于两个给定的字符串w_1和w_2的总长度为n和总RLE大小为m,我们提出了一个算法,计算所有的最长公共阿贝尔因子在O(m^2n)时间。

英文摘要:

Two strings x and y are said to be Abelian equivalent if x is a permutation of y, or vice versa. If a string z satisfies z = xy with x and y being Abelian equivalent, then z is said to be an Abelian square. If a string w can be factorized into a sequence v_1,...,v_s of strings such that v_1 ,..., v_{s-1} are all Abelian equivalent and vs is a substring of a permutation of v_1, then w is said to have a regular Abelian period (p,t) where p = |v_1| and t = |v_s|. If a substring w_1[i..i+l-1] of a string w_1 and a substring w_2[j..j+l-1] of another string w_2 are Abelian equivalent, then the substrings are said to be a common Abelian factor of w_1 and w_2 and if the length l is the maximum of such then the substrings are said to be a longest common Abelian factor of w_1 and w_2. We propose efficient algorithms which compute these Abelian regularities using the run length encoding (RLE) of strings. For a given string w of length n whose RLE is of size m, we propose algorithms which compute all Abelian squares occurring in w in O(mn) time, and all regular Abelian periods of w in O(mn) time. For two given strings w_1 and w_2 of total length n and of total RLE size m, we propose an algorithm which computes all longest common Abelian factors in O(m^2n) time.

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

↑