Convex hull 1 - 1 Convex hull 1 - 2 Convex hull 1 - 3 Convex - - PowerPoint PPT Presentation

convex hull
SMART_READER_LITE
LIVE PREVIEW

Convex hull 1 - 1 Convex hull 1 - 2 Convex hull 1 - 3 Convex - - PowerPoint PPT Presentation

Convex hull 1 - 1 Convex hull 1 - 2 Convex hull 1 - 3 Convex hull Definition, extremal point Jarvis algorithm Orientation predicate Buggy degenerate example Real RAM model and general position hypothesis Graham


slide-1
SLIDE 1

1 - 1

Convex hull

slide-2
SLIDE 2

1 - 2

Convex hull

slide-3
SLIDE 3

1 - 3

Convex hull

slide-4
SLIDE 4

1 - 4

Convex hull

  • Definition, extremal point
  • Jarvis algorithm
  • Orientation predicate
  • Buggy degenerate example
  • Real RAM model and general position hypothesis
  • Graham algorithm
  • Lower bound
  • Three dimensions
slide-5
SLIDE 5

2 - 1

Convex hull

Definition, extremal point

slide-6
SLIDE 6

2 - 2

Convex hull

Definition, extremal point Set of points

slide-7
SLIDE 7

2 - 3

Convex hull

Definition, extremal point Set of points Smallest enclosing convex set

slide-8
SLIDE 8

2 - 4

Convex hull

Definition, extremal point Set of points Smallest enclosing convex set Extremal point Supporting line (”tangent” line)

slide-9
SLIDE 9

3 - 1

Convex hull

Jarvis algorithm

slide-10
SLIDE 10

3 - 2

lowest point is extremal

Convex hull

Jarvis algorithm

slide-11
SLIDE 11

3 - 3

Convex hull

Jarvis algorithm

rotate

slide-12
SLIDE 12

3 - 4

Convex hull

Jarvis algorithm

rotate

slide-13
SLIDE 13

3 - 5

Convex hull

Jarvis algorithm

rotate

slide-14
SLIDE 14

3 - 6

Convex hull

Jarvis algorithm

rotate

slide-15
SLIDE 15

3 - 7

Convex hull

Jarvis algorithm

next vertex found

slide-16
SLIDE 16

3 - 8

Convex hull

Jarvis algorithm

next vertex found and next one

slide-17
SLIDE 17

3 - 9

Convex hull

Jarvis algorithm

next vertex found and next one until backto starting point

slide-18
SLIDE 18

4 - 1 Input : point set S u = lowest point in S; min = ∞ For each w ∈ S \ {u} if angle(ux, uw) < min then min = angle(ux, uw); v = w; u.next = v; Do S = S \ {v} For each w ∈ S min = ∞ if angle(v.pred v, vw) < min then min = angle(v.pred v, vw); v.next = w; v = v.next; While v = u

Convex hull

Jarvis algorithm

slide-19
SLIDE 19

4 - 2

Complexity ?

Input : point set S u = lowest point in S; min = ∞ For each w ∈ S \ {u} if angle(ux, uw) < min then min = angle(ux, uw); v = w; u.next = v; Do S = S \ {v} For each w ∈ S min = ∞ if angle(v.pred v, vw) < min then min = angle(v.pred v, vw); v.next = w; v = v.next; While v = u

Convex hull

Jarvis algorithm

slide-20
SLIDE 20

4 - 3

Complexity ?

O(n)

Input : point set S u = lowest point in S; min = ∞ For each w ∈ S \ {u} if angle(ux, uw) < min then min = angle(ux, uw); v = w; u.next = v; Do S = S \ {v} For each w ∈ S min = ∞ if angle(v.pred v, vw) < min then min = angle(v.pred v, vw); v.next = w; v = v.next; While v = u

Convex hull

Jarvis algorithm

slide-21
SLIDE 21

4 - 4

O(n)

Complexity ?

