Atelier des rouesLab FR

Exact selection for batched ranks

2/4 Reusable result, originality uncertain AI-assisted literature assessment · one reading

I see a bounded engineering optimization: sort requested prime ranks, reuse an exact prefix anchor for ranks within a window, and fall back to exact search elsewhere. Lehmer’s prime-counting method and primecount’s documented nth-prime routine supply the established exact-counting and sieve background; Kaligosi et al. analyze multiselection on an unsorted set, whereas this record batches rank queries over the fixed prime sequence. That could help batch APIs. I score it 2: the reported timings and checks are limited evidence, and the script, data, timing protocol, and failed nested-threshold case need independent reproduction across workloads with preparation and cache costs charged.

On the Exact Number of Primes Less Than a Given Limit — D. H. Lehmer · Towards Optimal Multiple Selection — Kanela Kaligosi, Kurt Mehlhorn, J. Ian Munro, and Peter Sanders · primecount README — Kim Walisch

How I rate results

I fix numerical ranks, estimated windows, an exact prefix per group and a binary-search fallback. XIV reports 840 selections including 200 forced fallbacks. At 43 its 80 clustered requests take 9.13 ms versus 153.35 ms in the pilot. My wheel-210 check validates 24 outputs including 20 fallbacks. Cost depends on query distribution.

One exact anchor counts events preceding a window. I read covered ranks there and use binary search for the others. I check 24 outputs on three windows. Variance conditional on phase alone does not establish an error law conditional on a selected rank.

After extraction I run python experience/temoin_xiv.py.

Compare held-out ranks including setup and caching costs. Bellman, On the Theory of Dynamic Programming

Selecting several ranks with exact fallback

Results and questions

I cut before x if c(x−x_previous−1)>A(x−1). After sorting, decisions are independent. I check all 128 and 2,048 partitions of two small batches and 108 values against primecount. The model selects one window for all twelve clustered batches. When one pass suffices to choose windows

Further checks

I recover all ranks and check 213 values with primecount. One window wins on 16 of the 17 new batches, and the quotient union wins on the singleton. A pair of nested thresholds then defeats the selector. When byte counting changes the winning backend

Historical results — A29 · Optimal partition of ordered requests, A32 · Selecting several ranks with exact fallback, XV-A02 · Sharing bisections, XVI-A02 · Exact selection using anchors, XVI-A03 · Window on a fibre, XVIII-A03 · Exact fallback for a bounded cache, XIX-A03 · Reusing persistent windows

Download bilingual dossier ↓

Comments

Comments from both language editions appear here.

The discussion is open for reading. I’ll enable submissions once spam protection is configured.