We study the following substring suffix selection problem: given a substring of a string T of length n, compute its k-th lexicographically smallest suffix. This a natural generalization of the well-known question of computing the maximal suffix of a string, which is a basic ingredient in many other problems. We first revisit two special cases of the problem, introduced by Babenko, Kolesnichenko and Starikovskaya [CPM'13], in which we are asked to compute the minimal non-empty and the maximal suffixes of a substring. For the maximal suffixes problem, we give a linear-space structure with O(1) query time and linear preprocessing time, i.e., we manage to achieve optimal construction and optimal query time simultaneously. For the minimal suffix problem, we give a linear-space data structure with O(τ) query time and O(n log n / τ) preprocessing time, where 1 <= τ<= log n is a parameter of the data structure. As a sample application, we show that this data structure can be used to compute the Lyndon decomposition of any substring of T in O(k τ) time, where k is the number of distinct factors in the decomposition.
Finally, we move to the general case of the substring suffix selection problem, where using any combinatorial properties seems more difficult. Nevertheless, we develop a linear-space data structure with O(log^{2+ε} n) query time.
Joint Graduate School of Mathematics for Innovation, Kyushu University(九州大学数学创新联合研究生院);Department of Information Science and Technology, Kyushu University(九州大学信息科学技术系);Graduate School of Informatics and Engineering, University of Electro-Communications(电波大学信息与工程学院);Department of Informatics, Kyushu University(九州大学信息学系)
我们重新审视各种字符串索引问题的范围报告功能,即位置限制的子串搜索,索引子串的差距,索引子串的间隔。我们得到以下主要结果。{itemize}我们将上述每个问题有效地归约到一个新的问题,我们称之为\emph{substring range reporting}。因此,我们统一了以前的工作,表明我们可以限制我们的注意力,而不是单独研究上述每个问题。我们展示了如何解决子串范围报告的最佳查询时间和小空间。结合我们的减少,这导致显着改善上述问题的时空权衡。特别是,对于每个问题,我们获得了最佳的时间查询和$O(n\log^{O(1)} n)$空间,其中$n$是索引字符串的长度的第一个解决方案。我们表明,我们的子串范围报告的技术推广到\emph{substring range counting}和\emph{substring range emptiness}的变种。我们还获得了这些问题的非平凡的时空权衡。{itemize}我们的子字符串范围报告的界限是基于后缀树和范围报告数据结构的新组合。这些减少是简单和通用的,并且可以应用于字符串索引与范围报告的其他组合。
School of Informatics, University of Edinburgh(爱丁堡大学信息学院);Graduate School of Mathematics, Nagoya University(名古屋大学研究生院数学系);China Telecom Cloud Technology Co., Ltd.(中国电信云计算科技有限公司);XVERSE Technology Inc.(幻维科技(深圳)有限公司)
加权祖先问题是一个著名的推广的前身问题的树。已知如果$O(n\mathop{\mathrm{polylog}} n)$空间可用并且权重来自$[0..n]$,则查询需要$Ω(\log\log n)$时间,其中$n$是树节点的数量。然而,当应用于后缀树时,令人惊讶的是,该问题允许具有恒定查询时间的$O(n)$空间解决方案,如Gawrychowski,Lewenstein和Nicholson所示(Proc. ESA 2014)。这个问题的变体可以重新表述如下:给定一个字符串$s$的后缀树,我们需要一个数据结构,它可以在$O(1)$时间内在树中定位$s$的任何子串$s[p..q]$(就像一个人从根开始一路读$s[p..q]$)。不幸的是,Gawrychowski等人的数据结构没有有效的构造算法,限制了其作为算法工具的更广泛使用。在本文中,我们解决了这个问题,描述了一个数据结构的加权祖先后缀树与常数查询时间和线性构造算法。我们的解决方案是基于一种新的方法,使用所谓的不可约LCP值。
String Representation Based on Substring Equation Systems
Joint Graduate School of Mathematics for Innovation, Kyushu University(九州大学数学创新联合研究生院);M&D Data Science Center, Institute of Integrated Research, Institute of Science Tokyo(东京科学大学综合研究所M&D数据中心)
Time-Space Tradeoffs for Finding a Long Common Substring
我们考虑的问题,找到两个文件的总长度$n$,最长的字符串作为两个文件的子串。这个问题被称为最长公共子串(LCS)问题,有一个经典的$O(n)$时间解决方案,可以追溯到后缀树的发现(Weiner,1973)和整数字母表的有效构造(Farach-Colton,1997)。然而,这些解决方案需要$Θ(n)$空间,这在许多应用中是禁止的。为了解决这个问题,Starikovskaya和Vildhøj(CPM 2013)表明,对于$n^{2/3} \le s \le n^{1-o(1)}$,LCS问题可以在$O(s)$空间和$O(\frac{n^2}{s})$时间中求解。Kociumaka等人(欧空局,2014年)将这一权衡推广到$1 \leq s \leq n$,从而提供了从恒定空间到线性空间的平滑时空权衡。在本文中,我们获得了显着的加速的情况下,所寻求的LCS的长度$L$是大的。对于$1 \leq s \leq n$,我们证明了LCS问题可以在$O(s)$空间和$\tilde{O}(\frac{n^2}{L\cdot s}+n)$时间中求解。该结果基于源自具有失配问题的LCS的技术(Flouri等人,2015; Charalampopoulos等人,CPM 2018),空间高效的局部一致性解析(Birenzwige et al.,SODA 2020),以及输入文档中最大重复(运行)的结构。
King’s College London(伦敦国王学院);Max Planck Institute for Informatics(马克斯·普朗克计算机科学研究所);University of Warsaw(华沙大学);Samsung R&D Institute Poland(三星波兰研发中心);CWI, Amsterdam(荷兰数学与计算机科学研究中心);Vrije Universiteit, Amsterdam(阿姆斯特丹自由大学)
CWI(荷兰数学与计算机科学研究学会);Vrije Universiteit(阿姆斯特丹自由大学);King’s College London(伦敦国王学院);Birkbeck, University of London(伦敦大学伯贝克学院);The Cyprus Institute(塞浦路斯研究所)