Hull Optinp Talk
Hull Optinp Talk
Timothy Chan
Eric Chen
School of CS U of Waterloo
Sublinear space ??
CONSTANT space !!
In-Place Algms
Example: heapsort The model
array of n elements (RAM, read/write)
extra words
of space
(+ write-only output stream)
[Brnnimann,Iacono,Katajainen,Morin,Morrison,Toussaint'02]
Simple polygonal chains: O(n) time, O(1) space 2-d maxima layers O(n log n) time, O(1) space [Blnck,Vahrenhold06] 2-d red/blue closest pair O(n log n) time, O(1) space
2-d nearest neighbor search O(log2 n) time, O(1) space [Brnnimann,Chan,Chen,SoCG04] O(log1.7096 n) time, O(1) space [Chan,Chen,SODA08]
New Results
3-d convex hulls O(n log n) time (rand.), O(1) space
2-d segment intersection O(n log n + K) time (rand.), O(1) space OPTIMAL !!
Allow possibly large (O(n polylog n)) # of extra bits But each bit access costs O(1) time Note: pointers can be stored in the array of bits, but each pointer op would cost O(log n) Ex: binary search in an arbitrary list now costs O(log2 n)
5 3 7 9 2 8 6 1
0 1 1 0
New idea: cant reduce overhead O(n log n), but try to divide into larger # of subproblems in O(n log n) time
cost of partitioning = O(n log r) # pointer ops = O(r log r) cost of pointer ops = O(r log2 r) (note: similarity to quicksort)
Final Analysis
T(n) = O(r) T(n/r) + O(n log r + r log2 r) Choose r = n/log n T(n) = O(n/log n) T(log n) + O(n log n) T(n) = O(n log n)