Input : point set S u = lowest point in S; min = ∞ For each w ∈ S \ {u} if angle(ux, uw) < min then min = angle(ux, uw); v = w; u.next = v; Do S = S \ {v} For each w ∈ S min = ∞ if angle(v.pred v, vw) < min then min = angle(v.pred v, vw); v.next = w; v = v.next; While v = u

Convex hull

Jarvis algorithm

slide-22
SLIDE 22

4 - 5

Complexity ?

Input : point set S u = lowest point in S; min = ∞ For each w ∈ S \ {u} if angle(ux, uw) < min then min = angle(ux, uw); v = w; u.next = v; Do S = S \ {v} For each w ∈ S min = ∞ if angle(v.pred v, vw) < min then min = angle(v.pred v, vw); v.next = w; v = v.next; While v = u

Convex hull

Jarvis algorithm

slide-23
SLIDE 23

4 - 6

Complexity ?

Input : point set S u = lowest point in S; min = ∞ For each w ∈ S \ {u} if angle(ux, uw) < min then min = angle(ux, uw); v = w; u.next = v; Do S = S \ {v} For each w ∈ S min = ∞ if angle(v.pred v, vw) < min then min = angle(v.pred v, vw); v.next = w; v = v.next; While v = u

Convex hull

Jarvis algorithm

O(n)

slide-24
SLIDE 24

4 - 7

Complexity ?

Input : point set S u = lowest point in S; min = ∞ For each w ∈ S \ {u} if angle(ux, uw) < min then min = angle(ux, uw); v = w; u.next = v; Do S = S \ {v} For each w ∈ S min = ∞ if angle(v.pred v, vw) < min then min = angle(v.pred v, vw); v.next = w; v = v.next; While v = u

Convex hull

Jarvis algorithm

O(n2)

slide-25
SLIDE 25

4 - 8

Complexity ?

Input : point set S u = lowest point in S; min = ∞ For each w ∈ S \ {u} if angle(ux, uw) < min then min = angle(ux, uw); v = w; u.next = v; Do S = S \ {v} For each w ∈ S min = ∞ if angle(v.pred v, vw) < min then min = angle(v.pred v, vw); v.next = w; v = v.next; While v = u

Convex hull

Jarvis algorithm

O(n2) O(nh)

slide-26
SLIDE 26

5 - 1 v.

Convex hull

Orientation predicate Input : point set S u = lowest point in S; min = ∞ For each w ∈ S \ {u} if angle(ux, uw) < min then min = angle(ux, uw); v = w; u.next = v; Do S = S \ {v} For each w ∈ S min = ∞ if angle(v.pred v, vw) < min then min = angle(v.pred v, vw); v.next = w; v = v.next; While v = u min p v w n red ext v.

slide-27
SLIDE 27

5 - 2

Convex hull

Orientation predicate min p v w if angle(pv, vw) < min n

slide-28
SLIDE 28

5 - 3

Convex hull

Orientation predicate min p v w if angle(pv, vw) < min n angle(pv, vw) = arccos(

vw·pv vw·pv)

slide-29
SLIDE 29

5 - 4

Convex hull

Orientation predicate min p v w if angle(pv, vw) < min n angle(pv, vw) = arccos(

vw·pv vw·pv)

slide-30
SLIDE 30

5 - 5

Convex hull

Orientation predicate p v w if angle(pv, vw) < min n angle(pv, vw) = arccos(

vw·pv vw·pv)

if vwn turn left

slide-31
SLIDE 31

5 - 6

Convex hull

Orientation predicate p v w if angle(pv, vw) < min n angle(pv, vw) = arccos(

vw·pv vw·pv)

if vwn turn left if triangle vwn counterclockwise (ccw) if triangle vwn positively oriented

slide-32
SLIDE 32

6 - 1

Convex hull

Orientation predicate v w n vwn + ?

slide-33
SLIDE 33

6 - 2

Convex hull

Orientation predicate v w n vwn + ?

  • xw − xv xn − xv

yw − yv yn − yv

  • =
  • 1

1 1 xv xw xn yv yw yn

  • > 0
slide-34
SLIDE 34

6 - 3

Convex hull

Orientation predicate v w n vwn + ?

  • xw − xv xn − xv

