100% tevredenheidsgarantie Direct beschikbaar na je betaling Lees online óf als PDF Geen vaste maandelijkse kosten 4.2 TrustPilot
logo-home
Samenvatting

Summary Geometric Algorithms

Beoordeling
-
Verkocht
-
Pagina's
34
Geüpload op
27-01-2024
Geschreven in
2023/2024

High quality summary covering the entire Geometric Algorithms course. All of the concepts are clearly, yet compactly summarized, and explained in more detail where necessary. Based on the lectures, slides and the associated book.












Oeps! We kunnen je document nu niet laden. Probeer het nog eens of neem contact op met support.

Documentinformatie

Heel boek samengevat?
Nee
Wat is er van het boek samengevat?
Chapter 1 through 11
Geüpload op
27 januari 2024
Bestand laatst geupdate op
3 februari 2024
Aantal pagina's
34
Geschreven in
2023/2024
Type
Samenvatting

Onderwerpen

Voorbeeld van de inhoud

‭Geometric Algorithms‬
‭ asics‬
B ‭‬
2
‭Convex hulls‬ ‭3‬
‭Map overlay‬ ‭4‬
‭Line segment intersection‬ ‭4‬
‭Doubly-connected edge list‬ ‭5‬
‭Overlaying the maps‬ ‭8‬
‭Polygon triangulation‬ ‭10‬
‭Polyhedron casting‬ ‭13‬
‭Enclosing circles‬ ‭15‬
‭Vertical decomposition‬ ‭17‬
‭Range searching‬ ‭20‬
‭KD-trees‬ ‭20‬
‭Range trees‬ ‭23‬
‭Voronoi diagram‬ ‭25‬
‭Delaunay triangulations‬ ‭27‬
‭Duality and arrangements‬ ‭30‬
‭Windowing queries‬ ‭33‬

,‭Basics‬
‭Definitions‬
‭-‬ ‭Plane‬‭= 2D space‬
‭-‬ ‭Point‬‭= set of coordinates (depending on 2D, 3D etc.)‬
‭-‬ ‭Line‬‭=‬‭y = m * x + c‬
‭-‬ ‭Half-plane‬‭= one side of the line;‬‭y <= m * x + c‬
‭-‬ ‭Line segment‬‭= two endpoints‬
‭-‬ ‭Two segments intersect if they have some point in common‬
‭-‬ ‭Proper intersection‬‭: common point is exactly one interior‬‭point of each line‬
‭segment‬
‭-‬ ‭Polygon‬‭= connected region of a plane, bounded by‬‭line segments‬
‭-‬ ‭Edges = its line segments‬
‭-‬ ‭Vertices = endpoints of the edges‬
‭-‬ ‭Circle‬‭= only the boundary (edge)‬
‭-‬ ‭Disk‬‭= boundary + its interior‬

‭Relations‬
‭-‬ ‭Euclidean distance‬




‭-‬ ‭Manhattan distance‬‭(sum of the segments below)‬




‭-‬ ‭Intersection‬‭: set of points that two objects have‬‭in common‬

‭Description size‬
‭-‬ ‭A point, line (segment), circle, rectangle requires‬‭O(1)‬‭storage‬
‭-‬ ‭A simple polygon with‬‭n‬‭vertices requires‬‭O(n)‬‭storage‬




‭2‬

,‭Convex hulls‬
‭ onvex‬ ‭Shape or set if for any two points that are‬‭part of the shape, the connecting line‬
C
‭segment is also part of the shape‬
‭-‬ ‭Circle‬‭is not‬‭convex‬‭, but a‬‭disk‬‭is‬
‭Convex hull‬ ‭Intersection of all convex sets that‬‭contains a subset‬‭S‬‭of the plane (set of points,‬
‭rectangle, simple polygon); Smallest set that contains‬‭S‬

‭Convex hull problem‬‭: give algorithm that computes‬‭the convex hull of any given set of‬‭n‬‭points‬
‭-‬ ‭Input has 2n‬‭coordinates and thus‬‭O(n)‬‭size‬
‭-‬ ‭Output has at least 4 and at most 2n coordinates, and thus between‬‭O(1)‬‭and‬‭O(n)‬‭size‬
‭-‬ ‭Useful insights (that you have to‬‭prove!‬‭):‬
‭-‬ ‭Vertices of the convex are always points from the input‬
‭-‬ ‭Supporting line of any convex hull‬‭edge‬‭has all input‬‭points to one side‬
‭-‬ ‭Based on this you can create a‬‭slow‬‭algorithm that‬‭goes through all pairs‬
‭of points and adds it to result if all other points lie on one side of the line‬
‭through the pair‬
‭-‬ ‭Better algorithm: sort the points from left to right (by‬‭x‬‭coordinate), then iterate‬
‭-‬ ‭Idea: first compute‬‭upper boundary‬‭, then‬‭lower boundary‬‭is symmetric‬
‭1.‬ ‭Add two leftmost points to result‬
‭2.‬ ‭Keep adding next point until entire list is processed:‬
‭a.‬ ‭If this is a left turn, remove previous points that shouldn’t be in the hull‬
‭because of this (can go as far back as the first two points!)‬




‭b.‬ ‭If this is a right turn, continue‬
‭ .‬ D
3 ‭ o similar in the other direction (to compute‬‭bottom‬‭boundary‬‭)‬
‭4.‬ ‭Concatenate two lists‬
‭-‬ ‭Analysis:‬‭O(n log n)‬‭to sort and for each point after‬‭the first three, there can be‬
‭O(1 + k)‬‭steps to add it to the hull and remove previous‬‭points with‬‭k <= n‬‭, so‬
‭you end up with‬‭O(n log n) + O(n‬‭2‭)‬ ‬‭=‬‭O(n‬‭2‬‭)‬
‭-‬ ‭BUT, each point can be removed only once from the upper hull, so‬
‭actually, we have:‬




‭-‬ ‭Hence,‬‭O(n log n) + O(n)‬‭=‬‭O(n log n)‬‭, which is optimal‬

‭Convex hulls in:‬
‭-‬ ‭3D: vertices (0 dim.), edges (1 dim.) and facets (2 dim.), and 3 dim. interior‬
‭-‬ ‭4D: vertices (0 dim.), edges (1 dim.) 2-facets (2 dim.) and 3-facets (3 dim.), and 4 dim.‬
‭interior‬
‭-‬ ‭Its boundary can have‬‭Θ(n‬‭2‬‭)‬‭facets in worst case‬


‭3‬

, ‭Map overlay‬
‭GIS‬‭Geographic Information System‬
‭-‬ ‭Data is stored in separate layers‬
‭-‬ ‭Each layer stores geometric info about e.g. roads, land cover, boundaries, habitats‬
‭Map overlay‬‭Combination of two (or more) map layers‬
‭-‬ ‭Answer queries such as total length of roads through forests etc.‬


‭Line segment intersection‬
‭ utput-sensitive‬‭If output is large, it is fine to‬‭spend a lot of time, but if the output is small, the‬
O
‭algorithm is fast‬
‭-‬ ‭Input-sensitive‬‭applies to the running time of any‬‭algorithm (depends on‬‭n‬‭)‬

‭Line intersection problem‬‭: given‬‭n‬‭line segments,‬‭find their intersection points‬
‭-‬ ‭Naive approach: loop over every pair of segments and report their intersections‬
‭-‬ ‭If every line intersects every other line, this is optimal, since there would be‬‭n‭2‬ ‬
‭intersections to report, and algorithm runs in‬‭O(n‬‭2‬‭)‬‭(and every algorithm needs at‬
‭least as much time as it takes to report all the answers)‬
‭-‬ ‭However, in the map overlay problem, you can expect that not every line‬
‭segment intersects a‬‭lot‬‭of line segments from the‬‭other map layer‬
‭-‬ ‭Typically, can expect‬‭k = O(n)‬‭intersections, then‬‭you can find all‬
‭intersections in‬‭O(n log n) + k‬‭time (and‬‭k‬‭falls‬‭away)‬

‭Overlapping pairs‬
‭-‬ ‭Given set of intervals on a line, find all partly overlapping pairs‬
‭-‬ ‭Sort endpoints and iterate left to right, maintaining currently intersected intervals in BST‬
‭-‬ ‭Whenever you come across a start endpoint, report all other segments in the‬
‭BST, and then insert the segment of this endpoint‬
‭-‬ ‭Running time‬‭O(n log n + k)‬‭, where‬‭k‬‭could be at least‬‭n‬‭2‭/‬ 4‬‭so quadratic worst‬
‭-‬ ‭This is‬‭output-sensitive‬‭for 1D, but not for 2D, because‬‭it’s possible for there to be a‬
‭bunch of vertical line segments that do not intersect, thus should be able to run in‬‭O(n‬
‭log n)‬‭, whereas the 1D algorithm would run in‬‭O(n‬‭log n + n‬‭2‭)‬ ‬

‭ lane sweep technique‬ ‭Imaginary horizontal line passing‬‭over the plane from top to‬
P
‭bottom, solving the problem as it moves‬
‭-‬ ‭Events‬‭: places where the line stops and algorithm‬‭computes some positions‬
‭-‬ ‭Status‬‭: storage of relevant situations at current‬‭position of the sweep line‬
‭-‬ ‭At every point, everything above the sweep line is already done‬
‭-‬ ‭General guide:‬
‭1.‬ ‭Define status‬
‭2.‬ ‭Choose status structure and event queue‬
‭3.‬ ‭Figure out how events must be handled (use sketches!)‬
‭4.‬ ‭Analyze number of events and how much time each event takes‬
‭5.‬ ‭Deal with degenerate cases, incorporating them carefully‬




‭4‬

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
Suniht Universiteit Utrecht
Bekijk profiel
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
94
Lid sinds
4 jaar
Aantal volgers
55
Documenten
19
Laatst verkocht
3 dagen geleden

3,9

13 beoordelingen

5
7
4
2
3
2
2
0
1
2

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Veelgestelde vragen