Saved in:
Bibliographic Details
Main Author: Abrahamsen, Mikkel
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2409.00794
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866913491383746560
author Abrahamsen, Mikkel
author_facet Abrahamsen, Mikkel
contents We introduce the algorithm ExpoSort, a groundbreaking method that sorts an array of $n$ numbers in a spectacularly inefficient $Θ(2^n)$ time. ExpoSort proudly claims the title of the first reluctant algorithm to decisively surpass the quasi-polynomial running time $Ω(n^{\log n/(2+\varepsilon)})$ of the notoriously sluggish SlowSort algorithm by Broder and Stolfi [ACM SIGACT News, 1984]. In the ongoing quest for the slowest possible sort, ExpoSort redefines what it means to take one's time. Remarkably, ExpoSort achieves this feat with one of the simplest pseudocodes among all known sorting algorithms. However, a slight modification -- merely moving one recursive call inside an if statement -- transforms ExpoSort into an astonishingly well-camouflaged variant of the classic InsertionSort with best- and worst-case running times of $Θ(n)$ and $Θ(n^3)$, respectively. This dual nature of ExpoSort serves as a reminder of the utmost care required when crafting pessimal algorithms, where a slight lapse in judgment could result in accidentally producing an embarrassingly practical algorithm.
format Preprint
id arxiv_https___arxiv_org_abs_2409_00794
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle ExpoSort: Breaking the quasi-polynomial-time barrier for reluctant sorting
Abrahamsen, Mikkel
Data Structures and Algorithms
We introduce the algorithm ExpoSort, a groundbreaking method that sorts an array of $n$ numbers in a spectacularly inefficient $Θ(2^n)$ time. ExpoSort proudly claims the title of the first reluctant algorithm to decisively surpass the quasi-polynomial running time $Ω(n^{\log n/(2+\varepsilon)})$ of the notoriously sluggish SlowSort algorithm by Broder and Stolfi [ACM SIGACT News, 1984]. In the ongoing quest for the slowest possible sort, ExpoSort redefines what it means to take one's time. Remarkably, ExpoSort achieves this feat with one of the simplest pseudocodes among all known sorting algorithms. However, a slight modification -- merely moving one recursive call inside an if statement -- transforms ExpoSort into an astonishingly well-camouflaged variant of the classic InsertionSort with best- and worst-case running times of $Θ(n)$ and $Θ(n^3)$, respectively. This dual nature of ExpoSort serves as a reminder of the utmost care required when crafting pessimal algorithms, where a slight lapse in judgment could result in accidentally producing an embarrassingly practical algorithm.
title ExpoSort: Breaking the quasi-polynomial-time barrier for reluctant sorting
topic Data Structures and Algorithms
url https://arxiv.org/abs/2409.00794