Sublinear Algorithms
Sublinear algorithms measure what can be learned without reading the entire input or retaining it in memory. The chosen access model determines the lower bound.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 3
- Reading time
- 2 min
In this article3 chapters
Testing far from a property
Consider an oracle for a bit string. A tester accepts the all-zero string and is required to reject if at least an \(\varepsilon\) fraction of entries are ones. It may answer arbitrarily between these promises. With \(s\) independent uniformly sampled positions, reject upon seeing a one. The miss probability satisfies
\[ \Pr[\mathrm{miss}]\le (1-\varepsilon)^s\le e^{-\varepsilon s}. \]
Thus the sample budget for constant error is independent of input length. The promise creates this possibility. Detecting even one hidden one would require inspecting a linear fraction of the positions for constant success in the worst case.
For unbounded input, reservoir sampling retains a fixed-size random subset, while Count-Min sketches retain bounded-size estimates of selected frequencies. The right state depends on the query.
A streaming state is a communication message
Suppose a one-pass streaming algorithm tests whether any item repeats. Alice inserts the distinct elements of a subset of an \(n\)-element universe and sends the memory state. Bob appends just his queried index. The final answer reveals whether that index belongs to Alice’s subset. An algorithm with sublinear memory would give a sublinear one-way protocol for INDEX, contradicting its linear randomized communication lower bound. The proof depends on the number of passes and on the requirement to decide exact repetition.
Sketching a statistic changes the task
For an update stream with frequency vector \(f\), the second moment is \(F_2=\sum_i f_i^2\). With sufficiently independent random signs, the squared signed sum has expectation equal to this moment because cross terms cancel. Independent sketches can reduce the estimation error. The approximate moment admits small sketches even though exact repetition may not. See communication complexity for the reduction and randomized complexity for the role of fresh randomness.[1][2][3]