Abstract
We present algorithms and lower bounds for the Longest Increasing Subsequence (LIS) and Longest Common Subsequence (LCS) problems in the data-streaming model. To decide if the LIS of a given stream of elements drawn from an alphabet Σ has length at least k, we discuss a one-pass algorithm using O(k log|Σ|) space, with update time either O(log k) or O(loglog|Σ|); for |Σ| = O(1), we can achieve O(log k) space and constant-time updates. We also prove a lower bound of Ω(k) on the space requirement for this problem for general alphabets Σ, even when the input stream is a permutation of Σ. For finding the actual LIS, we give a ⌈ log (1+1/ε) ⌉-pass algorithm using O(k 1 + εlog|Σ|) space, for any ε > 0. For LCS, there is a trivial Θ(1)-approximate O(log n)-space streaming algorithm when |Σ| = O(1). For general alphabet Σ, the problem is much harder. We prove several lower bounds on the LCS problem, of which the strongest is the following: it is necessary to use Ω(n/ρ 2) space to approximate the LCS of two n-element streams to within a factor of ρ, even if the streams are permutations of each other.
Part of this work was done while the authors were visiting IBM Almaden. Thanks to D. Sivakumar for suggesting the problem and for fruitful discussions. Thanks also to Graham Cormode, Erik Demaine, Matt Lepinski, and Abhi Shelat.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Henzinger, M.R., Raghavan, P., Rajagopalon, S.: Computing on data streams. Technical Report 1998-011, Digital Equipment Corp., Systems Res. Center (1998)
Cormode, G., Muthukrishnan, S.: What’s new: Finding significant differences in network data streams. In: Proc. INFOCOM (2004)
Banerjee, A., Ghosh, J.: Clickstream clustering using weighted longest common subsequence. In: Workshop, I.C.M. (ed.) ICM Workshop on Web Mining (2001)
Charikar, M., Chen, K., Farach-Colton, M.: Finding frequent items in data streams. In: Widmayer, P., Triguero, F., Morales, R., Hennessy, M., Eidenbenz, S., Conejo, R. (eds.) ICALP 2002. LNCS, vol. 2380, p. 693. Springer, Heidelberg (2002)
Demaine, E.D., López-Ortiz, A., Munro, J.I.: Frequency estimation of Internet packet streams with limited space. In: Möhring, R.H., Raman, R. (eds.) ESA 2002. LNCS, vol. 2461, pp. 348–360. Springer, Heidelberg (2002)
Guha, S., Mishra, N., Motwani, R., O’Callaghan, L.: Clustering data streams. In: Proc. FOCS, pp. 359–366 (2000)
Manku, G., Rajagopalan, S., Lindsay, B.: Approximate medians and other quantiles in one pass and with limited memory. In: Proc. SIGMOD (1998)
Alon, N., Matias, Y., Szegedy, M.: The space complexity of approximating the frequency moments. JCSS 58, 137–147 (1999)
Bar-Yossef, Z., Jayram, T.S., Kumar, R., Sivakumar, D.: An information statistics approach to data stream and communication complexity. In: Proc. FOCS (2002)
Feigenbaum, J., Kannan, S., Strauss, M., Viswanathan, M.: An approximate L1- difference algorithm for massive data streams. In: Proc. FOCS (1999)
Fong, J., Strauss, M.: An approximate L-difference algorithm for massive data streams. In: Reichel, H., Tison, S. (eds.) STACS 2000. LNCS, vol. 1770, p. 193. Springer, Heidelberg (2000)
Indyk, P.: Stable distributions, pseudorandom generators, embeddings, and data stream computations. In: Proc. FOCS (2000)
Saks, M., Sun, X.: Space lower bounds for distance approximation in the data stream model. In: Proc. STOC (2002)
Ajtai, M., Jayram, T.S., Kumar, R., Sivakumar, D.: Approximate counting of inversions in a data stream. In: Proc. STOC (2002)
Gilbert, A., Guha, S., Indyk, P., Kotidis, Y., Muthukrishnan, S., Strauss, M.: Fast, small-space algorithms for approximate histogram maintenance. In: STOC (2002)
Guha, S., Koudas, N., Shim, K.: Data-streams and histograms. In: STOC (2001)
Fredman, M.L.: On computing the length of longest increasing subsequences. Discrete Mathematics 11, 29–35 (1975)
van Emde Boas, P.: Preserving order in a forest in less than logarithmic time and linear space. IPL 6, 80–82 (1977)
Willard, D.E.: Log-logarithmic worst-case range queries are possible in space Θ(N). IPL 17, 81–84 (1983)
Bespamyatnikh, S., Segal, M.: Enumerating longest increasing subsequences and patience sorting. IPL 76, 7–11 (2000)
Cormen, T., Leiserson, C., Rivest, R., Stein, C.: Introduction to Algorithms. McGraw-Hill, New York (2002)
Kalyanasundaram, B., Schnitger, G.: The probabilistic communication complexity of set intersection. SIAM J. Disc. Math 5, 545–557 (1992)
Razborov, A.: On the distributional complexity of disjointness. JCSS 28 (1984)
Erdös, P., Szekeres, G.: A combinatorial problem in geometry. Compositio Mathematica, 463–470 (1935)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2005 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Liben-Nowell, D., Vee, E., Zhu, A. (2005). Finding Longest Increasing and Common Subsequences in Streaming Data. In: Wang, L. (eds) Computing and Combinatorics. COCOON 2005. Lecture Notes in Computer Science, vol 3595. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11533719_28
Download citation
DOI: https://doi.org/10.1007/11533719_28
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-28061-3
Online ISBN: 978-3-540-31806-4
eBook Packages: Computer ScienceComputer Science (R0)