Radix Sort

Creator
Creator
Seonglae ChoSeonglae Cho
Created
Created
2023 Sep 7 6:45
Editor
Edited
Edited
2023 Sep 21 7:2
Refs
Time
Time
Worst
Worst
Stable
Stable
Stable
Inplace
Inplace
Inplace
Comparision
Comparision
Comparision
Hermen Hollerith’s card sorting machine for the 1890 US Census
  • Digit-by-digit
  • Sort on least-significant digit first with auxiliary stable sort
prove is done by
Mathematical induction
notion image
Stable Sort
needed for each vertical step
We use
Counting Sort
because each step’s sorting value is small
notion image
First part of complexity if # of executions of sorting and later part means each execution complexity
We can control as an optimization part to minimize complexity. Increasing means fewer passes and after , the time grows exponentially.
Case of 32-bit machine with 100,000 input size, near 15 is optimal
Case of 32-bit machine with 100,000 input size, near 15 is optimal
It is convex function. you can find optimal value when the input size and machine architecture is fixed.
If you are lazy, implies which are not best but also not bad.
is usually 32 or 64 so if numbers in the range from 0 to we have . So radix sort runs in
 

Summary

In practice, radix sort is fast for large inputs, as well as simple to code and maintain.
Unlike quicksort, radix sort displays little locality of reference
 
 
 
 
 

Recommendations