Diskrete Mathematik II

Slides:



Advertisements
Ähnliche Präsentationen
Kap. 13 Sweep-Line Algorithmen Kap Schnittprobleme
Advertisements

Vorlesung Informatik 2 Algorithmen und Datenstrukturen (26-Graphenalgorithmen: Wiederholung und Übung) Prof. Th. Ottmann.
WS 03/041 Algorithmentheorie 01 - Einleitung Prof. Dr. S. Albers Prof. Dr. Th. Ottmann.
Kapitel 6: Klassifizierung von Sortiertechniken
R. Der - Vorlesung Algorithmen und Datenstrukturen (Magister)
WS Algorithmentheorie 05 - Treaps Prof. Dr. Th. Ottmann.
WS Algorithmentheorie 01 – Divide and Conquer (Segmentschnitt) Prof. Dr. Th. Ottmann.
Vorlesung Informatik 2 Algorithmen und Datenstrukturen (27 – Kürzeste Wege) Prof. Th. Ottmann.
Vorlesung Informatik 2 Algorithmen und Datenstrukturen 09 - Weitere Sortierverfahren Heapsort-Nachtrag Prof. Th. Ottmann.
1 Vorlesung Informatik 2 Algorithmen und Datenstrukturen (21 – Kürzeste Wege) T. Lauer.
Union-Find-Strukturen
Algorithmen und Datenstrukturen
Geometrisches Divide and Conquer
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Geoinformation II Vorlesung Foliendesign: cand. geod. Jörg Steinrücken.
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Übung Diskrete Mathematik SS 2003 Segmentschnitt I.
Diskrete Mathe II Übung IKG - Übung Diskrete Mathe II – Jörg Schmittwilken 2 Ü6 Wendet den Scan-Line Algorithmus auf unten stehende Situation.
Klausur „Diskrete Mathematik II“
Diskrete Mathematik I Vorlesung 9b AVL-Baum, Algorithmen.
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Geoinformation II Vorlesung In welcher Masche liegt der Punkt p?
Minimum Spanning Tree: MST
Theorie und Praxis geometrischer Algorithmen
Punktbeschriftung mit vier Rechtecken gleicher Höhe (Anzahlmaximierung) Julia Löcherbach.
Diskrete Mathe 9 Vorlesung 9 SS 2001
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Diskrete Mathematik II Vorlesung 1 SS 2001 Algorithmus von Dijkstra.
Effiziente Algorithmen
Diskrete Mathematik II
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Geoinformation II Vorlesung 8 SS 2000 Punkt-in-Polygon-Verfahren II (Trapezkarte)
Geoinformation II Vorlesung 2 SS 2001 AVL-Bäume.
Konstruktion der Voronoi-Diagramme II
Geoinformation II (6. Semester)
Geoinformation II Vorlesung 3 SS 2001 Polygon Overlay.
Diskrete Mathematik II
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Diskrete Mathematik II Vorlesung 5 SS 2001 Segmentschnitt II (n Segmente)
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Geoinformation II Vorlesung 7 SS 2000 Punkt-in-Polygon-Verfahren I (Trapezkarte)
Effiziente Algorithmen Hartmut Klauck Universität Frankfurt SS
Effiziente Algorithmen
Effiziente Algorithmen
Konstruktion der Voronoi-Diagramme I
Vorlesung Mai 2000 Konstruktion des Voronoi-Diagramms II
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Geoinformation III Vorlesung 1 WS 2001/02 Punkt-in-Landkarte I (Streifenkarte)
Diskrete Mathematik II
Korrektheit von Programmen – Testen
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Diskrete Mathematik II Vorlesung 6 SS 2001 Segmentschnitt III.
Diskrete Mathematik II
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Geoinformation II 6. Sem. Vorlesung Mai 2000 Konstruktion des Voronoi-Diagramms.
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Diskrete Mathematik II Foliendesign: Jörg Steinrücken & Tobias Kahn Vorlesung
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Diskrete Mathematik II Vorlesung der Algorithmus von Floyd Foliendesign:
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Geoinformation II 6. Sem. Vorlesung April 2000 AVL-Bäume.
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Diskrete Mathematik II Vorlesung Datenstrukturen für den Algorithmus von.
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Diskrete Mathematik II Foliendesign: Jörg Steinrücken & Tobias Kahn Vorlesung
Diskrete Mathe II Übung IKG - Übung Diskrete Mathe II – Jörg Schmittwilken 2 Übung5 Prüft, ob sich folgende Segmente schneiden: –P1(1/7) P2(3/1)
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Diskrete Mathematik II Vorlesung Suche des kürzesten Weges in einem Netz.
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Diskrete Mathematik II Foliendesign: Jörg Steinrücken & Tobias Kahn Vorlesung
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Diskrete Mathematik II Vorlesung Voronoi-Diagramme.
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Diskrete Mathematik II Vorlesung der Algorithmus von Floyd.
Binärer Baum, Binärer Suchbaum I
Geoinformation II 6. Sem. Vorlesung April 2000 Geometrische Algorithmen - ein einführendes, größeres Beispiel für ein Semester-begleitendes Programmier.
Institut für Kartographie und Geoinformation Dipl.-Ing. J. Schmittwilken Diskrete Mathe II Übung
Binärbäume.
Programmiersprachen II Vorbesprechung Klausur Prof. Dr. Reiner Güttler Fachbereich GIS HTW.
Klausur „Diskrete Mathematik II“
Vorlesung April 2000 Polygon Overlay
Musterlösung zur Klausur "Diskrete Mathematik" vom
WS 2001/2002 Mehrbenutzerzugriff auf GIS-Daten
Vorlesung AVL-Bäume/Algorithmen-
Vorlesung AVL-Bäume/Algorithmen-
Punkt-in-Landkarte II
Übungen Übungsanmeldung Übungskorrektur
DB2 – SS 2019 von Baum allgemein bis B*-Baum
DB2 – SS 2019 von Baum allgemein bis B*-Baum
 Präsentation transkript:

