Slowsort
Slowsort is a sorting algorithm.[src] It is of humorous nature and not useful for practical applications.[src] It is a reluctant algorithm based on the principle of multiply and surrender (a parody formed by taking the opposites of divide and conquer).[src] It was published in 1984 by Andrei Broder and Jorge Stolfi in their paper "Pessimal Algorithms and Simplexity Analysis" (a parody of optimal algorithms and complexity analysis).[src]
Slowsort is a sorting algorithm.[src] It is of humorous nature and not useful for practical applications.[src] It is a reluctant algorithm based on the principle of multiply and surrender (a parody formed by taking the opposites of divide and conquer).[src] It was published in 1984 by Andrei Broder and Jorge Stolfi in their paper "Pessimal Algorithms and Simplexity Analysis" (a parody of optimal algorithms and complexity analysis).[src] ==Algorithm== Slowsort is a recursive algorithm.[src] It sorts in-place.[src] It is an unstable sort.[src] (It might change the order of equal-valued keys.) A pseudocode implementation is given below: procedure slowsort(A[], start_idx, end_idx) // Sort array range A[start ...[src] end] in-place.[src] if start_idx ≥ end_idx then return middle_idx := floor( (start_idx + end_idx)/2 ) slowsort(A, start_idx, middle_idx) // (1.1) slowsort(A, middle_idx + 1, end_idx) // (1.2) if A[end_idx] Sort the first half, recursively.[src] (1.1) Sort the second half, recursively.[src] (1.2) Find the maximum of the whole array by comparing the results of 1.1 and 1.2, and place it at the end of the list.[src] (1.3) Sort the entire list (except for the maximum now at the end), recursively.[src] (2) An unoptimized implementation in Haskell (purely functional) may look as follows: slowsort :: (Ord a) => [a] -> [a] slowsort xs | length xs ==Complexity Analysis== The time complexity of Slowsort is given by the function T(n) = 2 T(n/2) + T(n-1) + 1 .[src] It can be found by creating a recurrence relation of the initial recursive calls (1.1) and (1.2) respectively and summing the final recursive call (2) and modelling the other operations as a constant (+1) in this case.[src] This gives a lower asymptotic bound for T(n) , which in Landau notation is given as \Omega\left(n^{ \log_2(n)/(2+\epsilon)}\right) for any \epsilon > 0 .[src] Therefore Slowsort is not in polynomial time.[src] ==References==[src]
22 sentences · 22 cited inline · 0 references stored
References
No reference rows published for this article.
Cite this article
MLA
"Slowsort." encyclopegia.org, 2026, https://encyclopegia.org/wiki/slowsort. Accessed 26 November 2026.
Chicago
"Slowsort." encyclopegia.org. Accessed November 26, 2026. https://encyclopegia.org/wiki/slowsort.
APA
encyclopegia.org. (2026). Slowsort. Retrieved November 26, 2026, from https://encyclopegia.org/wiki/slowsort
Accessed November 26, 2026 · CC BY-SA 4.0 · citation page · JSON
Claims
| Predicate | Value | Source |
|---|---|---|
| publication date | 1984 | Wikipedia |