Comparison Sorting: Difference between revisions

From Algorithm Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 33: Line 33:
|-
|-
| [[Heap Sort (Comparison Sorting Sorting)|Heap Sort]] || 1964 || $O(n logn)$ || $O({1})$ (in-situ) || Exact || Deterministic || [https://www.bibsonomy.org/bibtex/2f485e4ea9a877871b59ab503151a7f10/bjoern Time]
| [[Heap Sort (Comparison Sorting Sorting)|Heap Sort]] || 1964 || $O(n logn)$ || $O({1})$ (in-situ) || Exact || Deterministic || [https://www.bibsonomy.org/bibtex/2f485e4ea9a877871b59ab503151a7f10/bjoern Time]
|-
| [[Counting Sort (Non-Comparison Sorting Sorting)|Counting Sort]] || 1954 || $O(n+k)$ || $O(n+k)$ || Exact || Deterministic || [http://bitsavers.org/pdf/mit/whirlwind/R-series/R-232_Information_Sorting_in_the_Application_of_Electronic_Digital_Computers_to_Business_Operations_May54.pdf Time]
|-
| [[Bucket Sort (Non-Comparison Sorting Sorting)|Bucket Sort]] || 1940 || $O( n² )$ || $O(n)$ || Exact || Deterministic || 
|-
| [[Radix Sort (Non-Comparison Sorting Sorting)|Radix Sort]] || 1940 || $O(wn)$ || $O(w+n)$ || Exact || Deterministic || 
|-
|-
| [[Tree sort (Comparison Sorting Sorting)|Tree sort]] || 1962 || $O(n logn)$ || $O(n)$ || Exact || Deterministic || [http://www.neubert.net/FSOIntro.html Time]
| [[Tree sort (Comparison Sorting Sorting)|Tree sort]] || 1962 || $O(n logn)$ || $O(n)$ || Exact || Deterministic || [http://www.neubert.net/FSOIntro.html Time]
Line 53: Line 59:
|-
|-
| [[Thorup's Sorting Algorithm (Comparison Sorting Sorting)|Thorup's Sorting Algorithm]] || 2002 || $O(n loglogn)$ || $O(n)$ || Exact || Deterministic || [https://www-sciencedirect-com.ezproxy.canberra.edu.au/science/article/pii/S0196677402912113?via%3Dihub Time]
| [[Thorup's Sorting Algorithm (Comparison Sorting Sorting)|Thorup's Sorting Algorithm]] || 2002 || $O(n loglogn)$ || $O(n)$ || Exact || Deterministic || [https://www-sciencedirect-com.ezproxy.canberra.edu.au/science/article/pii/S0196677402912113?via%3Dihub Time]
|-
| [[Naive sorting (Non-Comparison Sorting Sorting)|Naive sorting]] || 1940 || $O( n² )$ || $O({1})$ (in-situ) || Exact || Deterministic || 
|-
| [[Flash Sort (Non-Comparison Sorting Sorting)|Flash Sort]] || 1998 || $O(n^{2})$ || $O(n)$ || Exact || Deterministic || [http://www.neubert.net/FSOIntro.html Time]
|-
| [[Bead Sort (Non-Comparison Sorting Sorting)|Bead Sort]] || 2002 || $O(n)$ || $O(n^{2})$ || Exact || Deterministic || [https://web.archive.org/web/20170809110409/https://www.cs.auckland.ac.nz/~jaru003/research/publications/journals/beadsort.pdf Time]
|-
| [[Burst Sort (Non-Comparison Sorting Sorting)|Burst Sort]] || 2004 || $O(wn)$ || $O(wn)$ || Exact || Deterministic || [https://dl-acm-org.ezproxy.canberra.edu.au/citation.cfm?doid=1005813.1041517 Time]
|-
| [[Spreadsort (Non-Comparison Sorting Sorting)|Spreadsort]] || 2002 || $O(n*log n)$ || $O(n)$? || Exact || Deterministic || [https://www.semanticscholar.org/paper/The-Spreadsort-High-performance-General-case-Ross/41f5b49e9843b2d98b6b22a84924dae5761e6e52 Time]
|-
|-
| [[Odd Even Sort Parallel  Implementation (Comparison Sorting Sorting)|Odd Even Sort Parallel  Implementation]] || 1972 || $O(n^{2})$ || $O({1})$ || Exact || Parallel || [https://www.semanticscholar.org/paper/Parallel-Neighbor-Sort-(or-the-Glory-of-the-Habermann/bc7b6efb99aae6225239425747fd0169a51f30ce Time]
| [[Odd Even Sort Parallel  Implementation (Comparison Sorting Sorting)|Odd Even Sort Parallel  Implementation]] || 1972 || $O(n^{2})$ || $O({1})$ || Exact || Parallel || [https://www.semanticscholar.org/paper/Parallel-Neighbor-Sort-(or-the-Glory-of-the-Habermann/bc7b6efb99aae6225239425747fd0169a51f30ce Time]
|-
| [[Spaghetti Sort Parallel Implementation (Non-Comparison Sorting Sorting)|Spaghetti Sort Parallel Implementation]] || 1984 || $O(n)$ || $O({1})$ auxiliary? per processor? || Exact || Parallel || [https://link-springer-com.ezproxy.canberra.edu.au/chapter/10.1007/978-94-009-2794-0_11 Time]
|-
|-
|}
|}


== Time Complexity graph ==  
== Time Complexity Graph ==  


[[File:Sorting - Comparison Sorting - Time.png|1000px]]
[[File:Sorting - Comparison Sorting - Time.png|1000px]]


== Space Complexity graph ==  
== Space Complexity Graph ==  


[[File:Sorting - Comparison Sorting - Space.png|1000px]]
[[File:Sorting - Comparison Sorting - Space.png|1000px]]


== Pareto Decades graph ==  
== Pareto Frontier Improvements Graph ==  


[[File:Sorting - Comparison Sorting - Pareto Frontier.png|1000px]]
[[File:Sorting - Comparison Sorting - Pareto Frontier.png|1000px]]

Revision as of 13:03, 15 February 2023

Description

A sorting algorithm is an algorithm that puts elements of a list in a certain order, using comparisons between elements.

Related Problems

Generalizations: Sorting

Related: Non-Comparison Sorting

Parameters

n: size of list

Table of Algorithms

Name Year Time Space Approximation Factor Model Reference
Naive sorting 1940 $O( n² )$ $O({1})$ (in-situ) Exact Deterministic
Selection Sort 1962 $O( n² )$ $O({1})$ (in-situ) Exact Deterministic
Merge Sort 1945 $O(n logn)$ $O(n)$ Exact Deterministic
Bubble Sort 1956 $O( n² )$ $O({1})$ (in-situ) Exact Deterministic
Intro Sort 1997 $O(n logn)$ $O(logn)$ Exact Deterministic Time
Heap Sort 1964 $O(n logn)$ $O({1})$ (in-situ) Exact Deterministic Time
Counting Sort 1954 $O(n+k)$ $O(n+k)$ Exact Deterministic Time
Bucket Sort 1940 $O( n² )$ $O(n)$ Exact Deterministic
Radix Sort 1940 $O(wn)$ $O(w+n)$ Exact Deterministic
Tree sort 1962 $O(n logn)$ $O(n)$ Exact Deterministic Time
Quick Sort 1961 $O( n² )$ $O(logn)$ Exact Deterministic Time & Space
Tim Sort 2002 $O(n logn)$ $O(n)$ Exact Deterministic
Cube Sort Parallel Implementation 1992 $O(n logn)$ $O(n)$ Exact Parallel Time
Shell Sort; (Shell) 1959 $O( n² )$ $O({1})$ (in-situ) Exact Deterministic Time
Shell Sort; (Frank & Lazarus) 1960 $O(n^{1.5})$ $O({1})$ (in-situ) Exact Deterministic Time
Shell Sort; (Pratt) 1971 $O(n log² n)$ $O({1})$ (in-situ) Exact Deterministic Time
Shell Sort; (Sedgewick) 1986 $O(n^{1.{3}3})$ $O({1})$ (in-situ) Exact Deterministic Time
Bitonic Merge Sort Parallel Implementation 1968 $O(log² n)$ $O({1})$? Exact Parallel Time
Thorup's Sorting Algorithm 2002 $O(n loglogn)$ $O(n)$ Exact Deterministic Time
Naive sorting 1940 $O( n² )$ $O({1})$ (in-situ) Exact Deterministic
Flash Sort 1998 $O(n^{2})$ $O(n)$ Exact Deterministic Time
Bead Sort 2002 $O(n)$ $O(n^{2})$ Exact Deterministic Time
Burst Sort 2004 $O(wn)$ $O(wn)$ Exact Deterministic Time
Spreadsort 2002 $O(n*log n)$ $O(n)$? Exact Deterministic Time
Odd Even Sort Parallel Implementation 1972 $O(n^{2})$ $O({1})$ Exact Parallel Time
Spaghetti Sort Parallel Implementation 1984 $O(n)$ $O({1})$ auxiliary? per processor? Exact Parallel Time

Time Complexity Graph

Error creating thumbnail: Unable to save thumbnail to destination

Space Complexity Graph

Error creating thumbnail: Unable to save thumbnail to destination

Pareto Frontier Improvements Graph

Error creating thumbnail: Unable to save thumbnail to destination