Optimal Shift Encoding for Binary Tries
Year: 2026
Type: preprint
Abstract: Let $A$ be a set of $n$ distinct $K$-bit integers. We seek a circular additive shift minimizing the number of edges in the binary trie of the shifted set. We give an explicit algorithm finding an optimal shift in $O(nK)$ time and $O(n)$ auxiliary space. The construction decomposes the trie measure into periodic level functions, derives their transitions from cyclic successive differences of the input, and minimizes their sum using a recurrence over residue classes. The resulting algorithm operates on compact transition representations, with each level processed in $O(n)$ time. We also study the gap between the average and optimal shifted trie measures. We obtain quantitative bounds and matching constructions showing, in particular, that the classical additive bound $2(n-1)$ is asymptotically sharp for families satisfying $K\ll n\ll 2^{K}$.
Author: Lazar Korsić
Language: English
Subfield: Artificial Intelligence
Field: Computer Science
Domain: Physical Sciences
Open Access status: green
OpenAlex ID: W7212446247
Cites:
Cited by:
Related to:
