English

A Faster Closest-Point Algorithm for the $A_n^*$ Lattices

Information Theory 2026-07-11 v1

Abstract

The dual root lattice AnA_n^* is an important lattice in quantization, coding, and estimation. It can be represented as the projection of the integer lattice Zn+1\mathbb{Z}^{n+1} onto the nn-dimensional hyperplane whose coordinates sum to zero. This representation makes AnA_n^* particularly natural for quantizing simplex-constrained data, such as histograms and probability distributions. This paper studies the closest-point problem for AnA_n^*: given a query vector yy, find the lattice point xAnx\in A_n^* minimizing yx2\|y-x\|^2. The fastest previously known method is the linear-time algorithm of McKilliam, Clarkson, Smith, and Quinn (MCSQ), which employs bucket sort as a core operation. We present a faster linear-time algorithm. The key observation is that the closest-point objective depends on the rounding residuals only through two prefix aggregates: a count and a residual sum. Hence the elements inside each bucket never need to be sorted, stored, or traversed. This replaces the linked-list traversal and pointer chasing of MCSQ with a single bucketing pass over two flat arrays with counting-sort-style accumulates. A scaled objective further makes most of the computation exact integer arithmetic, and when the input coordinates are rationals with a common denominator, for example, histograms or empirical distibutions, the entire algorithm becomes exact and integer-only. Experiments on an Intel Core i9-13900H show speedups of about 1.8×1.8\times to 3.0×3.0\times over MCSQ for n=2,,100n=2,\dots,100, with larger gains at higher dimensions. The proposed algorithm is also noticeably faster than Conway and Sloan methods for other root lattices, including AnA_n, DnD_n^*, and E8E_8. An open-source implementation is available in the "fanstar" project.

Cite

@article{arxiv.2607.10479,
  title  = {A Faster Closest-Point Algorithm for the $A_n^*$ Lattices},
  author = {Yuriy A. Reznik},
  journal= {arXiv preprint arXiv:2607.10479},
  year   = {2026}
}