流中近似回文的严格权衡
Tight tradeoffs for approximating palindromes in streams
摘要:
我们考虑在流模型中计算长度为$n$的文本中的最长回文,其中字符一个接一个地到达,并且我们没有随机访问输入。虽然在这样的设置中不可能使用次线性记忆精确地计算答案,但仍然可以希望有一个良好的近似保证。我们专注于两个最自然的变体,我们的目标是最长回文长度的加法或乘法近似。我们首先表明,有没有考虑拉斯维加斯算法在这样的设置点,因为他们不能实现次线性空间复杂度。对于蒙特卡罗算法,我们提供了一个下界的$Ω(\frac{n}{E})$位近似的答案与添加剂错误$E$,和$Ω(\frac{\log n}{\log(1+\varepsilon)})$位近似的答案与乘法错误$(1+\varepsilon)$的二进制字母表。然后,我们构建了一个通用的蒙特卡罗算法,通过适当地选择参数,实现空间复杂度匹配的对数因子的两个变量。这大大改进了Berenbrink等人(STACS 2014)的先前结果,并基本解决了空间复杂度。
英文摘要:
We consider computing the longest palindrome in a text of length $n$ in the streaming model, where the characters arrive one-by-one, and we do not have random access to the input. While computing the answer exactly using sublinear memory is not possible in such a setting, one can still hope for a good approximation guarantee. We focus on the two most natural variants, where we aim for either additive or multiplicative approximation of the length of the longest palindrome. We first show that there is no point in considering Las Vegas algorithms in such a setting, as they cannot achieve sublinear space complexity. For Monte Carlo algorithms, we provide a lowerbound of $Ω(\frac{n}{E})$ bits for approximating the answer with additive error $E$, and $Ω(\frac{\log n}{\log(1+\varepsilon)})$ bits for approximating the answer with multiplicative error $(1+\varepsilon)$ for the binary alphabet. Then, we construct a generic Monte Carlo algorithm, which by choosing the parameters appropriately achieves space complexity matching up to a logarithmic factor for both variants. This substantially improves the previous results by Berenbrink et al. (STACS 2014) and essentially settles the space complexity.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。