Finding Longest Increasing and Common Subsequences in Streaming Data

  • David Liben-Nowell
  • Erik Vee
  • An Zhu
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3595)


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(k1 + ε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.


Data Stream Communication Complexity Streaming Data Longe Common Subsequence Longe Common Subsequence 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Henzinger, M.R., Raghavan, P., Rajagopalon, S.: Computing on data streams. Technical Report 1998-011, Digital Equipment Corp., Systems Res. Center (1998)Google Scholar
  2. 2.
    Cormode, G., Muthukrishnan, S.: What’s new: Finding significant differences in network data streams. In: Proc. INFOCOM (2004)Google Scholar
  3. 3.
    Banerjee, A., Ghosh, J.: Clickstream clustering using weighted longest common subsequence. In: Workshop, I.C.M. (ed.) ICM Workshop on Web Mining (2001)Google Scholar
  4. 4.
    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)CrossRefGoogle Scholar
  5. 5.
    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)CrossRefGoogle Scholar
  6. 6.
    Guha, S., Mishra, N., Motwani, R., O’Callaghan, L.: Clustering data streams. In: Proc. FOCS, pp. 359–366 (2000)Google Scholar
  7. 7.
    Manku, G., Rajagopalan, S., Lindsay, B.: Approximate medians and other quantiles in one pass and with limited memory. In: Proc. SIGMOD (1998)Google Scholar
  8. 8.
    Alon, N., Matias, Y., Szegedy, M.: The space complexity of approximating the frequency moments. JCSS 58, 137–147 (1999)MathSciNetzbMATHGoogle Scholar
  9. 9.
    Bar-Yossef, Z., Jayram, T.S., Kumar, R., Sivakumar, D.: An information statistics approach to data stream and communication complexity. In: Proc. FOCS (2002)Google Scholar
  10. 10.
    Feigenbaum, J., Kannan, S., Strauss, M., Viswanathan, M.: An approximate L1- difference algorithm for massive data streams. In: Proc. FOCS (1999)Google Scholar
  11. 11.
    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)CrossRefGoogle Scholar
  12. 12.
    Indyk, P.: Stable distributions, pseudorandom generators, embeddings, and data stream computations. In: Proc. FOCS (2000)Google Scholar
  13. 13.
    Saks, M., Sun, X.: Space lower bounds for distance approximation in the data stream model. In: Proc. STOC (2002)Google Scholar
  14. 14.
    Ajtai, M., Jayram, T.S., Kumar, R., Sivakumar, D.: Approximate counting of inversions in a data stream. In: Proc. STOC (2002)Google Scholar
  15. 15.
    Gilbert, A., Guha, S., Indyk, P., Kotidis, Y., Muthukrishnan, S., Strauss, M.: Fast, small-space algorithms for approximate histogram maintenance. In: STOC (2002)Google Scholar
  16. 16.
    Guha, S., Koudas, N., Shim, K.: Data-streams and histograms. In: STOC (2001)Google Scholar
  17. 17.
    Fredman, M.L.: On computing the length of longest increasing subsequences. Discrete Mathematics 11, 29–35 (1975)MathSciNetCrossRefzbMATHGoogle Scholar
  18. 18.
    van Emde Boas, P.: Preserving order in a forest in less than logarithmic time and linear space. IPL 6, 80–82 (1977)CrossRefzbMATHGoogle Scholar
  19. 19.
    Willard, D.E.: Log-logarithmic worst-case range queries are possible in space Θ(N). IPL 17, 81–84 (1983)MathSciNetCrossRefzbMATHGoogle Scholar
  20. 20.
    Bespamyatnikh, S., Segal, M.: Enumerating longest increasing subsequences and patience sorting. IPL 76, 7–11 (2000)MathSciNetCrossRefGoogle Scholar
  21. 21.
    Cormen, T., Leiserson, C., Rivest, R., Stein, C.: Introduction to Algorithms. McGraw-Hill, New York (2002)Google Scholar
  22. 22.
    Kalyanasundaram, B., Schnitger, G.: The probabilistic communication complexity of set intersection. SIAM J. Disc. Math 5, 545–557 (1992)MathSciNetCrossRefzbMATHGoogle Scholar
  23. 23.
    Razborov, A.: On the distributional complexity of disjointness. JCSS 28 (1984)Google Scholar
  24. 24.
    Erdös, P., Szekeres, G.: A combinatorial problem in geometry. Compositio Mathematica, 463–470 (1935)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2005

Authors and Affiliations

  • David Liben-Nowell
    • 1
  • Erik Vee
    • 2
  • An Zhu
    • 3
  1. 1.Department of Mathematics and Computer ScienceCarleton CollegeUSA
  2. 2.IBM Almaden Research CenterUSA
  3. 3.Google, IncUSA

Personalised recommendations