yw − yv yn − yv

  • =
  • 1

1 1 xv xw xn yv yw yn

  • > 0

v w n vwn - ?

  • 1

1 1 xv xw xn yv yw yn

  • < 0
slide-35
SLIDE 35

6 - 4

Convex hull

Orientation predicate v w n vwn + ?

  • xw − xv xn − xv

yw − yv yn − yv

  • =
  • 1

1 1 xv xw xn yv yw yn

  • > 0

v w n vwn - ?

  • 1

1 1 xv xw xn yv yw yn

  • < 0

v w n vwn 0 ?

  • 1

1 1 xv xw xn yv yw yn

  • = 0
slide-36
SLIDE 36

6 - 5

Convex hull

Orientation predicate v w n vwn + ?

  • xw − xv xn − xv

yw − yv yn − yv

  • =
  • 1

1 1 xv xw xn yv yw yn

  • > 0

v w n vwn - ?

  • 1

1 1 xv xw xn yv yw yn

  • < 0

v w n vwn 0 ?

  • 1

1 1 xv xw xn yv yw yn

  • = 0

degenerate case

slide-37
SLIDE 37

6 - 6

Convex hull

Orientation predicate v w n vwn + ?

  • xw − xv xn − xv

yw − yv yn − yv

  • =
  • 1

1 1 xv xw xn yv yw yn

  • > 0

v w n vwn - ?

  • 1

1 1 xv xw xn yv yw yn

  • < 0

v w n vwn 0 ?

  • 1

1 1 xv xw xn yv yw yn

  • = 0

rounding errors

slide-38
SLIDE 38

7 - 1

Convex hull

Orientation predicate Rounding errors possible p = ( 1

2 + x.u, 1 2 + y.u)

q = (12, 12) r = (24, 24) 0 ≤ x, y ≤ 256, u = 2−53

  • rientation(p, q, r)

evaluated with double

Teaser robustness lecture

slide-39
SLIDE 39

7 - 2

Convex hull

Orientation predicate Rounding errors possible p = ( 1

2 + x.u, 1 2 + y.u)

q = (12, 12) r = (24, 24) 0 ≤ x, y ≤ 256, u = 2−53

  • rientation(p, q, r)

evaluated with double ≥ 0 ≤ 0 zoom

Teaser robustness lecture

slide-40
SLIDE 40

8 - 1

Convex hull

Buggy degenerate example u

(single precision)

w5 = (0.5000029, 0.5000027) w1 = (12, 12) w2 = (24, 24) w3 = (30, 30.000001) w4 = (23, 36)

Teaser robustness lecture

slide-41
SLIDE 41

8 - 2

Convex hull

Buggy degenerate example

Input : point set S u = v = lowest point in S;

u

Jarvis

(single precision)

w5 = (0.5000029, 0.5000027) w1 = (12, 12) w2 = (24, 24) w3 = (30, 30.000001) w4 = (23, 36)

Teaser robustness lecture

slide-42
SLIDE 42

8 - 3

Convex hull

Buggy degenerate example

Do n = first in S; For each w ∈ S if vwn positive then n = w; v.next = n; v = n; S = S \ {v} While v = u

u

(single precision)

w5 = (0.5000029, 0.5000027) w1 = (12, 12) w2 = (24, 24) w3 = (30, 30.000001) w4 = (23, 36)

Teaser robustness lecture

slide-43
SLIDE 43

8 - 4

Convex hull

Buggy degenerate example

Do n = first in S; For each w ∈ S if vwn positive then n = w; v.next = n; v = n; S = S \ {v} While v = u

u= v n

(single precision)

w5 = (0.5000029, 0.5000027) w1 = (12, 12) w2 = (24, 24) w3 = (30, 30.000001) w4 = (23, 36)

Teaser robustness lecture

slide-44
SLIDE 44

8 - 5

Convex hull

Buggy degenerate example

Do n = first in S; For each w ∈ S if vwn positive then n = w; v.next = n; v = n; S = S \ {v} While v = u

u= v n w

(single precision)

w5 = (0.5000029, 0.5000027) w1 = (12, 12) w2 = (24, 24) w3 = (30, 30.000001) w4 = (23, 36)

Teaser robustness lecture

slide-45
SLIDE 45

8 - 6

Convex hull

Buggy degenerate example

Do n = first in S; For each w ∈ S if vwn positive then n = w; v.next = n; v = n; S = S \ {v} While v = u

u= v n w n

(single precision)

w5 = (0.5000029, 0.5000027) w1 = (12, 12) w2 = (24, 24) w3 = (30, 30.000001) w4 = (23, 36)

Teaser robustness lecture

slide-46
SLIDE 46

8 - 7

Convex hull

Buggy degenerate example

Do n = first in S; For each w ∈ S if vwn positive then n = w; v.next = n; v = n; S = S \ {v} While v = u

u= v n w n

(single precision)

w5 = (0.5000029, 0.5000027) w1 = (12, 12) w2 = (24, 24) w3 = (30, 30.000001) w4 = (23, 36)

Teaser robustness lecture

slide-47
SLIDE 47

8 - 8

Convex hull

Buggy degenerate example

Do n = first in S; For each w ∈ S if vwn positive then n = w; v.next = n; v = n; S = S \ {v} While v = u

u= v n n = w

(single precision)

w5 = (0.5000029, 0.5000027) w1 = (12, 12) w2 = (24, 24) w3 = (30, 30.000001) w4 = (23, 36)

Teaser robustness lecture

slide-48
SLIDE 48

8 - 9

Convex hull

Buggy degenerate example

Do n = first in S; For each w ∈ S if vwn positive then n = w; v.next = n; v = n; S = S \ {v} While v = u

u v n

(single precision)

w5 = (0.5000029, 0.5000027) w1 = (12, 12) w2 = (24, 24) w3 = (30, 30.000001) w4 = (23, 36)

Teaser robustness lecture

slide-49
SLIDE 49

8 - 10

Convex hull

Buggy degenerate example

Do n = first in S; For each w ∈ S if vwn positive then n = w; v.next = n; v = n; S = S \ {v} While v = u

u v n w

(single precision)

w5 = (0.5000029, 0.5000027) w1 = (12, 12) w2 = (24, 24) w3 = (30, 30.000001) w4 = (23, 36)

Teaser robustness lecture

slide-50
SLIDE 50

8 - 11

Convex hull

Buggy degenerate example

Do n = first in S; For each w ∈ S if vwn positive then n = w; v.next = n; v = n; S = S \ {v} While v = u

u v n w Incoherence

(single precision)

w5 = (0.5000029, 0.5000027) w1 = (12, 12) w2 = (24, 24) w3 = (30, 30.000001) w4 = (23, 36)

Teaser robustness lecture

slide-51
SLIDE 51

8 - 12

Convex hull

Buggy degenerate example

Do n = first in S; For each w ∈ S if vwn positive then n = w; v.next = n; v = n; S = S \ {v} While v = u

u v n w

(single precision)

w5 = (0.5000029, 0.5000027) w1 = (12, 12) w2 = (24, 24) w3 = (30, 30.000001) w4 = (23, 36)

Teaser robustness lecture

slide-52
SLIDE 52

8 - 13

Convex hull

Buggy degenerate example

Do n = first in S; For each w ∈ S if vwn positive then n = w; v.next = n; v = n; S = S \ {v} While v = u

u v n = w

(single precision)

w5 = (0.5000029, 0.5000027) w1 = (12, 12) w2 = (24, 24) w3 = (30, 30.000001) w4 = (23, 36)

Teaser robustness lecture

slide-53
SLIDE 53

8 - 14

Convex hull

Buggy degenerate example

Do n = first in S; For each w ∈ S if vwn positive then n = w; v.next = n; v = n; S = S \ {v} While v = u

u v n w

(single precision)

w5 = (0.5000029, 0.5000027) w1 = (12, 12) w2 = (24, 24) w3 = (30, 30.000001) w4 = (23, 36)

Teaser robustness lecture

