\documentclass[11pt]{article} \usepackage[margin=1in]{geometry} \usepackage{amsmath,amssymb,amsthm} \usepackage{booktabs,xcolor} \usepackage{algorithm} \usepackage[noend]{algpseudocode} \usepackage[numbers,sort&compress]{natbib} \usepackage[colorlinks=true,linkcolor=blue!50!black,citecolor=blue!50!black,urlcolor=blue!50!black]{hyperref} \usepackage{enumitem} \setlist{nosep,leftmargin=*} \newtheorem{theorem}{Theorem} \newtheorem{lemma}{Lemma} \newtheorem{proposition}{Proposition} \newtheorem{corollary}{Corollary} \theoremstyle{definition} \newtheorem{definition}{Definition} \theoremstyle{remark} \newtheorem{remark}{Remark} \newcommand{\rmax}{r_{\max}} \newcommand{\lev}{\ell} \newcommand{\Loc}{\textsc{Locate}} \title{The Multi-Radix Heap:\\ A Mixed-Radix Monotone Priority Queue for Dijkstra's Algorithm} \author{Gregory Disney-Leugers\\ \small Encryptid Systems} \date{November 2026} \begin{document} \maketitle \begin{abstract} We define the multi-radix heap $\mathrm{MRH}(r;C)$, a monotone integer priority queue parameterised by an arbitrary tuple of radices $r=(r_0,\dots,r_{k-1})$ with $\prod_jr_j\ge C+1$. Keys are addressed by their mixed-radix digits with place values $\pi_0=1$, $\pi_{j+1}=\pi_jr_j$. A key is stored at the most significant digit in which it differs from the current frontier, and keys in the next block of size $\pi_k$ share a single overflow bucket. We prove that every item's level only decreases, and that each extract-min redistributes at most one bucket. It follows that any sequence of $n$ inserts, $m$ decrease-keys and at most $n$ extract-mins, with keys in a sliding window of width $C+1$, runs in $O(m+n(k+\rmax))$ time, where $\rmax=\max_jr_j$, using $O(n+\sum_jr_j)$ space. A refined bound weights each radix by the number of extract-mins that scan its level. Dijkstra's algorithm on a graph with $n$ vertices, $m$ arcs and integer lengths at most $C$ inherits the same bound. Binary radices give the $O(m+n\log C)$ bound of the one-level radix heap, uniform radices $\Delta=\Theta(\log C/\log\log C)$ give the $O(m+n\log C/\log\log C)$ bound of the two-level radix heap, and a single level of $C+1$ buckets is Dial's algorithm. A stored operation-count ablation of a reference implementation over eight radix tuples at $C=4095$ is reported. All eight runs reproduced binary-heap distances. The ablation shows that reordering the same radices changes the number of bucket scans by a factor of 7.2. \end{abstract} \section{Introduction} A priority queue is \emph{monotone} if successive extract-min operations return nondecreasing keys~\cite{thorup96,costa}. Dijkstra's algorithm~\cite{dijkstra} on a graph with non-negative arc lengths uses its queue monotonically: every key inserted or decreased after a vertex $u$ is settled is at least $d(u)$. When lengths are integers bounded by $C$, every such key also lies in the window $[d(u),d(u)+C]$, and bucket structures whose cost depends on $C$ rather than on comparison depth become available. Dial~\cite{dial} used $C+1$ unit-width buckets. Denardo and Fox~\cite{denardofox} introduced multi-level buckets with a uniform branching factor per level. Johnson~\cite{johnson} and Ahuja, Mehlhorn, Orlin and Tarjan~\cite{amot} developed radix heaps, whose one-level form uses $O(\log C)$ buckets of exponentially growing width and whose two-level form replaces powers of two by powers of a parameter $\Delta$. Cherkassky, Goldberg and Silverstein~\cite{cgs} combined multi-level buckets with heaps, and Goldberg and Silverstein~\cite{goldbergsilverstein} studied implementations. Practical libraries such as TLX~\cite{tlx} expose radix heaps with a single power-of-two radix. All of these structures fix one branching factor, or one sequence of bucket widths. We define a queue whose bucket hierarchy is induced by an \emph{arbitrary} radix tuple $(r_0,\dots,r_{k-1})$, possibly with unequal entries. We are not aware of a prior definition of a priority queue parameterised in this way. The structure is close in spirit to Denardo--Fox multi-level buckets. It differs in three respects: it allows level-dependent radices, it places keys relative to the frontier by their most significant differing digit, and it handles the sliding window with one overflow bucket rather than a wrap-around top level. \paragraph{Contributions.} \begin{enumerate} \item A precise definition of $\mathrm{MRH}(r;C)$ and its invariants (Section~\ref{sec:def}). It needs only $\prod_jr_j\ge C+1$. \item Correctness (Theorem~\ref{thm:correct}) and the amortised bound $O(m+n(k+\rmax))$, with a refined form $O(m+nk+\sum_jr_jE_j)$ in which $E_j$ counts the extract-mins that scan level $j$ (Theorem~\ref{thm:cost}). \item Dijkstra's algorithm on the multi-radix heap (Section~\ref{sec:dijkstra}): correctness, the running time $O(m+n(k+\rmax))$, and the radix-heap and Dial bounds as special cases. \item An operation-count ablation over eight radix tuples (Section~\ref{sec:exp}), and a description of two implementations (Section~\ref{sec:impl}). \end{enumerate} \section{Definition}\label{sec:def} \subsection{Mixed-radix addressing} \begin{definition}[radix tuple] Let $C\ge0$ be an integer. A \emph{radix tuple for $C$} is $r=(r_0,\dots,r_{k-1})$ with integers $r_j\ge2$ and \begin{equation}\label{eq:cover} \pi_k\ge C+1,\qquad\text{where}\quad \pi_0=1,\quad \pi_{j+1}=\pi_jr_j . \end{equation} We also admit the degenerate tuple $k=1$, $r_0=C+1$, which covers $C=0$. Write $\rmax=\max_jr_j$. \end{definition} For an integer $x\ge0$ define the digits and the block \begin{equation} \delta_j(x)=\Big\lfloor\frac{x}{\pi_j}\Big\rfloor\bmod r_j\quad(0\le j\delta_j(\mu)$. \item[(b)] If $\lev_\mu(\kappa)<\lev_\mu(\kappa')$, then $\kappa<\kappa'$. \item[(c)] If $\lev_\mu(\kappa)=\lev_\mu(\kappa')=j\mu$, so $\delta_j(\kappa)>\delta_j(\mu)$. (b) Let $j'=\lev_\mu(\kappa')$. If $j'=k$, then $\beta(\kappa')=\beta(\mu)+1$ by Lemma~\ref{lem:window} while $\beta(\kappa)=\beta(\mu)$, so $\kappa<\kappa'$. If $j'\delta_{j^\ast}(\mu)$ with $B_{j^\ast}[t]$ nonempty \Comment{at most $r_{j^\ast}$ probes} \EndIf \State $\mu\gets\min\{K(y):y\in B_{j^\ast}[t^\ast]\}$ \If{$j^\ast\ge1$} \For{each $y$ in $B_{j^\ast}[t^\ast]$} \State move $y$ to $B_{\Loc(K(y),\,\min(j^\ast-1,k-1))}$ \EndFor \EndIf \EndIf \State remove any item $x$ from $B_0[\delta_0(\mu)]$ and \Return $(x,K(x))$ \end{algorithmic} \end{algorithm} \section{Correctness and cost}\label{sec:analysis} \begin{lemma}[frontier advance]\label{lem:advance} In a valid configuration with $B_0[\delta_0(\mu)]$ empty, let $j^\ast,t^\ast$ be as in Algorithm~\ref{alg:extract} and let $\mu'$ be the least key in $B_{j^\ast}[t^\ast]$. Then \begin{enumerate} \item[(i)] $\mu'$ is the least key in the heap; \item[(ii)] every item $x\notin B_{j^\ast}[t^\ast]$ satisfies $a_{\mu'}(K(x))=a_\mu(K(x))$; \item[(iii)] if $j^\ast\ge1$, every $y\in B_{j^\ast}[t^\ast]$ satisfies $\lev_{\mu'}(K(y))