A class of orders with linear? time sorting algorithm

09/04/2018
by   Laurent Lyaudet, et al.
0

In this article, we give a precise mathematical meaning to `linear? time' that matches experimental behaviour of the algorithm. The 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 `if current elements are equal, compare next elements'. 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 algorithm are small. The class of finite width tree structured orders contains finite orders (0, 1, int32, int64, ..., float, double, ...), and orders contructed from them on a tree structure. In particular, unbounded integers, strings with arbitrary collation, and all orders used for sorting SQL queries are finite width tree structured orders.

READ FULL TEXT
research
04/21/2023

Faster Prefix-Sorting Algorithms for Deterministic Finite Automata

Sorting is a fundamental algorithmic pre-processing technique which ofte...
research
05/31/2022

Efficient Algorithms for Sorting in Trees

Sorting is a foundational problem in computer science that is typically ...
research
04/21/2021

On the Width of Regular Classes of Finite Structures

In this work, we introduce the notion of decisional width of a finite re...
research
02/20/2023

Ordinal measures of the set of finite multisets

Well-partial orders, and the ordinal invariants used to measure them, ar...
research
12/15/2020

Sorting Lists with Equal Keys Using Mergesort in Linear Time

This article introduces a new optimization method to improve mergesort's...
research
05/24/2023

Learning the String Partial Order

We show that most structured prediction problems can be solved in linear...
research
02/12/2021

Querying collections of tree-structured records in the presence of within-record referential constraints

In this paper, we consider a tree-structured data model used in many com...

Please sign up or login with your details

Forgot password? Click here to reset