首页> 外文会议>Symposium on Discrete Algorithms >Space efficient streaming algorithms for the distance to monotonicity and asymmetric edit distance
【24h】

Space efficient streaming algorithms for the distance to monotonicity and asymmetric edit distance

机译:空间高效流算法,用于单调和非对称编辑距离的距离

获取原文

摘要

Approximating the length of the longest increasing sequence (LIS) of an array is a well-studied problem. We study this problem in the data stream model, where the algorithm is allowed to make a single left-to-right pass through the array and the key resource to be minimized is the amount of additional memory used. We present an algorithm which, for any δ > 0, given streaming access to an array of length n provides a (1 + δ)-multiplicative approximation to the distance to monotonicity (n minus the length of the LIS), and uses only O((log~2 n)/δ) space. The previous best known approximation using polylogarithmic space was a multiplicative 2-factor. The improved approximation factor reflects a qualitative difference between our algorithm and previous algorithms: previous polylogarithmic space algorithms could not reliably detect increasing subsequences of length as large as n/2, while ours can detect increasing subsequences of length βn for any β > 0. More precisely, our algorithm can be used to estimate the length of the LIS to within an additive δn for any δ > 0 while previous algorithms could only achieve additive error n(1/2 - o(1)). Our algorithm is very simple, being just 3 lines of pseudocode, and has a small update time. It is essentially a polylogarithmic space approximate implementation of a classic dynamic program that computes the LIS. We also show how our technique can be applied to other problems solvable by dynamic programs. For example, we give a streaming algorithm for approximating LCS(x, y), the length of the longest common subsequence between strings χ and y, each of length n. Our algorithm works in the asymmetric setting (inspired by [AKO10]), in which we have random access to y and streaming access to x, and runs in small space provided that no single symbol appears very often in y. More precisely, it gives an additive-δn approximation to LCS(x,y) (and hence also to E(x,y) = n - LCS(x,y), the edit distance between χ and y when insertions and deletions, but not substitutions, are allowed), with space complexity O(k(log~2n)/δ), where k is the maximum number of times any one symbol appears in y. We also provide a deterministic 1-pass streaming algorithm that outputs a (1 + δ)-multiplicative approximation for E(x,y) (which is also an additive δn-approximation), in the asymmetric setting, and uses O(n/δ log(n)) space. All these algorithms are obtained by carefully trading space and accuracy within a standard dynamic program.
机译:近似阵列的最长增加序列(LIS)的长度是一个研究的良好问题。我们在数据流模型中研究这个问题,其中允许算法通过阵列进行单个左右通过,并且最小化的关键资源是所使用的附加内存量。我们介绍了一种算法,对于任何δ> 0,给定长度阵列n的流频道访问提供(1 +Δ) - 多倍升程到到单调的距离(n减去LIS的长度),仅使用o ((log〜2 n)/δ)空间。使用PolyGarithic空间的先前最着名的近似是乘法的2因子。改进的近似因子反映了我们的算法和先前算法之间的定性差异:先前的积极影式空间算法无法可靠地检测随后长度的延长随后,而我们可以检测任何β的长度βn的随后的延续术语。更多精确地,我们的算法可用于估计LIS在附加Δn内的LIS的长度,而先前的算法只能实现添加误差N(1/2 -O(1))。我们的算法非常简单,只是伪码的3行,更新时间很小。它基本上是一种计算LIS的经典动态程序的积极影式空间近似实现。我们还展示了我们的技术如何通过动态程序可解决的其他问题。例如,我们给出了一种用于近似LCS(x,y)的流算法,串χ和y之间的最长公共子序列的长度,每个长度为n。我们的算法在非对称设置(由[AKO10]启发)中,我们有随机访问y和流传输到x,并且在小空间中运行,条件是在y中不得不出现单个符号。更确切地说,它给出了一个添加到LCS(x,y)的附加 - Δn近似(并且也是对e(x,y)= n - lcs(x,y),在插入和删除时,χ和y之间的编辑距离,但不允许替换),具有空间复杂度O(k(log〜2n)/δ),其中k是任何一个符号出现在y中的最大次数。我们还提供了一个确定性的1遍流流算法,其在不对称设置中输出E(x,y)(也是附加Δn-近似)的(1 +Δ) - 多次近似值,并使用o(n / Δlog(n))空间。所有这些算法都是通过仔细交易空间和准确性在标准动态程序中获得的。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号