## Searching the integers

### BibTeX

@MISC{Pǎtrascu_searchingthe,

author = {Mihai Pǎtrascu},

title = {Searching the integers},

year = {}

}

### OpenURL

### Abstract

1 Problem Definition Consider an ordered universe U, and a set T ⊂ U with |T | = n. The goal is to preprocess T, such that the following query can be answered efficiently: given x ∈ U, report the predecessor of x, i.e. max{y ∈ T | y < x}. One can also consider the dynamic problem, where elements are inserted and deleted into T. Let tq be the query time, and tu the update time. This is a fundamental search problem, with an impressive number of applications. Later, this entry discusses IP lookup (forwarding packets on the Internet), orthogonal range queries and persistent data structures as examples. The problem was considered in many computational models. In fact, most models below were initially defined to study the predecessor problem. comparison model: The problem can be solved through binary search in Θ(lg n) comparisons. There is a lot of work on adaptive bounds, which may be sublogarithmic. Such bounds may depend on the finger distance, the working set, entropy etc. binary search trees: Predecessor search is one of the fundamental motivations for binary search trees. In this restrictive model, one can hope for an instance optimal (competitive) algorithm.