Fast Intersection Algorithms for Sorted Sequences
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.
- Publication:
-
Lecture Notes in Computer Science
- Pub Date:
- 2010
- DOI:
- 10.1007/978-3-642-12476-1_3
- Bibcode:
- 2010LNCS.6060...45B