arXiv:2610.20079cs.DSOct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.20079

Undirected Network Coding and Faster External-Memory Integer Sorting

Baochun Li, Zongpeng Li, Sirui Liu

Abstract

Network coding allows intermediate nodes to combine messages, whereas routing only forwards them. The Li–Li conjecture asserts that network coding and fractional routing have the same capacity region in undirected multiple-unicast networks. We give a counterexample to this conjecture and apply it to external-memory integer sorting. Since Aggarwal and Vitter posed the question in 1988, whether integer sorting can beat the external-memory comparison bound has remained a central and extensively studied open problem.

We give a deterministic sorting algorithm: for NN integers of Θ(log⁡N)\Theta(\log N) bits, a memory holding MM integers, and block transfers of BB integers, where 2B≤M≤N2B \leq M \leq N, the number of block transfers is

O(NB[1+log⁡N(log⁡(M/B))1−ε(log⁡M)ε]),O\bigg(\frac{N}{B}\left[1+\frac{\log N}{(\log(M/B))^{1-\varepsilon}(\log M)^{\varepsilon}}\right]\bigg),

where ε>0\varepsilon > 0 is an absolute constant. In a range of parameter regimes, this bound is asymptotically smaller than the classical comparison-sorting bound. We also use Lean 4 to verify the sorting algorithm’s correctness and complexity bounds, and the strict advantage of coding over routing.

1 Introduction

Network coding allows intermediate nodes to encode messages, whereas routing only forwards them along paths. In 2004, Li and Li proposed the Li–Li conjecture: in an undirected multiple-unicast network carrying independent messages, with the two directions sharing each edge’s capacity, network coding cannot achieve higher rates than fractional routing [LL04]. The conjecture is also closely connected to several important problems in theoretical computer science; if true, it would imply conditional complexity lower bounds, including for external-memory integer sorting [AHJ +^{+}06, FHLS19, AFKL19].

In 2026, Zhang, Li, and Li [ZLL26] and Braverman and He [BH26] independently constructed counterexamples in undirected multiple-unicast networks, showing that network coding can strictly outperform fractional routing and thereby refuting the Li–Li conjecture. These counterexamples establish a communication advantage, but invalidating the assumption behind a conditional lower bound does not itself produce a faster algorithm.

External-memory integer sorting is one problem closely tied to the conjecture. The N input integers are stored on disk, memory holds M machine words, and each transfer between disk and memory moves one block of B consecutive words. The I/O complexity is the total number of such block transfers. The optimal classical comparison-sorting bound is [AV88]

Θ(NB[1+log⁡(N/M)log⁡(M/B)]).(1)\Theta\left(\frac{N}{B}\left[1+\frac{\log(N/M)}{\log(M/B)}\right]\right). \tag{1}

In 1988, Aggarwal and Vitter asked whether allowing algorithms to exploit the bits of integer keys could improve on this comparison bound [AV88]. This has long been a central open problem in external-memory algorithms [FHLS19]. Despite substantial progress on integer sorting in internal memory [Han02, HT02], obtaining corresponding external-memory algorithms has remained difficult. Farhadi, Hajiaghayi, Larsen, and Shi [FHLS19] further showed that, if the Li–Li conjecture holds, then even arbitrary bit operations cannot yield an asymptotic improvement over comparison sorting in parameter ranges including B≥log⁡NB \geq \log N. Section 1.1 states the precise conditional lower bound.

We turn the communication advantage of coding into fewer block transfers. We first construct a finite undirected multiple-unicast network in which binary linear coding strictly outperforms fractional routing. We then turn this finite linear construction into an address-field interchange operation, recursively reducing long-field interchanges to short-field interchanges and handling short fields directly with memory buffers. Building on existing recursive field-exchange techniques [Ope26], we combine this operation with Columnsort and most-significant-digit (MSD) radix sorting to obtain a deterministic external-memory integer sorting algorithm.

Specifically, for every 2B≤M≤N2B \leq M \leq N, our algorithm sorts NN integers of Θ(log⁡N)\Theta(\log N) bits in

O(NB[1+log⁡N(log⁡(M/B))1−ε(log⁡M)ε])O\bigg(\frac{N}{B}\left[1+\frac{\log N}{(\log(M/B))^{1-\varepsilon}(\log M)^{\varepsilon}}\right]\bigg)

I/Os, where the absolute constant can be taken as ε=1.8×10−11>0\varepsilon = 1.8 \times 10^{-11} > 0. The algorithm is correct for every input, including repeated values, and uses at most MM words of memory and polynomial disk space. In particular, when M=2BM = 2B and N=B2N = B^2, classical comparison sorting requires Θ(Blog⁡B)\Theta(B \log B) I/Os, whereas our algorithm uses O(B(log⁡B)1−ε)O(B(\log B)^{1-\varepsilon}). Despite the small exponent, this is an asymptotic improvement.

Formal verification. We use Lean 4 and Mathlib [dMU21, The20] to formalize Theorems 2.1 and 2.2. 1^{1} For sorting, the verification covers termination, correctness, and the bounds on storage and block transfers. For the network construction, it verifies that coding strictly outperforms fractional routing on the same undirected network. Appendix D gives the verification conventions and reproduction instructions.

ChatGPT assisted with exploring the constructions, developing and examining proof arguments, and implementing the Lean formalization; the statement at the end of the paper details this use.

Sections 2–3 give the model, main results, and proof overview. Section 4 constructs the coding counterexample, and Section 5 applies it to address-field interchange. Sections 6–7 construct the sorting algorithm and complete the main proof. The appendices supply memory simulation, fixed-parameter calculations, treatment of general address shapes, and formalization details.

References (27)