slide-54
SLIDE 54

8 - 15

Convex hull

Buggy degenerate example

Do n = first in S; For each w ∈ S if vwn positive then n = w; v.next = n; v = n; S = S \ {v} While v = u

u v n = w

(single precision)

w5 = (0.5000029, 0.5000027) w1 = (12, 12) w2 = (24, 24) w3 = (30, 30.000001) w4 = (23, 36)

Teaser robustness lecture

slide-55
SLIDE 55

8 - 16

Convex hull

Buggy degenerate example

Do n = first in S; For each w ∈ S if vwn positive then n = w; v.next = n; v = n; S = S \ {v} While v = u

u u =

(single precision)

w5 = (0.5000029, 0.5000027) w1 = (12, 12) w2 = (24, 24) w3 = (30, 30.000001) w4 = (23, 36)

Teaser robustness lecture

slide-56
SLIDE 56

8 - 17

Convex hull

Buggy degenerate example u Result is really wrong

(single precision)

w5 = (0.5000029, 0.5000027) w1 = (12, 12) w2 = (24, 24) w3 = (30, 30.000001) w4 = (23, 36)

Teaser robustness lecture

slide-57
SLIDE 57

9 - 1

Convex hull

Real RAM model and general position hypothesis Real Random Access Memory model Assume exact computation on real numbers constant time for single operations: +, −, √ , sin . . .

slide-58
SLIDE 58

9 - 2

Convex hull

Real RAM model and general position hypothesis Real Random Access Memory model Assume exact computation on real numbers constant time for single operations: +, −, √ , sin . . . General position hypotheses Predicate: Input − → {−1, 0, 1}

slide-59
SLIDE 59

9 - 3

Convex hull

Real RAM model and general position hypothesis Real Random Access Memory model Assume exact computation on real numbers constant time for single operations: +, −, √ , sin . . . General position hypotheses Predicate: Input − → {−1, 0, 1} 2D convex hull: no three points colinear

slide-60
SLIDE 60

9 - 4

Convex hull

Real RAM model and general position hypothesis Real Random Access Memory model Assume exact computation on real numbers constant time for single operations: +, −, √ , sin . . . General position hypotheses Predicate: Input − → {−1, 0, 1} 2D convex hull: no three points colinear possibly: no 2 points with same x

slide-61
SLIDE 61

10 - 1

Convex hull

Graham algorithm

slide-62
SLIDE 62

10 - 2

Convex hull

Graham algorithm sort around a point (e.g. lowest point)

slide-63
SLIDE 63

10 - 3

Convex hull

Graham algorithm sort around a point (e.g. lowest point)

slide-64
SLIDE 64

10 - 4 leftturn OK

Convex hull

Graham algorithm

slide-65
SLIDE 65

10 - 5 rightturn remove and go back

Convex hull

Graham algorithm

slide-66
SLIDE 66

10 - 6 leftturn OK

Convex hull

Graham algorithm

slide-67
SLIDE 67

10 - 7 leftturn OK

Convex hull

Graham algorithm

slide-68
SLIDE 68

10 - 8 leftturn OK

Convex hull

Graham algorithm

slide-69
SLIDE 69

10 - 9 rightturn remove and go back

Convex hull

Graham algorithm

slide-70
SLIDE 70

10 - 10 rightturn remove and go back

Convex hull

Graham algorithm

slide-71
SLIDE 71

10 - 11 leftturn OK

Convex hull

Graham algorithm

slide-72
SLIDE 72

10 - 12 leftturn OK

Convex hull

Graham algorithm

slide-73
SLIDE 73

10 - 13 rightturn remove and go back

Convex hull

Graham algorithm

slide-74
SLIDE 74

10 - 14 leftturn OK

Convex hull

Graham algorithm

slide-75
SLIDE 75

10 - 15 leftturn OK

Convex hull

Graham algorithm

slide-76
SLIDE 76

10 - 16

Convex hull

Graham algorithm

slide-77
SLIDE 77

11 - 1

Convex hull

