![Page 1: Computational Geometry - people.engr.ncsu.edu · Computational Geometry •Design and analysis of algorithms for solving geometric problems –Modern study started with Michael Shamosin](https://reader030.vdocuments.us/reader030/viewer/2022040311/5d53a6a188c993007d8b6976/html5/thumbnails/1.jpg)
Computational Geometry• Design and analysisof algorithms for solving geometric problems– Modern study started with Michael Shamos in 1975
• Facility location:– geometric data structures used to “simplify” solution procedures
-4 -3 -2 -1 0 1 2 3 4-4
-3
-2
-1
0
1
2
3
4
50
![Page 2: Computational Geometry - people.engr.ncsu.edu · Computational Geometry •Design and analysis of algorithms for solving geometric problems –Modern study started with Michael Shamosin](https://reader030.vdocuments.us/reader030/viewer/2022040311/5d53a6a188c993007d8b6976/html5/thumbnails/2.jpg)
Convex Hull• Find the points that enclose all points– Most important data structure
– Calculated, via Graham’s scan in
-4 -3 -2 -1 0 1 2 3 4-4
-3
-2
-1
0
1
2
3
4
51
( log ), pointsO n n n
![Page 3: Computational Geometry - people.engr.ncsu.edu · Computational Geometry •Design and analysis of algorithms for solving geometric problems –Modern study started with Michael Shamosin](https://reader030.vdocuments.us/reader030/viewer/2022040311/5d53a6a188c993007d8b6976/html5/thumbnails/3.jpg)
Delaunay Triangulation• Find the triangula‐tion of points that maximizes the minimum angle of any triangle– Captures proximity relationships
– Used in 3‐D animation
– Calculated, via divide and conquer, in
-4 -3 -2 -1 0 1 2 3 4-4
-3
-2
-1
0
1
2
3
4
52
( log ), pointsO n n n
![Page 4: Computational Geometry - people.engr.ncsu.edu · Computational Geometry •Design and analysis of algorithms for solving geometric problems –Modern study started with Michael Shamosin](https://reader030.vdocuments.us/reader030/viewer/2022040311/5d53a6a188c993007d8b6976/html5/thumbnails/4.jpg)
Voronoi Diagram• Each region defines area closest to a point– Open face regions indicate points in convex hull
-4 -3 -2 -1 0 1 2 3 4-4
-3
-2
-1
0
1
2
3
4
53
![Page 5: Computational Geometry - people.engr.ncsu.edu · Computational Geometry •Design and analysis of algorithms for solving geometric problems –Modern study started with Michael Shamosin](https://reader030.vdocuments.us/reader030/viewer/2022040311/5d53a6a188c993007d8b6976/html5/thumbnails/5.jpg)
Voronoi Diagram• Voronoi diagram from smooshing paint between glass
– https://youtu.be/yDMtGT0b_kg
54
![Page 6: Computational Geometry - people.engr.ncsu.edu · Computational Geometry •Design and analysis of algorithms for solving geometric problems –Modern study started with Michael Shamosin](https://reader030.vdocuments.us/reader030/viewer/2022040311/5d53a6a188c993007d8b6976/html5/thumbnails/6.jpg)
Delaunay‐Voronoi• Delaunay triangula‐tion is straight‐line dual of Voronoidiagram– Can easily convert from one to another
-4 -3 -2 -1 0 1 2 3 4-4
-3
-2
-1
0
1
2
3
4
55
![Page 7: Computational Geometry - people.engr.ncsu.edu · Computational Geometry •Design and analysis of algorithms for solving geometric problems –Modern study started with Michael Shamosin](https://reader030.vdocuments.us/reader030/viewer/2022040311/5d53a6a188c993007d8b6976/html5/thumbnails/7.jpg)
Minimum Spanning Tree• Find the minimum weight set of arcs that connect all nodes in a graph– Undirected arcs:calculated, via Kruskal’s algorithm,
– Directed arcs:calculated, via Edmond’s branching algorithm, in
-4 -3 -2 -1 0 1 2 3 4-4
-3
-2
-1
0
1
2
3
4
56
( log ), arcs, nodesO m n m n
( ), arcs, nodesO mn m n
![Page 8: Computational Geometry - people.engr.ncsu.edu · Computational Geometry •Design and analysis of algorithms for solving geometric problems –Modern study started with Michael Shamosin](https://reader030.vdocuments.us/reader030/viewer/2022040311/5d53a6a188c993007d8b6976/html5/thumbnails/8.jpg)
Kruskal’s Algorithm for MST• Algorithm:
1. Create set F of single node trees
2. Create set S of all arcs3. While S nonempty and
F is not yet spanning4. Remove min arc from S5. If removed arc connects two different trees, then add to F, combining two trees into single tree
6. If graph connected, F forms single MST; otherwise, forms multi‐tree minimum spanning forest
• Optimal “greedy” algorithm
57
15
12
5
7
10
16
2
113
m = 15 arcs, n = 8 nodes
![Page 9: Computational Geometry - people.engr.ncsu.edu · Computational Geometry •Design and analysis of algorithms for solving geometric problems –Modern study started with Michael Shamosin](https://reader030.vdocuments.us/reader030/viewer/2022040311/5d53a6a188c993007d8b6976/html5/thumbnails/9.jpg)
Min Spanning vs Steiner Trees • Steiner point added to reduce distance connecting three existing points compared to min spanning tree
58
b a
b
b
a a
SteinerPoint
1 3 3 , 30 60 90 triangle2 2
Min spanning tree distance > Steiner tree distance
2 3
2 3 3
2 3
b a b a
b a
a a
![Page 10: Computational Geometry - people.engr.ncsu.edu · Computational Geometry •Design and analysis of algorithms for solving geometric problems –Modern study started with Michael Shamosin](https://reader030.vdocuments.us/reader030/viewer/2022040311/5d53a6a188c993007d8b6976/html5/thumbnails/10.jpg)
Steiner Network
59
![Page 11: Computational Geometry - people.engr.ncsu.edu · Computational Geometry •Design and analysis of algorithms for solving geometric problems –Modern study started with Michael Shamosin](https://reader030.vdocuments.us/reader030/viewer/2022040311/5d53a6a188c993007d8b6976/html5/thumbnails/11.jpg)
Metric Distances
60
![Page 12: Computational Geometry - people.engr.ncsu.edu · Computational Geometry •Design and analysis of algorithms for solving geometric problems –Modern study started with Michael Shamosin](https://reader030.vdocuments.us/reader030/viewer/2022040311/5d53a6a188c993007d8b6976/html5/thumbnails/12.jpg)
Chebychev Distances
61
Proof
![Page 13: Computational Geometry - people.engr.ncsu.edu · Computational Geometry •Design and analysis of algorithms for solving geometric problems –Modern study started with Michael Shamosin](https://reader030.vdocuments.us/reader030/viewer/2022040311/5d53a6a188c993007d8b6976/html5/thumbnails/13.jpg)
Metric Distances using dists
3 2 2 2
3 2
4 51 'mi' 'km'dists( , , ),2 1 2 Inf3 n d m d
n m
p pD X1 X2
, 2X1 X
, 2X1 X
, 2X1 X
d
d
D
, 2X1 X
D
d = 2 d = 1
, 2X1 X Error
62
![Page 14: Computational Geometry - people.engr.ncsu.edu · Computational Geometry •Design and analysis of algorithms for solving geometric problems –Modern study started with Michael Shamosin](https://reader030.vdocuments.us/reader030/viewer/2022040311/5d53a6a188c993007d8b6976/html5/thumbnails/14.jpg)
Heuristic Solutions• Most problems in logistics engineering don’t admit
optimal solutions, only– Within some bound of optimal (provable bound, opt. gap)– Best known solution (stop when need to have solution)
• Heuristics ‐ computational effort split between– Construction: construct a feasible solution– Improvement: find a better feasible solution
• Easy construction:– any random point or permutation is feasible– can then be improved
• Hard construction:– almost no chance of generating a random feasible solution is
possible in a single step– need to include randomness at decision points as solution is
constructed
63
![Page 15: Computational Geometry - people.engr.ncsu.edu · Computational Geometry •Design and analysis of algorithms for solving geometric problems –Modern study started with Michael Shamosin](https://reader030.vdocuments.us/reader030/viewer/2022040311/5d53a6a188c993007d8b6976/html5/thumbnails/15.jpg)
Heuristic Construction Procedures• Easy construction:
– any random permutation is feasible and can then be improved• Hard construction:
– almost no chance of generating a random solution is a single step that is feasible, need to include randomness at decision points as solution is constructed
64
1 2 3 4 5 6
1 2 4 5 6
1 2 4 6
2 4 6
2 4
2
4
2
3
5
1
6