...
【24h】

Longest substring palindrome after edit

机译:编辑后最长的子串回文

获取原文
           

摘要

It is known that the length of the longest substring palindromes (LSPals) of a given string T of length n can be computed in O(n) time by Manacher's algorithm [J. ACM '75]. In this paper, we consider the problem of finding the LSPal after the string is edited. We present an algorithm that uses O(n) time and space for preprocessing, and answers the length of the LSPals in O(log (min {sigma, log n })) time after single character substitution, insertion, or deletion, where sigma denotes the number of distinct characters appearing in T. We also propose an algorithm that uses O(n) time and space for preprocessing, and answers the length of the LSPals in O(l + log n) time, after an existing substring in T is replaced by a string of arbitrary length l.
机译:已知长度为n的给定字符串T的最长子字符串回文长度(LSPals)的长度可以通过Manacher算法在O(n)时间中计算出来[J. ACM '75]。在本文中,我们考虑在字符串编辑后找到LSPal的问题。我们提出一种算法,该算法使用O(n)的时间和空间进行预处理,并在单个字符替换,插入或删除后以O(log(min {sigma,log n})的时间)回答LSPal的长度。表示T中出现的不同字符的数量。我们还提出了一种算法,该算法使用O(n)的时间和空间进行预处理,并在T中存在子字符串之后,以O(l + log n)的时间回答LSPal的长度。替换为任意长度l的字符串。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号