Diskrete Mathematik II Vorlesung 6 18.05.00 Segmentschnitt III

Reduktion von 2-dim auf 1-dim Überlappung der horizontalen Projektionen ist notwendig, aber nicht hinreichend für einen Schnitt Lutz Plümer - Diskrete Mathematik II - SS 2000 - Vorlesung 6 - 18.05.00

Scan-Line-Verfahren F B C D A E S2 S3 S4 S1 Lutz Plümer - Diskrete Mathematik II - SS 2000 - Vorlesung 6 - 18.05.00

Gegenbeispiel zu viele Elemente gleichzeitig aktiv  O(n2) Lutz Plümer - Diskrete Mathematik II - SS 2000 - Vorlesung 6 - 18.05.00

Nachbarschaft A B e-Umgebung Lutz Plümer - Diskrete Mathematik II - SS 2000 - Vorlesung 6 - 18.05.00

Ordnungsrelation „x <‘‘ B A C x‘ Ax < B Ax < C Cx < B Cx‘ < A Ax‘ < B Cx‘ < B Lutz Plümer - Diskrete Mathematik II - SS 2000 - Vorlesung 6 - 18.05.00

Scan-Line & dynamische Ordnung B F C D E S1 S3 S2 S4 Lutz Plümer - Diskrete Mathematik II - SS 2000 - Vorlesung 6 - 18.05.00

Scan-Line & dynamische Ordnung B F C D E S1 S3 S2 S4 A Lutz Plümer - Diskrete Mathematik II - SS 2000 - Vorlesung 6 - 18.05.00

Scan-Line & dynamische Ordnung B F C D E S1 S3 S2 S4 A E Lutz Plümer - Diskrete Mathematik II - SS 2000 - Vorlesung 6 - 18.05.00

Scan-Line & dynamische Ordnung F B S2 S3 C S4 D A S1 E B E A Lutz Plümer - Diskrete Mathematik II - SS 2000 - Vorlesung 6 - 18.05.00

Scan-Line & dynamische Ordnung B F C D E S1 S3 S2 S4 B D A E Lutz Plümer - Diskrete Mathematik II - SS 2000 - Vorlesung 6 - 18.05.00

Scan-Line & dynamische Ordnung B F C D E S1 S3 S2 S4 B C A D E Lutz Plümer - Diskrete Mathematik II - SS 2000 - Vorlesung 6 - 18.05.00

Scan-Line & dynamische Ordnung B F C D E S1 S3 S2 S4 B D C E Lutz Plümer - Diskrete Mathematik II - SS 2000 - Vorlesung 6 - 18.05.00

Scan-Line & dynamische Ordnung F B S2 S3 C S4 D A S1 E B E C D Lutz Plümer - Diskrete Mathematik II - SS 2000 - Vorlesung 6 - 18.05.00

Scan-Line & dynamische Ordnung B F C D E S1 S3 S2 S4 F C B E D Lutz Plümer - Diskrete Mathematik II - SS 2000 - Vorlesung 6 - 18.05.00

Scan-Line & dynamische Ordnung B F C D E S1 S3 S2 S4 B C F E D Lutz Plümer - Diskrete Mathematik II - SS 2000 - Vorlesung 6 - 18.05.00

Scan-Line & dynamische Ordnung B F C D E S1 S3 S2 S4 B C F E Lutz Plümer - Diskrete Mathematik II - SS 2000 - Vorlesung 6 - 18.05.00

