Skip to main content

A Fast Set Intersection Algorithm for Sorted Sequences

  • Conference paper
Combinatorial Pattern Matching (CPM 2004)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 3109))

Included in the following conference series:

Abstract

This paper introduces a simple intersection algorithm for two sorted sequences that is fast on average. It is related to the multiple searching problem and to merging. We present the worst and average case analysis, showing that in the former, the complexity nicely adapts to the smallest list size. In the later case, it performs less comparisons than the total number of elements on both inputs when n = αm (α > 1). Finally, we show its application to fast query processing in Web search engines, where large intersections, or differences, must be performed fast.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Baeza-Yates, R.A.: Efficient Text Searching. PhD thesis, Dept. of Computer Science, University of Waterloo, Also as Research Report CS-89-17 (May 1989)

    Google Scholar 

  2. Baeza-Yates, R., Bradford, P.G., Culberson, J.C., Rawlins, G.J.E.: The Complexity of Multiple Searching (1993)(unpublished manuscript)

    Google Scholar 

  3. Baeza-Yates, R., Ribeiro-Neto, B.: Modern Information Retrieval, p. 513. ACM Press/Addison-Wesley (1999)

    Google Scholar 

  4. Baeza-Yates, R., Saint-Jean, F.: A Three Level Search Engine Index based in Query Log Distribution. In: Nascimento, M.A., de Moura, E.S., Oliveira, A.L. (eds.) SPIRE 2003. LNCS, vol. 2857, pp. 56–65. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  5. Baeza-Yates, R.: Query Usage Mining in Search Engines. In: Scime, A. (ed.) Web Mining: Applications and Techniques, Idea Group (2004)

    Google Scholar 

  6. Barbay, J., Kenyon, C.: Adaptive Intersection and t-Threshold Problems. In: Proceedings of the 13th Annual ACM-SIAM Symposium on Discrete Algorithms, San Francisco, CA, January 2002, pp. 390–399 (2002)

    Google Scholar 

  7. Brin, S., Page, L.: The anatomy of a large-scale hypertextualWeb search engine. In: 7th WWW Conference, Brisbane, Australia (April 1998)

    Google Scholar 

  8. Demaine, E.D., López-Ortiz, A., Munro, J.I.: Adaptive set intersections, unions, and differences. In: Proceedings of the 11th Annual ACM-SIAM Symposium on Discrete Algorithms, San Francisco, CA, January 2000, pp. 743–752 (2000)

    Google Scholar 

  9. Demaine, E.D., López-Ortiz, A., Munro, J.I.: Experiments on Adaptive set intersections for text retrieval systems. In: Mount, D.M., Stein, C. (eds.) ALENEX 2002. LNCS, vol. 2409, Springer, Heidelberg (2002)

    Google Scholar 

  10. Paul, D., Kurt, M., Rajeev, R., Christian, U.: Lower Bounds for Set Intersection Queries. In: Proceedings of the 4th Annual Symposium on Discrete Algorithms, pp. 194–201 (1993)

    Google Scholar 

  11. David, D., Richard, L.: On the Complexity of Computations Under Varying Sets of Primitives. Journal of Computer and Systems Sciences 18, 86–91 (1979)

    Article  MATH  Google Scholar 

  12. de la Vega, W.F., Kannan, S., Santha, M.: Two probabilistic results on merging. SIAM J. on Computing 22(2), 261–271 (1993)

    Article  MATH  Google Scholar 

  13. de la Vega, W.F., Frieze, A.M., Santha, M.: Average case analysis of the merging algorithm of Hwang and Lin. Algorithmica 22(4), 483–489 (1998)

    Article  MATH  MathSciNet  Google Scholar 

  14. Hwang, F.K., Lin, S.: A Simple algorithm for merging two disjoint linearly ordered lists. SIAM J. on Computing 1, 31–39 (1972)

    Article  MATH  MathSciNet  Google Scholar 

  15. Rawlins, Gregory, J.E.: Compared to What?: An Introduction the the Analysis of Algorithms. Computer Science Press/W. H. Freeman (1992)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2004 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Baeza-Yates, R. (2004). A Fast Set Intersection Algorithm for Sorted Sequences. In: Sahinalp, S.C., Muthukrishnan, S., Dogrusoz, U. (eds) Combinatorial Pattern Matching. CPM 2004. Lecture Notes in Computer Science, vol 3109. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-27801-6_30

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-27801-6_30

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-22341-2

  • Online ISBN: 978-3-540-27801-6

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics