Docsity

Computational Geometry: Understanding Convex Hull Algorithms, Lecture notes of Computer Science

Partial preview of the text

Download Computational Geometry: Understanding Convex Hull Algorithms and more Lecture notes Computer Science in PDF only on Docsity!

Computational Geometry, Convex

Hull

Computational Geometry

 Convex Hull

 Tightest convex polygon around set of points

 Delauney Triangulation

 Voronoi Diagram

Known convex-hull algorithms

 n=number of points; h=points in hull

 Gift wrapping aka Jarvis march — O(nh)

 Graham scan — O(n log n)

 QuickHull

 Divide and conquer — O(n log n)

 Monotone chain — O(n log n)

 Incremental convex hull algorithm — O(n log n)

 Marriage-before-conquest — O(n log h)

 Chan's algorithm — O(n log h) (1996)

Graham Scan

 Find bottom point, P

 Sort other points in counter-clockwise order

around P

 For Q in sorted list

 add Q to hull

 while (last turn a “right turn” (and ≥3 points))

 remove 2nd-to-last point

 Add P to hull

Quicksort Analysis

Structures/Algorithms Analysis

 list, array, queue, stack, priority queue, heap, hash table, binary search tree, tree, graph, directed graph, directed acyclic graph  binary search (BS), rand select (median), topological sort, convex hull, seamcarve  quicksort (QS), mergesort (MS), heapsort, insertion sort, selection sort, radix sort

 Op counting  Loops, recursion  Recurrence relations  Inductive proofs  O() , Ω(), Θ()  Worst case, average case, expected case  Master theorem