Yao, A. C.-C. (1981). Should tables be sorted? Journal of the ACM 28(3), 615–628. DOI 10.1145/322261.322274

Key takeaways

Read in full (NOTE-891). For storing a set of n keys from a universe {1,…,m} in a table so that the membership query (is x in S?) is answered with the fewest worst-case adaptive probes, Yao proves that when the table cells may hold only keys of S or a bounded number of pointer symbols, sorted order with binary search (⌈lg(n+1)⌉ probes) is optimal once m exceeds a Ramsey-number threshold N(n, p, q), whatever the arrangement rule, table size or hashing scheme. The threshold is astronomically large, and for small universes sorted order is beaten (one probe suffices for m = 3 with n = 2, and for m ≤ 2n − 2 with n > 2). The optimality also fails as soon as one cell may hold an arbitrary value from the universe: with a single extra “directory” cell, two probes suffice for m ≥ 2^{16n²}. Only query cost is counted; building the table is free and unconstrained, so the paper says nothing about the cost of arranging or about trading arrangement cost against lookups.

Why this is here

QUESTION-114: is sorting a collection amortized search, and does physical database design give the joint cost model the question on amortized retrieval lacks?