Graham algorithm Input: point set S u lowest point of S; sort S around u in a circular list including u; v = u; while v.next = u if (v, v.next, v.next.next) ccw v = v.next; else v.next = v.next.next; v.next.previous = v; if v = u v = v.previous;

Complexity

slide-78
SLIDE 78

11 - 2

Convex hull

Graham algorithm Input: point set S u lowest point of S; sort S around u in a circular list including u; v = u; while v.next = u if (v, v.next, v.next.next) ccw v = v.next; else v.next = v.next.next; v.next.previous = v; if v = u v = v.previous;

Complexity

O(n)

slide-79
SLIDE 79

11 - 3

Convex hull

Graham algorithm Input: point set S u lowest point of S; sort S around u in a circular list including u; v = u; while v.next = u if (v, v.next, v.next.next) ccw v = v.next; else v.next = v.next.next; v.next.previous = v; if v = u v = v.previous;

Complexity

O(n log n)

slide-80
SLIDE 80

11 - 4

Convex hull

Graham algorithm Input: point set S u lowest point of S; sort S around u in a circular list including u; v = u; while v.next = u if (v, v.next, v.next.next) ccw v = v.next; else v.next = v.next.next; v.next.previous = v; if v = u v = v.previous;

Complexity

slide-81
SLIDE 81

11 - 5

Convex hull

Graham algorithm Input: point set S u lowest point of S; sort S around u in a circular list including u; v = u; while v.next = u if (v, v.next, v.next.next) ccw v = v.next; else v.next = v.next.next; v.next.previous = v; if v = u v = v.previous;

Complexity

at most n times delete one point

slide-82
SLIDE 82

11 - 6

Convex hull

Graham algorithm Input: point set S u lowest point of S; sort S around u in a circular list including u; v = u; while v.next = u if (v, v.next, v.next.next) ccw v = v.next; else v.next = v.next.next; v.next.previous = v; if v = u v = v.previous;

Complexity

at most n times at most n times delete one point distance to u decreases

slide-83
SLIDE 83

11 - 7

Convex hull

Graham algorithm Input: point set S u lowest point of S; sort S around u in a circular list including u; v = u; while v.next = u if (v, v.next, v.next.next) ccw v = v.next; else v.next = v.next.next; v.next.previous = v; if v = u v = v.previous;

Complexity

at most n times at most n times O(n) delete one point distance to u decreases

slide-84
SLIDE 84

11 - 8

Convex hull

Graham algorithm Input: point set S u lowest point of S; sort S around u in a circular list including u; v = u; while v.next = u if (v, v.next, v.next.next) ccw v = v.next; else v.next = v.next.next; v.next.previous = v; if v = u v = v.previous;

Complexity

O(n log n)

slide-85
SLIDE 85

12

Convex hull

Lower bound Problem lower bound is Ω(f(n)) Iff there is NO algorithm solving all size n problems using less than Cf(n) operations ∀n C constant independent of n

slide-86
SLIDE 86

13 - 1

Sorting

Lower bound Input: n real (positive) numbers

slide-87
SLIDE 87

13 - 2

Sorting

Lower bound Input: n real (positive) numbers Output: sorting permutation

slide-88
SLIDE 88

13 - 3

Sorting

Lower bound Input: n real (positive) numbers Output: sorting permutation Monitoring execution

slide-89
SLIDE 89

13 - 4

Sorting

Lower bound Input: n real (positive) numbers Output: sorting permutation Monitoring execution

Yes No

slide-90
SLIDE 90

13 - 5

Sorting

Lower bound Input: n real (positive) numbers Output: sorting permutation Monitoring execution

Yes No

slide-91
SLIDE 91

13 - 6

Sorting

Lower bound Input: n real (positive) numbers Output: sorting permutation Monitoring execution

Yes No

slide-92
SLIDE 92

13 - 7

Sorting

Lower bound Input: n real (positive) numbers Output: sorting permutation Monitoring execution

Yes No

♯ leaves ≥ ♯ permutations

slide-93
SLIDE 93

13 - 8

Sorting

Lower bound Input: n real (positive) numbers Output: sorting permutation Monitoring execution