Scan-Line & dynamische Ordnung B F C D E S1 S3 S2 S4 C E F Lutz Plümer - Diskrete Mathematik II - SS 2000 - Vorlesung 6 - 18.05.00

Scan-Line & dynamische Ordnung B F C D E S1 S3 S2 S4 C F E Lutz Plümer - Diskrete Mathematik II - SS 2000 - Vorlesung 6 - 18.05.00

Scan-Line & dynamische Ordnung B F C D E S1 S3 S2 S4 C Lutz Plümer - Diskrete Mathematik II - SS 2000 - Vorlesung 6 - 18.05.00

Scan-Line & dynamische Ordnung B F C D E S1 S3 S2 S4 Lutz Plümer - Diskrete Mathematik II - SS 2000 - Vorlesung 6 - 18.05.00

Zusatzfrage: Wann wird der Schnittpunkt S1 erkannt? B A S1 Übung: Wird ein Schnittpunkt ggf. mehr als einmal erkannt? Lutz Plümer - Diskrete Mathematik II - SS 2000 - Vorlesung 6 - 18.05.00

Vereinfachende Annahmen 2 Segmente schneiden sich höchstens in einem Punkt in keinem Punkt schneiden sich mehr als 2 Segmente die x-Koordinaten aller Segmente sind paarweise verschieden kein Segment ist vertikal Gegenbeispiele Lutz Plümer - Diskrete Mathematik II - SS 2000 - Vorlesung 6 - 18.05.00

Algorithmus Scan-Line Input: S: eine Menge von Segmenten Output: die Schnittpunkte der Elemente von S Sei T = Endpunkte der Segmente von S nach x-Koordinaten sortiert (Haltepunkte) L =  // aktive Segmente von S while T   do bestimme und entferne den nächsten Punkt pT x ist x-Koordinate von p case: p ist linker Endpunkt von s fuege_ein(s,x,L) sl = vorgaenger(s,x,L) sr = nachfolger(s,x,L) schnitt(sl,s,T); schnitt(s,sr,T); p ist rechter Endpunkt von s sl = vorgaenger(s,x,L) sr = nachfolger(s,x,L) entferne(s,x,L) schnitt(sl,sr,T) p ist Schnittpunkt von s und t vertausche(s,t,L,x) // t < s sl = vorgaenger(t,x,L) sr = nachfolger(s,x,L) schnitt(sl,t,T) schnitt(s,sr,T) Lutz Plümer - Diskrete Mathematik II - SS 2000 - Vorlesung 6 - 18.05.00

Algorithmus (II) fuege_ein(s,x,L): fügt das Segment s in die Menge L ein entsprechend der Ordnung an der Stelle x entferne(s,x,L): entfernt das Segment s aus L an der Stelle x nachfolger(s,x,L): liefert den Nachfolger von s in L an der Stelle x, falls vorhanden vorgaenger(s,x,L): liefert den Vorgänger von s in L an der Stelle x, falls vorhanden schnitt(s,t,T): prüft s und t auf Schnitt. Berechnet ggf. den Schnitt-punkt p und fügt ihn als neuen Haltepunkt in T ein. offene Probleme: eine geeignete Datenstruktur für T eine geeignete Datenstruktur für L Prüfung auf Schnitt, Berechnung des Schnittpunkts Lutz Plümer - Diskrete Mathematik II - SS 2000 - Vorlesung 6 - 18.05.00

Datenstrukturen für T und S Datenstrukur für T AVL-Baum letztes Semester was ist ein AVL-Baum erstens ein Suchbaum zweitens ausgeglichen Datenstruktur für L AVL-Baum? Problem: „Vorgänger“ und „Nachfolger“ finden das wird vom AVL-Baum nicht unterstützt also: Variante des AVL-Baums alle Informationen sind in Blättern (nicht in inneren Knoten) die Blätter bilden eine doppelt verkettete Liste Lutz Plümer - Diskrete Mathematik II - SS 2000 - Vorlesung 6 - 18.05.00

Eine Variante des AVL-Baums mit einer doppelt verketteten Liste der Blätter für die Menge der aktiven Elemente Lutz Plümer - Diskrete Mathematik II - SS 2000 - Vorlesung 6 - 18.05.00

für die Haltepunkte ... ...mit den Operationen Einfügen eines gefundenen Schnittpunktes Finden und Entfernen des nächsten (also minimalen) Elements ... ... genügt ein „normaler“ AVL-Baum obwohl man mit Kanonen auf Spatzen schießt besser: ein Heap (wie bei Dijkstra) Lutz Plümer - Diskrete Mathematik II - SS 2000 - Vorlesung 6 - 18.05.00 28