 
Summary: Detecting Duplicates Among Similar
Bit Vectors
(of course, with geometric applications)
Boris Aronov1
and John Iacono2
Abstract We show how to detect duplicates in a
sequence of k nbit vectors presented as a list of
singlebit changes between consecutive vectors, in
O((n + k) log n) time.
Problem We are given a sequence S = {v1, . . . , vk}
of k nbit vectors, presented as follows: The first bit
vector is all zeros and each subsequent vector vi is
obtained from the previous vector vi1 by flipping a
single bit in position bi, 0 bi < n. S is represented
as b2, b3, . . . , bk. The problem is to detect duplicates
in the sequence v1, v2, . . . , vk. More formally, we seek
a labeling S {1, . . . , k}, vi ci, such that ci = cj
iff vi = vj.
Solution Without loss of generality in the remainder
of this note we assume that n is a power of two. Let T
