Searcharxiv⌕ Search

arXiv subjects

Robin Nunkesser

Publications and source records attributed to Robin Nunkesser.

2 recordsLinked to original sources

Revisiting Generalized Median Estimators: Exact Bitwise Computation and Gray Code Acceleration

Generalized median estimators evaluate the median of a symmetric kernel over all $M = \binom{n}{k}$ subsets of size $k$. Exhaustive evaluation was considered impractical even for $n = 29, k = 5$ ($M = 118,755$), prompting stochastic subsampling (Wilde and Grimshaw, 2013). We show that this barrier is computational, not combinatorial: storing all subsets requires $Θ(kM)$ space, whereas stateful enumeration uses $\mathcal{O}(k)$ auxiliary state and retains only $M$ kernel values. We combine two exhaustive traversals with three-way Quickselect and a deterministic median-of-medians fallback, giving worst-case $\mathcal{O}(M)$ selection. Gosper's successor takes $\mathcal{O}(k)$ kernel work per subset for $n < w$; a Revolving Door Gray code changes one element out and one in, enabling $\mathcal{O}(1)$ kernel updates between recalibrations and $\mathcal{O}(M + kM/P)$ total time. We derive floating-point error bounds for the location ($h_1$) and mean-centered sample variance ($h_2$) kernels and their resulting median. For $n = 29, k = 5$, our ANSI C implementation evaluates all $118,755$ subsets in $0.74$ ms and $0.71$ ms, respectively. A direct C sweep places the crossover with partial lexicographic unranking at approximately $18,000$-$23,000$ subsets ($15\%$-$19\%$ of $M$), below the $32,160$-$45,420$ subsets required by Wilde and Grimshaw's sequential approximation at $ε= 0.01$.

cs.DS↗

Exact Online $Q_n$ Estimation: Exploiting Sliding-Window Rank Invariance

The $Q_n$ scale estimator (Rousseeuw and Croux, 1993) combines a 50% finite-sample breakdown point with high Gaussian efficiency, but its computation requires selecting an order statistic among the $\binom{n}{2}$ pairwise distances. We study exact online $Q_n$ computation in a sliding window by exploiting temporal rank coherence between consecutive windows. Formalizing the multiset decomposition of surviving pairwise distances in terms of strict and weak rank counts, we derive a tie-exact dual-rank update that verifies whether the previous unscaled estimate remains valid in $\mathcal{O}(\log n)$ comparisons while maintaining the sorted window in $\mathcal{O}(n)$ time. When the target rank shifts by $m$ positions, a localized row-heap procedure initialized via a monotonic two-pointer frontier scan extracts the new exact order statistic in $\mathcal{O}(n + m\log n)$ comparisons without materializing the difference matrix, complemented by a hybrid fallback that executes frontier-guided implicit matrix selection in $\mathcal{O}(n\log n)$ time for larger rank shifts. On deterministic multi-regime stress streams, our implementation matches the offline batch reference. In repeated same-platform benchmarks on a synthetic Gaussian stream, our implementation achieves median internal throughputs from 2,220,000 updates/s ($n=25$) and 1,140,000 updates/s ($n=51$) to 127,000 updates/s ($n=201$), outperforming both the exact FQN baseline ($2.5\times$ to $6.4\times$) and the approximate AFQN sketch ($1.3\times$ to $2.7\times$) across all tested window sizes.

stat.CO↗