Summary: PREPRINT. In Proc. 27th ACM Symposium on Theory of
Computing,pages 417426. ACM Press, 1995.
A tight lower bound for searching a sorted array
Arne Andersson \Lambda Johan Hšastad y Ola Petersson \Lambdaz
We show that given a kcharacter query string and an ar
ray of n strings arranged in alphabetical order, finding a
matching string or report that no such string exists requires
k log log n
log log (4 + k log log n
log n )
+ k + log n
character comparisons in the worst case, which is tight.
The problem of searching a sorted set of strings is indeed
fundamental. We assume that the strings are given in (lex
icographically) sorted order in an array and that no extra