sorting integers in the ram model gerth stlting brodal joint work with djamal belazzougui and jesper...
DESCRIPTION
Comparison Based Sorting next scanningTRANSCRIPT
![Page 1: Sorting Integers in the RAM Model Gerth Stlting Brodal Joint work with Djamal Belazzougui and Jesper Sindal Nielsen (to be presented at the 14th Scandinavian](https://reader036.vdocuments.us/reader036/viewer/2022090100/5a4d1b917f8b9ab0599c1255/html5/thumbnails/1.jpg)
Sorting Integers in the RAM Model
Gerth Stølting Brodal
Joint work with Djamal Belazzougui and Jesper Sindal Nielsen(to be presented at the 14th Scandinavian Workshop on Algorithm Theory)
MADALGO Review Meeting, April 28, 2014
![Page 2: Sorting Integers in the RAM Model Gerth Stlting Brodal Joint work with Djamal Belazzougui and Jesper Sindal Nielsen (to be presented at the 14th Scandinavian](https://reader036.vdocuments.us/reader036/viewer/2022090100/5a4d1b917f8b9ab0599c1255/html5/thumbnails/2.jpg)
58 13 138 55 141 137 11 53 10 54
Sorting (Integers)
00001010 00001010 00001101 00110101 00110110 00110111 00111010 10001001 10001010 1000110110 11 13 53 54 55 58 137 138 141
00111010 00001101 10001010 00110111 10001101 10001001 00001010 00110101 00001010 00110110Input
Output
1 2 3 4 5 6 7 8 9 10
12 34 567 89 10
w bits
n integers
Trie
12 34 567 89 10
Patricia trie(branching charcters only)
permutation0
0
0
1
1
1
1
0
1
0
1
0
1
0
1
0
0
0
1
1
1
1
0
0
0
1
1
1
0
0
0
1
10
1 10
0
0
0
-
-
1
-
1
-
1
-
-
-
-
-
1
0
-
0
1
-
1
-
0
-
-
-
1
-
-
-
0
-
10
- -0
0
![Page 3: Sorting Integers in the RAM Model Gerth Stlting Brodal Joint work with Djamal Belazzougui and Jesper Sindal Nielsen (to be presented at the 14th Scandinavian](https://reader036.vdocuments.us/reader036/viewer/2022090100/5a4d1b917f8b9ab0599c1255/html5/thumbnails/3.jpg)
Merge sort: von Neumann 1945
Ford et al. 1959: Lower bound ≥ comparions
Comparison Based Sorting
11 13 53 55 58 137 138 141
58
13
138
55
141
54
137
53
10
11
13 58
55 138
137 141
11 53
10 54
13 55 58 138
11 53 137 141
10 11 13 53 54 55 58 137 138 141
comparions
next
next
next
13 55 58 138
11 53 137 141
11 13 53 55 58 137 138 141
scanning
scanning
scanning
![Page 4: Sorting Integers in the RAM Model Gerth Stlting Brodal Joint work with Djamal Belazzougui and Jesper Sindal Nielsen (to be presented at the 14th Scandinavian](https://reader036.vdocuments.us/reader036/viewer/2022090100/5a4d1b917f8b9ab0599c1255/html5/thumbnails/4.jpg)
Sorting Networks
O(n·log2 n) size : Batcher 1968O(n·log n) size : Ajtai, Komlós, Szemerédi 1983; Paterson 1990; Goodrich 2014
138
13
58
55
13
138
55
58
13
55
58
138
55
58
138
13
58
55
13
55
58
138
Input Output
Original motivated by hardware implementations
Renewed interest since data-oblivious̶C applications in privacy preserving computations ̶C allows for parallel computations on bit-level and GPU
![Page 5: Sorting Integers in the RAM Model Gerth Stlting Brodal Joint work with Djamal Belazzougui and Jesper Sindal Nielsen (to be presented at the 14th Scandinavian](https://reader036.vdocuments.us/reader036/viewer/2022090100/5a4d1b917f8b9ab0599c1255/html5/thumbnails/5.jpg)
Results
Bucket sort O(n+2w)
Radix sort; Hollerith 1887van Emde Boas 1975Willard 1983
superlinear spaceexpected
Kirkpatrick and Reicsh 1983
Merge sort: von Neumann 1945 comparison based optimal
Thorup and Han 2002 expected
Andersson et al. 1998 O(n) expected,
NEW O(n) expected,
Time per element
wlog2 n·loglog n log2+ε n
O (√ log log n )
O(1)
log n
1
2
3
1
2
3
NEW
![Page 6: Sorting Integers in the RAM Model Gerth Stlting Brodal Joint work with Djamal Belazzougui and Jesper Sindal Nielsen (to be presented at the 14th Scandinavian](https://reader036.vdocuments.us/reader036/viewer/2022090100/5a4d1b917f8b9ab0599c1255/html5/thumbnails/6.jpg)
Open Question
Sorting in linear time for all w?
wlog2 n·loglog n log2+ε n
O (√ log log n )
O(1)
log n
NEW
Time per element