140 likes | 296 Views
Two Topics in Adaptive Algorithms: Hulls and Strings. Robert Fraser University of Waterloo. 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
E N D
Two Topics in Adaptive Algorithms: Hulls and Strings Robert Fraser University of Waterloo
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…)
Planar Convex Hulls • Many techniques • Gift wrapping • Graham Scan • Output sensitive • Adaptive (Levcopolous et al., Barbay & Chen) • New adaptive techniques?
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…
Adaptivity wrt Max! LP sort Quicksort Comparisons LP-odd-even sms Straight mergesort Odd-even sms Max
Adaptivity wrt Runs! LP sort Quicksort LP-odd-even sms Odd-even sms Comparisons Straight mergesort Straight mergesort with reverse! Runs
New York GIS data 264346 points, 33 on hull sm: 4346700 oesm: 4351874 lpoesm: 6056577 lp: 9408131 gs: 5792637 dis: 263950 max: 207419
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
String Matching with More Jumps • Try to maximize the jumps with Horspool-type searching
Extensions • Uneven distribution of data • 2D string matching • Applications (bioinformatics) • Works best on small alphabets with many repeats
Thanks • Questions? Supported by NSERC and the University of Waterloo