Yes No

♯ leaves ≥ ♯ permutations There are n! permutations

slide-94
SLIDE 94

13 - 9

Sorting

Lower bound Input: n real (positive) numbers Output: sorting permutation Monitoring execution

Yes No

♯ leaves ≥ ♯ permutations There are n! permutations Tree height is at least log2 ♯ leaves

slide-95
SLIDE 95

13 - 10

Sorting

Lower bound Input: n real (positive) numbers Output: sorting permutation Monitoring execution

Yes No

♯ leaves ≥ ♯ permutations There are n! permutations Tree height is at least log2 ♯ leaves ♯ comparisons ≤ log2 n! ≃ n log2 n

slide-96
SLIDE 96

14 - 1

Convex hull

Lower bound Input: n 2D points (real coordinates) Output: list of points along the convex hull

slide-97
SLIDE 97

14 - 2

Convex hull

Lower bound A stupid algorithm for sorting numbers

slide-98
SLIDE 98

14 - 3

Convex hull

Lower bound project on parabola

slide-99
SLIDE 99

14 - 4

Convex hull

Lower bound project on parabola compute convex hull

slide-100
SLIDE 100

14 - 5

Convex hull

Lower bound project on parabola compute convex hull find lowest point

slide-101
SLIDE 101

14 - 6

Convex hull

Lower bound project on parabola compute convex hull find lowest point enumerate x coordinates in ccw CH order

slide-102
SLIDE 102

14 - 7

Convex hull

Lower bound project on parabola compute convex hull find lowest point enumerate x coordinates in ccw CH order O(n) f(n) O(n) O(n) Lower bound on sorting = ⇒ f(n) + O(n) ≥ Ω(n log n)

slide-103
SLIDE 103

14 - 8

Convex hull

Lower bound project on parabola compute convex hull find lowest point enumerate x coordinates in ccw CH order O(n) f(n) O(n) O(n) Lower bound on sorting = ⇒ f(n) + O(n) ≥ Ω(n log n)

slide-104
SLIDE 104

15 - 1

Convex hull

Three dimensions Euler relation Polytope boundary Vertices Edges Faces

slide-105
SLIDE 105

15 - 2

Convex hull

Three dimensions Euler relation Polytope boundary Vertices Edges Faces 8 12 6 = 2 − +

slide-106
SLIDE 106

15 - 3

Convex hull

Three dimensions Euler relation Polytope boundary Vertices Edges Faces 8 12 6 = 2 − + 4 6 4 = 2 − +

slide-107
SLIDE 107

15 - 4

Convex hull

Three dimensions Euler relation Polytope boundary Vertices Edges Faces 8 12 6 = 2 − + 4 6 4 = 2 − + +1 +1 = +0 − +

slide-108
SLIDE 108

15 - 5

Convex hull

Three dimensions Euler relation Polytope boundary Vertices Edges Faces 8 12 6 = 2 − + 4 6 4 = 2 − + +1 +1 = +0 − + +1 +1 = +0 − +

slide-109
SLIDE 109

15 - 6

Convex hull

Three dimensions Euler relation Polytope boundary Vertices Edges Faces 8 12 6 = 2 − + 4 6 4 = 2 − + +1 +1 = +0 − + +1 +1 = +0 − +

slide-110
SLIDE 110

15 - 7

Convex hull

Three dimensions Euler relation Polytope boundary Vertices Edges Faces n e f = 2 − +

slide-111
SLIDE 111

15 - 8

Convex hull

Three dimensions Euler relation Polytope boundary Vertices Edges Faces n e f = 2 − + triangular faces 3f = 2e

slide-112
SLIDE 112

15 - 9

Convex hull

Three dimensions Euler relation Polytope boundary Vertices Edges Faces n e f = 2 − + triangular faces 3f = 2e f = 2n − 4 e = 3n − 6

slide-113
SLIDE 113

16

Convex hull

Three dimensions Linear size O(n log n) divide and conquer algorithm O(nh) gift wraping algorithm

slide-114
SLIDE 114

17

T h e e n d