Finding a Duplicate and a Missing Item in a Stream
Finding a Duplicate and a Missing Item in a Stream
复制标题
DOI:
10.1007/978-3-540-72504-6_11
复制
发表时间:
2007-05
期刊:
影响因子:
--
通讯作者:
J. Tarui
中科院分区:
文献类型:
--
作者:
J. Tarui
We consider the following problem in a stream model: Given a sequencewich eachai∈ [n] = {1,...,n} andm>n, find aduplicatein the sequence, i.e., find somed=ai=alwithi≠lby using limitedsbits of memory andrpasses over the input sequence. In onepassan algorithm reads the input sequenceain the ordera1,a2, ...,am. Sincem>n, a duplicate exists by the pigeonhole principle. Muthukrishnan [Mu05a], [Mu05b] has posed the following question for the case wherem=n+ 1: Fors=O(logn), is there a solution with aconstantnumber of passes? We have described the problem generalizing Muthukrishnan’s question by taking the sequence lengthmas a parameter. We give a negative answer to the original question by showing the following: Assume thatm=n+ 1. A streaming algorithm withO(logn) space requiresΩ(logn/loglogn) passes; ak-pass streaming algorithm requiresΩ(n1/(2k− 1)) space. We also consider the following problem offinding a missing item: Assuming thatn<m, findx∈ [m] such thatx≠ajfor 1 ≤j≤n. The same lower bound applies for the missing-item finding problem. The proof is a simple reduction to the communication complexity of arelation. We also considerone-pass algorithms and exactly determine the minimum space required. Interesting open questions such as the following remain. For the number of passes of algorithms usingO(logn) space, show anω(1) lower bound (or anO(1) upper bound) for: (1) duplicate finding form= 2n, (2) missing-item finding form= 2n, and (3) the case where we allow Las-Vegas type randomization form=n+ 1.