Two Topics in Adaptive Algorithms: Hulls and Strings Robert Fraser University of Waterloo
2 What to expect Convex Hulls –Adaptive sorting, measures of difficulty –Techniques –Adaptivity of output sensitive techniques String Matching –Online string matching –Boyer Moore Horspool technique –Adaptive string matching
Adaptive Sorting All kinds of techniques and measures (see Estivill-Castro & Wood, 89) I love Straight Merge Sort! (Odd-even sms is pretty good too…) 3
Planar Convex Hulls Many techniques –Gift wrapping –Graham Scan –Output sensitive –Adaptive (Levcopolous et al., Barbay & Chen) –New adaptive techniques? 4
Adaptivity of CSY-hull Ω(n log h) Add a step CHECKHULL to give adaptivity Considering performance on a good instance however, you get CUPS Could also determine difficulty of interior points… 5
Adaptivity wrt Max! 6 Max Comparisons Quicksort LP-odd-even sms LP sort Odd-even sms Straight mergesort
Adaptivity wrt Runs! 7 Runs Comparisons Quicksort LP-odd-even sms LP sort Odd-even sms Straight mergesort with reverse!
Busiest slide ever? 8
New York GIS data points, 33 on hull sm: oesm: lpoesm: lp: gs: dis: max:
10 String Matching Techniques Naïve –standard sliding window –θ(n·m) Linear time –as discussed by KMP –O(n+m) Expected sublinear –We’ll look at the standard Boyer-Moore Horspool, but there are many! –O(n log m/m +m) expected, O(n·m) worst case
Boyer Moore Horpsool bbbcbaaccaa accaa
String Matching with More Jumps Try to maximize the jumps with Horspool- type searching 12
Extensions Uneven distribution of data 2D string matching Applications (bioinformatics) Works best on small alphabets with many repeats 13
14 Thanks Questions? Supported by NSERC and the University of Waterloo