A class of orders with linear? time sorting algorithm
Laurent Lyaudet

TL;DR
This paper introduces a new class of orders called finite width tree structured orders and demonstrates that they can be sorted in linear time using a variant of radix sort, with broad applications including SQL query sorting.
Contribution
It defines finite width tree structured orders and proves they can be converted to lexicographic order in linear time, enabling efficient sorting algorithms for complex data types.
Findings
Finite width tree structured orders include many practical data types.
Conversion to lexicographic order is achievable in linear time and space.
The approach applies to real-world orders like integers, strings, and SQL sorts.
Abstract
In this article, we give a precise mathematical meaning to `linear? time' that matches experimental behaviour of the algorithm. The sorting algorithm is not our own, it is a variant of radix sort with counting sort as a subroutine. The true result of this article is an efficient universality result for lexicographic order, or more generally for some linear extensions of the partial order `Next': `if current items are equal, compare next items'. We define new classes of orders: (Finite width) Tree Structured Orders. We show that an instance of a finite width tree structured order can be converted in linear time and space to an instance of lexicographic order. The constants implied by the `nextification' algorithm are small (around 3 for real world orders). The class of finite width tree structured orders contains finite orders ({0, 1}, int32, int64, ..., float, double, ...), and orders…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAlgorithms and Data Compression · Advanced Database Systems and Queries · semigroups and automata theory
