Space efficient streaming algorithms for the distance to monotonicity and asymmetric edit distance
Abstract
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 , given streaming access to an array of length provides a -multiplicative approximation to the \emph{distance to monotonicity} ( minus the length of the LIS), and uses only space. The previous best known approximation using polylogarithmic space was a multiplicative 2-factor. Our algorithm can be used to estimate the length of the LIS to within an additive for any while previous algorithms could only achieve additive error . 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 give a streaming algorithm for approximating , the length of the longest common subsequence between strings and , each of length . Our algorithm works in the asymmetric setting (inspired by \cite{AKO10}), in which we have random access to and streaming access to , and runs in small space provided that no single symbol appears very often in . More precisely, it gives an additive- approximation to (and hence also to , the edit distance between and when insertions and deletions, but not substitutions, are allowed), with space complexity , where is the maximum number of times any one symbol appears in .
Cite
@article{arxiv.1204.1098,
title = {Space efficient streaming algorithms for the distance to monotonicity and asymmetric edit distance},
author = {Michael Saks and C. Seshadhri},
journal= {arXiv preprint arXiv:1204.1098},
year = {2013}
}
Comments
Final SODA 2013 version. Fixed bugs. We get a \delta n-additive approximation for edit distance, not multiplicative as said in the earlier tech report