Fast intersection algorithms for sorted sequences

  • Authors:
  • Ricardo Baeza-Yates;Alejandro Salinger

  • Affiliations:
  • Yahoo! Research, Barcelona, Spain;Dept. of Computer Science, Univ. of Waterloo, Canada

  • Venue:
  • Algorithms and Applications
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

This paper presents and analyzes a simple intersection algorithm for 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 latter case, it performs less comparisons than the total number of elements on both inputs, n and m, when n=αm (α1), achieving O(m log(n/m)) complexity. The algorithm is motivated by its application to fast query processing in Web search engines, where large intersections, or differences, must be performed fast. In this case we experimentally show that the algorithm is faster than previous solutions.