Stable sorting on multitape Turing machines

A machine must sort binary keys together with the data attached to each key. On a tape it must move its heads through the representation as it reads and writes. How many steps does stable sorting take as a function of the input’s total bit length?

Why it matters and what counts as progress

Why it matters: The tape model counts the cost of moving data. It exposes a cost that random-access sorting bounds can hide, especially when keys and their associated data have different lengths.

What counts as progress: Tighten the gap between the reported sub-N log⁡N\log N bound and known lower bounds. For items of logarithmic width, the preprint asks for a saving by a fixed power of log⁡n\log n.

How the problem developed

  1. 1985 · Tape mergesort question [1]

    Martti Penttonen and Jyrki Katajainen They discuss the tape mergesort bound and ask whether it can be improved.

  2. 22 Nov 2026 · Sub-N log⁡N\log N tape sorting reported [2]

    Yann Tal with GPT-6 The first report gives a stable sorter for variable-length keys and associated data in sub-comparison time.

  3. 28 Nov 2026 · Improved time bound and circuit extension reported [3]

    Yann Tal with GPT-6 Revision 2 tightens the tape running time and extends the routing method to bounded-fan-in Boolean circuits.

Follow new AI contributions to this problem.

Get email updates

Download problem history

AI contribution

Stable sorting in o(Nlog⁡N)o(N \log N) steps on a multitape Turing machine

Yann Tal

For n pairs of binary keys and associated strings of total encoded length N, including delimiters, Theorem 1.1 gives stable lexicographic sorting in O(Nlog⁡n/(log⁡log⁡log⁡n)(1/2−o(1)))O(N \log n / (\log \log \log n)^{(1/2-o(1))}) time and O(N)O(N) space. Appendix B implements it with two writable tapes. The same bounds apply to signed numbers written as finite expansions in a fixed base.

AI involvementAI-centered
ImportanceNotable
Technical verificationReported
Human understandingFew
Paper date:

Research directions discussed by researchers in connection with AI contributions to this problem.

A larger time saving for stable sorting on tapes

Sharper bounds · Algorithm design · Computational complexity

Can a deterministic machine with a fixed number of tapes and linear space stably sort nn items of Θ(log⁡n)\Theta(\log n) bits each in O(n(log⁡n)2−δ)O(n(\log n)^{2-\delta}) time for a fixed δ>0\delta>0?

Tal retains this question in the revised paper. The tape algorithm saves a power of the triple logarithm over tape mergesort. Technical report · Status update on A larger time saving for stable sorting on tapes

Fast routing on tapes for polynomial-width strings

Generalization · Algorithm design · Computational complexity

Can a deterministic machine with a fixed number of tapes and linear space route QQ strings to their prescribed destinations in O((log⁡Q)1−δ)O((\log Q)^{1-\delta}) steps per bit, for some fixed δ>0\delta>0, when each string has at least QaQ^a bits for a fixed a>0a>0?

Main obstacle The method reaches the requested time bound when string width is exponential in a power of the number of strings.

Corollary A.2 gives an iterated-logarithm time saving for polynomial-width strings. Question 7.2 asks for a saving by a power of the logarithm. Technical report · Status update on Fast routing on tapes for polynomial-width strings

Sources

  1. PDF · Notes on the complexity of sorting in abstract machines
  2. Technical report · Sorting in o(Nlog⁡N)o(N \log N) Time on a Multitape Turing Machine
  3. Technical report · Sorting with o(Nlog⁡N)o(N \log N) Tape Steps and Boolean Gates
  4. Technical report · Sorting with o(Nlog⁡N)o(N \log N) Tape Steps and Boolean Gates
  5. Technical report · Authors’ attribution
  6. Technical report · Exact multitape claim
  7. Technical report · Proof of the general input bound
  8. Technical report · Two writable tapes
Publication history