INTERSECTION OF LINESEGMENTS


 Brittney Robbins
 2 years ago
 Views:
Transcription
1 INTERSECTION OF LINESEGMENTS Vera Sacristán Discrete and Algorithmic Geometry Facultat de Matemàtiques i Estadística Universitat Politècnica de Catalunya
2
3 Problem Input: n linesegments in the plane, s i = (p i, q i ), i =... n. Output: the k = O(n ) intersections of linesegment pairs, (x, y, i, j).
4 Problem Input: n linesegments in the plane, s i = (p i, q i ), i =... n. Output: the k = O(n ) intersections of linesegment pairs, (x, y, i, j). Some applications (in addition to those that you already know) Geographic information systems Detecting the intersections among the elements of the different layers of information (cities, roads, services,...) Realistic visualization Eliminating the hidden portions of a scene
5 Problem Input: n linesegments in the plane, s i = (p i, q i ), i =... n. Output: the k = O(n ) intersections of linesegment pairs, (x, y, i, j). Brute force solution Check the intersection of the ( n ) pairs of linesegments. This algorithm runs in Θ(n ) time.
6 Problem Input: n linesegments in the plane, s i = (p i, q i ), i =... n. Output: the k = O(n ) intersections of linesegment pairs, (x, y, i, j). Brute force solution Check the intersection of the ( n ) pairs of linesegments. This algorithm runs in Θ(n ) time. Problem complexity The problem has complexity Ω(n ), because there exist linesegment configurations with ( n ) intersections.
7 Problem Input: n linesegments in the plane, s i = (p i, q i ), i =... n. Output: the k = O(n ) intersections of linesegment pairs, (x, y, i, j). Brute force solution Check the intersection of the ( n ) pairs of linesegments. This algorithm runs in Θ(n ) time. Problem complexity The problem has complexity Ω(n ), because there exist linesegment configurations with ( n ) intersections.
8 Problem Input: n linesegments in the plane, s i = (p i, q i ), i =... n. Output: the k = O(n ) intersections of linesegment pairs, (x, y, i, j). Brute force solution Check the intersection of the ( n ) pairs of linesegments. This algorithm runs in Θ(n ) time. Problem complexity The problem has complexity Ω(n ), because there exist linesegment configurations with ( n ) intersections. Nevertheless, there exist sets of n linesegments with a number of intersections substantially smaller than ( n ).
9 Problem Input: n linesegments in the plane, s i = (p i, q i ), i =... n. Output: the k = O(n ) intersections of linesegment pairs, (x, y, i, j). Brute force solution Check the intersection of the ( n ) pairs of linesegments. This algorithm runs in Θ(n ) time. Problem complexity The problem has complexity Ω(n ), because there exist linesegment configurations with ( n ) intersections. Nevertheless, there exist sets of n linesegments with a number of intersections substantially smaller than ( n ). Outputsensitive solution Algorithm whose running time depends on the number of intersections to be reported.
10 Problem Input: n linesegments in the plane, s i = (p i, q i ), i =... n. Output: the k = O(n ) intersections of linesegment pairs, (x, y, i, j).
11 Problem Input: n linesegments in the plane, s i = (p i, q i ), i =... n. Output: the k = O(n ) intersections of linesegment pairs, (x, y, i, j). Solution Sweep line algorithm
12 Problem Input: n linesegments in the plane, s i = (p i, q i ), i =... n. Output: the k = O(n ) intersections of linesegment pairs, (x, y, i, j). Solution Sweep line algorithm A straight line (vertical, in this case) scans the object (the line segments) and allows detecting and computing the desired elements (intersection points), leaving the problem solved behind it. The sweeping process is discretized.
13 Problem Input: n linesegments in the plane, s i = (p i, q i ), i =... n. Output: the k = O(n ) intersections of linesegment pairs, (x, y, i, j). Solution Sweep line algorithm A straight line (vertical, in this case) scans the object (the line segments) and allows detecting and computing the desired elements (intersection points), leaving the problem solved behind it. The sweeping process is discretized. Essential elements of a sweep line algorithm: Sweep line Data structure storing the information of the objects intersected by the sweeping line, sorted along the line. Events queue Priority queue keeping the information of the algorithm stops, i.e., all the positions where the sweep line stracture changes.
14 Problem Input: n linesegments in the plane, s i = (p i, q i ), i =... n. Output: the k = O(n ) intersections of linesegment pairs, (x, y, i, j). Observation If two linesegments have disjoint projections onto a given line, then they are disjoint.
15 Problem Input: n linesegments in the plane, s i = (p i, q i ), i =... n. Output: the k = O(n ) intersections of linesegment pairs, (x, y, i, j). Observation If two linesegments have disjoint projections onto a given line, then they are disjoint.
16 Problem Input: n linesegments in the plane, s i = (p i, q i ), i =... n. Output: the k = O(n ) intersections of linesegment pairs, (x, y, i, j). Observation If two linesegments have disjoint projections onto a given line, then they are disjoint. Observation When sweeping a set of linesegments with a line, two intersecting linesegments need to be consecutive in the sweeping line right before their intersection point.
17 Problem Input: n linesegments in the plane, s i = (p i, q i ), i =... n. Output: the k = O(n ) intersections of linesegment pairs, (x, y, i, j). Observation If two linesegments have disjoint projections onto a given line, then they are disjoint. Observation When sweeping a set of linesegments with a line, two intersecting linesegments need to be consecutive in the sweeping line right before their intersection point.
18 Problem Input: n linesegments in the plane, s i = (p i, q i ), i =... n. Output: the k = O(n ) intersections of linesegment pairs, (x, y, i, j). Observation If two linesegments have disjoint projections onto a given line, then they are disjoint. Observation When sweeping a set of linesegments with a line, two intersecting linesegments need to be consecutive in the sweeping line right before their intersection point.
19 Problem Input: n linesegments in the plane, s i = (p i, q i ), i =... n. Output: the k = O(n ) intersections of linesegment pairs, (x, y, i, j). Observation If two linesegments have disjoint projections onto a given line, then they are disjoint. Observation When sweeping a set of linesegments with a line, two intersecting linesegments need to be consecutive in the sweeping line right before their intersection point.
20 Problem Input: n linesegments in the plane, s i = (p i, q i ), i =... n. Output: the k = O(n ) intersections of linesegment pairs, (x, y, i, j). Observation If two linesegments have disjoint projections onto a given line, then they are disjoint. Observation When sweeping a set of linesegments with a line, two intersecting linesegments need to be consecutive in the sweeping line right before their intersection point.
21 BentleyOttman s algorithm This is a sweepline algorithm.
22 BentleyOttman s algorithm This is a sweepline algorithm. Hypothesis (to be eliminated later on). There are no repeated abscissae, i.e.: there are no vertical linesegments, and no two endpoints of two linesegments, no two intersection points of linesegments, no endpoint and intersection point, lie in the same vertical line.. At each intersection point, only two linesegments intersect.
23 BentleyOttman s algorithm This is a sweepline algorithm. Hypothesis (to be eliminated later on). There are no repeated abscissae, i.e.: there are no vertical linesegments, and no two endpoints of two linesegments, no two intersection points of linesegments, no endpoint and intersection point, lie in the same vertical line.. At each intersection point, only two linesegments intersect. Sweep line Stabbed linesegments, in vertical order.
24 BentleyOttman s algorithm This is a sweepline algorithm. Hypothesis (to be eliminated later on). There are no repeated abscissae, i.e.: there are no vertical linesegments, and no two endpoints of two linesegments, no two intersection points of linesegments, no endpoint and intersection point, lie in the same vertical line.. At each intersection point, only two linesegments intersect. Sweep line Stabbed linesegments, in vertical order. Events All endpoints of the linesegments (known a priori). All intersection points of linesegments (found on the fly).
25 BentleyOttman s algorithm
26 BentleyOttman s algorithm Input: n linesegments in the plane, s i = (p i, q i ), i =... n. Output: the k = O(n ) intersections of linesegment pairs, (x, y, i, j).
27 BentleyOttman s algorithm Input: n linesegments in the plane, s i = (p i, q i ), i =... n. Output: the k = O(n ) intersections of linesegment pairs, (x, y, i, j). Initialization:  Sort the n endpoints by abscissa and store the information in E.  Line L starts empty.
28 Advance While E do:. p = min E. If p = start(s), then: Insert s in L If s and s intersect to the right of p, insert their intersection point in E and report it (if needed). Do the same for s +.. If p = end(s), then: If s and s + intersect to the right of p, insert their intersection point in E and report it (if needed). Delete s from L. If p = s s with s < L s, then: If s and s intersect to the right of p, insert their intersection point in E and report it (if needed). Do the same for s + and s. Transpose s and s in L. Delete p from E
29
30
31 p p p p p q q q p q q q
32 p p p p p q q q p q q q
33 p p p p p q q q p q q q
34 s p p p p p q q q p q q q
35 s p p p p q q q p q q q
36 s s p p p p q q q p q q q
37 s s p p p p q q q p q q q
38 s s p p p p q q q p q q q
39 s s p p p q q q p q q q
40 s s s p p p q q q p q q q
41 s s s p p p q q q p q q q
42 s s s p p p q q q p q q q r r
43 s s s p p p q q q p q q q r r
44 s s s p p p q q q p q q q r r
45 s s s p p q q q p q q q r r
46 s s s s p p q q q p q q q r r
47 s s s s p p q q q p q q q r r
48 s s s s p p q q q p q q q r r r r
49 s s s s p p q q q p q q q r r r r
50 s s s s p p q q q p q q q r r r r r r
51 s s s s p p q q q p q q q r r r r r r
52 s s s s p q q q p q q q r r r r r r
53 s s s s s p q q q p q q q r r r r r r
54 s s s s s p q q q p q q q r r r r r r
55 s s s s s p q q q p q q q r r r r r r
56 s s s s s q q q p q q q r r r r r r
57 s s s s s q q q p q q q r r r r r r
58 s s s s q q q p q q q r r r r r r
59 s s s s q q q p q q q r r r r r r
60 s s s s r r r q q p q q q r r r
61 s s s s r r r q q p q q q r r r
62 s s s s r r r q q p q q q r r r
63 s s s s r r r q q p q q q r r r
64 s s s s r r r q q p q q q r r r
65 s s s s r r r q q p q q q r r r
66 s s s s r r q q p q q q r r r
67 s s s s r r q q p q q q r r r
68 s s s s r r q q p q q q r r r
69 s s s s r r q q p q q q r r r
70 s s s s r r q q p q q q r r r
71 s s s s r q q p q q q r r r
72 s s s s r q q p q q q r r r
73 s s s s r q q p q q q r r r
74 s s s s r q q p q q q r r r
75 s s s s r q q p q q q r r r r r
76 s s s s r q q p q q q r r r r r
77 s s s s q q p q q q r r r r r
78 s s s s q q p q q q r r r r r
79 s s s q q p q q q r r r r r
80 s s s q q p q q q r r r r r
81 s s s q q p q q q r r r r r
82 s s s q p q q q r r r r r
83 s s s q p q q q r r r r r
84 s s q p q q q r r r r r
85 s s p q q q r r r r r
86 s s s p q q q r r r r r
87 s s s p q q q r r r r r
88 s s s p q q q r r r r r
89 s s s p q q q r r r r r r r
90 s s s p q q q r r r r r r r
91 s s s r q q q r r r r r r
92 s s s r q q q r r r r r r
93 s s s r q q q r r r r r r
94 s s s r q q q r r r r r r
95 s s s r q q q r r r r r r
96 s s s q q q r r r r r r
97 s s s q q q r r r r r r
98 s s q q q r r r r r r
99 s s r q q r r r r r
100 s s r q q r r r r r
101 s s r q q r r r r r
102 s s q q r r r r r
103 s s q q r r r r r
104 s q q r r r r r
105 s q r r r r r
106 s q r r r r r
107 r r r r r
108 BentleyOttman s Algorithm
109 BentleyOttman s Algorithm Correctness The algorithm finds all intersections (due to Observation ). The algorithm does not find any faked intersection (all intersections are checked).
110 BentleyOttman s Algorithm Correctness The algorithm finds all intersections (due to Observation ). The algorithm does not find any faked intersection (all intersections are checked). Dealing with degenerate cases In order to deal with input data containing more than one point sharing the same abscissa, the event queue E must store the points in lexicographical order (and not only by abscissae). The algorithm can trivially detect whether two or more linesegments intersect in more than one point (i.e., intersect in a linesegment), since it stops at their endpoints. A slight modification also allows to deal with input data in which three or more linesegments intersect at the same point: in this case, the algorithm inverts their order in the sweep line at the intersection point event.
111 BentleyOttman s Algorithm Data structures
112 BentleyOttman s Algorithm Data structures Sweep line, L: Keeps the total order of the stabbed linesegments and supports: insert(s) delete(s) transpose(s, s ) previous(s) next(s) A dictionary (balanced binary tree) allows to perform each of these operations in O(log n) time.
113 BentleyOttman s Algorithm Data structures Events queue, E: Keeps the total order of the events and supports: minimum (report and extract) insert(p) memberq(p) A priority queue (balanced binary tree) allows to perform each of these operations in O(log n) time.
114 BentleyOttman s Algorithm Complexity (time)
115 BentleyOttman s Algorithm Complexity (time) Initialization: O(n log n) Advance (performed n + k times):. O(log n)... O(log n). O(log n) Total: O((n + k) log n) Initialization:  Sort the n endpoints by abscissa and store the information in E.  Line L starts empty. Advance While E do:. p = min E. If p = start(s), then.... If p = end(s), then.... If p = s s with s < L s, then.... Delete p from E
116 BentleyOttman s Algorithm Complexity (time) Initialization: O(n log n) Advance (performed n + k times):. O(log n)... O(log n). O(log n) Total: O((n + k) log n) The previous counting corresponds to the non degenerated case. When each intersection point, v i, may correspond to more than two intersecting linesegments, the total running time of the advance step of the algorithm is O(( k i= degree(v i)) log n). However, considering the points v i as vertices of the graph: k degree(v i ) e = O(e) = O(v) = O(n + k) = O(n + k). i=
117 BentleyOttman s Algorithm Complexity (space)
118 BentleyOttman s Algorithm Complexity (space) At each step of the algorithm, the sweep line stores at most n linesegments.
119 BentleyOttman s Algorithm Complexity (space) At each step of the algorithm, the sweep line stores at most n linesegments. In the formulation exposed so far, the event queue may at some point store all intersection points, which are k = O(n ).
120 BentleyOttman s Algorithm Complexity (space) At each step of the algorithm, the sweep line stores at most n linesegments. In the formulation exposed so far, the event queue may at some point store all intersection points, which are k = O(n ). However, a slight modification allows the event queue to store, at each step of the algorithm, at most n intersection events. This can be achieved if, at each step, E only stores intersection points of linesegments adjacent in L, and the intersection points are deleted from E whenever the intersecting segments become non adjacent.
121 The decision problem
122 The decision problem Input: n linesegments in the plane, s i = (p i, q i ), i =... n. Output: there is / there is not a pair of intersecting linesegments, and report a witness.
123 The decision problem Input: n linesegments in the plane, s i = (p i, q i ), i =... n. Output: there is / there is not a pair of intersecting linesegments, and report a witness. Solution BentleyOttman s algorithm solves this problem in O(n log n) time.
124 The decision problem Input: n linesegments in the plane, s i = (p i, q i ), i =... n. Output: there is / there is not a pair of intersecting linesegments, and report a witness. Solution BentleyOttman s algorithm solves this problem in O(n log n) time. Lower bound The decision problem has complexity Ω(n log n).
125 The decision problem Input: n linesegments in the plane, s i = (p i, q i ), i =... n. Output: there is / there is not a pair of intersecting linesegments, and report a witness. Solution BentleyOttman s algorithm solves this problem in O(n log n) time. Lower bound The decision problem has complexity Ω(n log n). Proof: by reduction from unicity of integers. Given x,..., x n N, compute p i = (x i, 0), q i = (x i, ) and s i = (p i, q i ). There exists a pair of intersecting linesegments if and only if there exist duplicate numbers in the original set. If you don t like degeneracies, consider the following points: p i = (x i i, 0) and q i = (x i + i, ).
126 The problem of reporting all intersections
127 The problem of reporting all intersections Corollary The problem of reporting all intersection has complexity Ω(k + n log n), because Reporting requires Ω(k) time Deciding requires Ω(n log n) time
128 The problem of reporting all intersections Corollary The problem of reporting all intersection has complexity Ω(k + n log n), because Reporting requires Ω(k) time Deciding requires Ω(n log n) time Optimal algorithm An algorithm by Chazelle and Edelsbrunner solves this problem in Θ(k + n log n) time.
129 The problem of reporting all intersections Corollary The problem of reporting all intersection has complexity Ω(k + n log n), because Reporting requires Ω(k) time Deciding requires Ω(n log n) time Optimal algorithm An algorithm by Chazelle and Edelsbrunner solves this problem in Θ(k + n log n) time. Consequences Deciding whether a polygon is simple can be solved in O(n log n) time. Deciding whether two simple polygons intersect can be solved in O(n log n) time.
130 TO LEARN MORE F. Preparata, M. Shamos, Computational Geometry: An introduction, Springer. M. de Berg, O. Cheong, M. van Kreveld, M. Overmars: Computational Geometry: Alhorithms and Applications, Springer. JD. Boissonnat, M. Yvinec, Algorithmic Geometry, Cambridge University Press.
INTERSECTION OF LINESEGMENTS
INTERSECTION OF LINESEGMENTS Vera Sacristán Computational Geometry Facultat d Informàtica de Barcelona Universitat Politècnica de Catalunya Problem Input: n linesegments in the plane, s i = (p i, q
More informationHomework Exam 1, Geometric Algorithms, 2016
Homework Exam 1, Geometric Algorithms, 2016 1. (3 points) Let P be a convex polyhedron in 3dimensional space. The boundary of P is represented as a DCEL, storing the incidence relationships between the
More informationComputational Geometry: Line segment intersection
: Line segment intersection Panos Giannopoulos Wolfgang Mulzer Lena Schlipf AG TI SS 2013 Tutorial room change: 055 this building!!! (from next monday on) Outline Motivation Line segment intersection (and
More informationA Note on Maximum Independent Sets in Rectangle Intersection Graphs
A Note on Maximum Independent Sets in Rectangle Intersection Graphs Timothy M. Chan School of Computer Science University of Waterloo Waterloo, Ontario N2L 3G1, Canada tmchan@uwaterloo.ca September 12,
More information24: Polygon Partition  Faster Triangulations
24: Polygon Partition  Faster Triangulations CS 473u  Algorithms  Spring 2005 April 15, 2005 1 Previous lecture We described triangulations of simple polygons. See Figure 1 for an example of a polygon
More informationLine Segment Intersection
Chapter 1 Line Segment Intersection (with material from [1], [3], and [5], pictures are missing) 1.1 Interval case We first think of having n intervals (e.g., the xrange of horizontal line segments) and
More information1 Point Inclusion in a Polygon
Comp 163: Computational Geometry Tufts University, Spring 2005 Professor Diane Souvaine Scribe: Ryan Coleman Point Inclusion and Processing Simple Polygons into Monotone Regions 1 Point Inclusion in a
More informationIntersecting Red and Blue Line Segments in Optimal Time and Precision
Intersecting Red and Blue Line Segments in Optimal Time and Precision Andrea Mantler and Jack Snoeyink UNCCH Computer Science CB 3175 Sitterson Hall Chapel Hill, NC 27599 3175 USA {mantler,snoeyink}@cs.unc.edu
More informationCS268: Geometric Algorithms Handout #5 Design and Analysis Original Handout #15 Stanford University Tuesday, 25 February 1992
CS268: Geometric Algorithms Handout #5 Design and Analysis Original Handout #15 Stanford University Tuesday, 25 February 1992 Original Lecture #6: 28 January 1991 Topics: Triangulating Simple Polygons
More informationComputational Geometry. Lecture 1: Introduction and Convex Hulls
Lecture 1: Introduction and convex hulls 1 Geometry: points, lines,... Plane (twodimensional), R 2 Space (threedimensional), R 3 Space (higherdimensional), R d A point in the plane, 3dimensional space,
More informationIntroduction to Voronoi Diagrams
C.S. 252 Prof. Roberto Tamassia Computational Geometry Sem. II, 1992 1993 Lecture 13 Date: March 22, 1993 Scribe: Scott S. Snibbe 1 Introduction Introduction to Voronoi Diagrams This lecture introduces
More informationEE602 Algorithms GEOMETRIC INTERSECTION CHAPTER 27
EE602 Algorithms GEOMETRIC INTERSECTION CHAPTER 27 The Problem Given a set of N objects, do any two intersect? Objects could be lines, rectangles, circles, polygons, or other geometric objects Simple to
More informationDivideandConquer. Three main steps : 1. divide; 2. conquer; 3. merge.
DivideandConquer Three main steps : 1. divide; 2. conquer; 3. merge. 1 Let I denote the (sub)problem instance and S be its solution. The divideandconquer strategy can be described as follows. Procedure
More informationPersistent Data Structures and Planar Point Location
Persistent Data Structures and Planar Point Location Inge Li Gørtz Persistent Data Structures Ephemeral Partial persistence Full persistence Confluent persistence V1 V1 V1 V1 V2 q ue V2 V2 V5 V2 V4 V4
More informationFinding and counting given length cycles
Finding and counting given length cycles Noga Alon Raphael Yuster Uri Zwick Abstract We present an assortment of methods for finding and counting simple cycles of a given length in directed and undirected
More informationComputational Geometry
Lecture 10: 1 Lecture 10: Voronoi diagram Spatial interpolation Given some trees, seen from above, which region will they occupy? 2 Lecture 10: Voronoi diagram Spatial interpolation Given some trees, seen
More informationComputational Geometry [csci 3250]
Computational Geometry [csci 3250] Laura Toma Bowdoin College Polygon Triangulation Polygon Triangulation The problem: Triangulate a given polygon. (output a set of diagonals that partition the polygon
More informationTufts University, Spring 2005 Michael Horn, Julie Weber (2004) Voronoi Diagrams
Comp 163: Computational Geometry Professor Diane Souvaine Tufts University, Spring 2005 Michael Horn, Julie Weber (2004) Voronoi Diagrams 1 Voronoi Diagrams 1 Consider the following problem. To determine
More informationAlgorithmica 9 1989 SpringerVerlag New York Inc.
Algorithmica (1989) 4:97108 Algorithmica 9 1989 SpringerVerlag New York Inc. Constrained Delaunay Triangulations 1 L. Paul Chew 2 Abstract. Given a set of n vertices in the plane together with a set
More informationGraphs without proper subgraphs of minimum degree 3 and short cycles
Graphs without proper subgraphs of minimum degree 3 and short cycles Lothar Narins, Alexey Pokrovskiy, Tibor Szabó Department of Mathematics, Freie Universität, Berlin, Germany. August 22, 2014 Abstract
More informationShortest Path Algorithms
Shortest Path Algorithms Jaehyun Park CS 97SI Stanford University June 29, 2015 Outline Cross Product Convex Hull Problem Sweep Line Algorithm Intersecting Halfplanes Notes on Binary/Ternary Search Cross
More informationI/OEfficient Spatial Data Structures for Range Queries
I/OEfficient Spatial Data Structures for Range Queries Lars Arge Kasper Green Larsen MADALGO, Department of Computer Science, Aarhus University, Denmark Email: large@madalgo.au.dk,larsen@madalgo.au.dk
More information5.4 Closest Pair of Points
5.4 Closest Pair of Points Closest Pair of Points Closest pair. Given n points in the plane, find a pair with smallest Euclidean distance between them. Fundamental geometric primitive. Graphics, computer
More informationTOWARDS AN AUTOMATED HEALING OF 3D URBAN MODELS
TOWARDS AN AUTOMATED HEALING OF 3D URBAN MODELS J. Bogdahn a, V. Coors b a University of Strathclyde, Dept. of Electronic and Electrical Engineering, 16 Richmond Street, Glasgow G1 1XQ UK  jurgen.bogdahn@strath.ac.uk
More informationExistence of Simple Tours of Imprecise Points
Existence of Simple Tours of Imprecise Points Maarten Löffler Department of Information and Computing Sciences, Utrecht University Technical Report UUCS00700 www.cs.uu.nl ISSN: 097 Existence of Simple
More informationOffline sorting buffers on Line
Offline sorting buffers on Line Rohit Khandekar 1 and Vinayaka Pandit 2 1 University of Waterloo, ON, Canada. email: rkhandekar@gmail.com 2 IBM India Research Lab, New Delhi. email: pvinayak@in.ibm.com
More informationSolving Geometric Problems with the Rotating Calipers *
Solving Geometric Problems with the Rotating Calipers * Godfried Toussaint School of Computer Science McGill University Montreal, Quebec, Canada ABSTRACT Shamos [1] recently showed that the diameter of
More informationTwo General Methods to Reduce Delay and Change of Enumeration Algorithms
ISSN 13465597 NII Technical Report Two General Methods to Reduce Delay and Change of Enumeration Algorithms Takeaki Uno NII2003004E Apr.2003 Two General Methods to Reduce Delay and Change of Enumeration
More informationPersistent Data Structures and Planar Point Location. Inge Li Gørtz
Persistent Data Structures and Planar Point Location Inge Li Gørtz Persistent Data Structures Ephemeral Partial persistence Full persistence Confluent persistence V1 V1 V1 V1 V2 q ue V2 V2 V5 V2 V4 V4
More informationSorting revisited. Build the binary search tree: O(n^2) Traverse the binary tree: O(n) Total: O(n^2) + O(n) = O(n^2)
Sorting revisited How did we use a binary search tree to sort an array of elements? Tree Sort Algorithm Given: An array of elements to sort 1. Build a binary search tree out of the elements 2. Traverse
More informationMonotone Partitioning. Polygon Partitioning. Monotone polygons. Monotone polygons. Monotone Partitioning. ! Define monotonicity
Monotone Partitioning! Define monotonicity Polygon Partitioning Monotone Partitioning! Triangulate monotone polygons in linear time! Partition a polygon into monotone pieces Monotone polygons! Definition
More informationBinary Space Partitions
Title: Binary Space Partitions Name: Adrian Dumitrescu 1, Csaba D. Tóth 2,3 Affil./Addr. 1: Computer Science, Univ. of Wisconsin Milwaukee, Milwaukee, WI, USA Affil./Addr. 2: Mathematics, California State
More information1. What s wrong with the following proofs by induction?
ArsDigita University Month : Discrete Mathematics  Professor Shai Simonson Problem Set 4 Induction and Recurrence Equations Thanks to Jeffrey Radcliffe and Joe Rizzo for many of the solutions. Pasted
More informationApproximation of an Open Polygonal Curve with a Minimum Number of Circular Arcs and Biarcs
Approximation of an Open Polygonal Curve with a Minimum Number of Circular Arcs and Biarcs R. L. Scot Drysdale a Günter Rote b,1 Astrid Sturm b,1 a Department of Computer Science, Dartmouth College b Institut
More informationACS. Approximation of polygonal curves with minimum number of biarcs. ACS Technical Report No.: ACSTR
ACS Algorithms for Complex Shapes with Certified Numerics and Topology Approximation of polygonal curves with minimum number of biarcs Scot Drysdale Günter Rote Astrid Sturm ACS Technical Report No.: ACSTR24230002
More informationA fast and robust algorithm to count topologically persistent holes in noisy clouds
A fast and robust algorithm to count topologically persistent holes in noisy clouds Vitaliy Kurlin Durham University Department of Mathematical Sciences, Durham, DH1 3LE, United Kingdom vitaliy.kurlin@gmail.com,
More information Easy to insert & delete in O(1) time  Don t need to estimate total memory needed.  Hard to search in less than O(n) time
Skip Lists CMSC 420 Linked Lists Benefits & Drawbacks Benefits:  Easy to insert & delete in O(1) time  Don t need to estimate total memory needed Drawbacks:  Hard to search in less than O(n) time (binary
More informationConnectivity and cuts
Math 104, Graph Theory February 19, 2013 Measure of connectivity How connected are each of these graphs? > increasing connectivity > I G 1 is a tree, so it is a connected graph w/minimum # of edges. Every
More informationPlanar Tree Transformation: Results and Counterexample
Planar Tree Transformation: Results and Counterexample Selim G Akl, Kamrul Islam, and Henk Meijer School of Computing, Queen s University Kingston, Ontario, Canada K7L 3N6 Abstract We consider the problem
More informationWeek 2 Polygon Triangulation
Week 2 Polygon Triangulation What is a polygon? Last week A polygonal chain is a connected series of line segments A closed polygonal chain is a polygonal chain, such that there is also a line segment
More informationClosest Pair Problem
Closest Pair Problem Given n points in ddimensions, find two whose mutual distance is smallest. Fundamental problem in many applications as well as a key step in many algorithms. p q A naive algorithm
More informationBinary Space Partitions for AxisParallel Line Segments: SizeHeight Tradeoffs
Binary Space Partitions for AxisParallel Line Segments: SizeHeight Tradeoffs Sunil Arya Department of Computer Science The Hong Kong University of Science and Technology Clear Water Bay, Kowloon, Hong
More informationSOLVING DATABASE QUERIES USING ORTHOGONAL RANGE SEARCHING
SOLVING DATABASE QUERIES USING ORTHOGONAL RANGE SEARCHING CPS234: Computational Geometry Prof. Pankaj Agarwal Prepared by: Khalid Al Issa (khalid@cs.duke.edu) Fall 2005 BACKGROUND : RANGE SEARCHING, a
More informationFast approximation of the maximum area convex. subset for starshaped polygons
Fast approximation of the maximum area convex subset for starshaped polygons D. Coeurjolly 1 and J.M. Chassery 2 1 Laboratoire LIRIS, CNRS FRE 2672 Université Claude Bernard Lyon 1, 43, Bd du 11 novembre
More informationShortcut sets for plane Euclidean networks (Extended abstract) 1
Shortcut sets for plane Euclidean networks (Extended abstract) 1 J. Cáceres a D. Garijo b A. González b A. Márquez b M. L. Puertas a P. Ribeiro c a Departamento de Matemáticas, Universidad de Almería,
More information(Refer Slide Time: 1:21)
Introduction to Computer Graphics Dr. Prem Kalra Department of Computer Science and Engineering Indian Institute of Technology, Delhi Lecture  5 Polygon Clipping and Polygon Scan Conversion We have been
More information1 Computational Geometry
1 Computational Geometry Introduction Imagine you are walking on the campus of a university and suddenly you realize you have to make an urgent phone call. There are many public phones on campus and of
More informationCMPS 102 Solutions to Homework 1
CMPS 0 Solutions to Homework Lindsay Brown, lbrown@soe.ucsc.edu September 9, 005 Problem.. p. 3 For inputs of size n insertion sort runs in 8n steps, while merge sort runs in 64n lg n steps. For which
More information1. A student followed the given steps below to complete a construction. Which type of construction is best represented by the steps given above?
1. A student followed the given steps below to complete a construction. Step 1: Place the compass on one endpoint of the line segment. Step 2: Extend the compass from the chosen endpoint so that the width
More informationVoronoi Diagrams. (Slides mostly by Allen Miu)
Voronoi Diagrams (Slides mostly by Allen Miu) Post Office: What is the area of service? p i : site points q : free point e : Voronoi edge v : Voronoi vertex q p i v e Definition of Voronoi Diagram Let
More informationTriangulation by Ear Clipping
Triangulation by Ear Clipping David Eberly Geometric Tools, LLC http://www.geometrictools.com/ Copyright c 19982016. All Rights Reserved. Created: November 18, 2002 Last Modified: August 16, 2015 Contents
More informationGeometric Algorithms. range search quad and kd trees intersection search VLSI rules check. References: Algorithms in C (2nd edition), Chapters 2627
Geometric Algorithms range search quad and kd trees intersection search VLSI rules check References: Algorithms in C (2nd edition), Chapters 2627 http://www.cs.princeton.edu/introalgsds/73range http://www.cs.princeton.edu/introalgsds/74intersection
More informationBinary Search Trees. Data in each node. Larger than the data in its left child Smaller than the data in its right child
Binary Search Trees Data in each node Larger than the data in its left child Smaller than the data in its right child FIGURE 116 Arbitrary binary tree FIGURE 117 Binary search tree Data Structures Using
More informationMasters Thesis Computing the Visibility Graph of Points Within a Polygon. Jesper Buch Hansen
Masters Thesis Computing the Visibility Graph of Points Within a Polygon Jesper Buch Hansen December 22, 2005 Department of Computer Science, University of Aarhus Student Jesper Buch Hansen Supervisor
More informationClosest Pair of Points. Kleinberg and Tardos Section 5.4
Closest Pair of Points Kleinberg and Tardos Section 5.4 Closest Pair of Points Closest pair. Given n points in the plane, find a pair with smallest Euclidean distance between them. Fundamental geometric
More informationGeometry: Unit 1 Vocabulary TERM DEFINITION GEOMETRIC FIGURE. Cannot be defined by using other figures.
Geometry: Unit 1 Vocabulary 1.1 Undefined terms Cannot be defined by using other figures. Point A specific location. It has no dimension and is represented by a dot. Line Plane A connected straight path.
More informationInternet Packet Filter Management and Rectangle Geometry
Internet Packet Filter Management and Rectangle Geometry David Eppstein S. Muthukrishnan Abstract We consider rule sets for internet packet routing and filtering, where each rule consists of a range of
More informationSEARCHING AND SORTING
SEARCHING AND SORTING Searching A basic operation in computer science Problem formulation Given: Collection (array) of values A property on values Find: a value having the property in the array Examples
More informationScanLine Fill. ScanLine Algorithm. Sort by scan line Fill each span vertex order generated by vertex list
ScanLine Fill Can also fill by maintaining a data structure of all intersections of polygons with scan lines Sort by scan line Fill each span vertex order generated by vertex list desired order ScanLine
More informationFinal Review Geometry A Fall Semester
Final Review Geometry Fall Semester Multiple Response Identify one or more choices that best complete the statement or answer the question. 1. Which graph shows a triangle and its reflection image over
More informationDiscrete Mathematics (2009 Spring) Induction and Recursion (Chapter 4, 3 hours)
Discrete Mathematics (2009 Spring) Induction and Recursion (Chapter 4, 3 hours) ChihWei Yi Dept. of Computer Science National Chiao Tung University April 17, 2009 4.1 Mathematical Induction 4.1 Mathematical
More informationroot node level: internal node edge leaf node CS@VT Data Structures & Algorithms 20002009 McQuain
inary Trees 1 A binary tree is either empty, or it consists of a node called the root together with two binary trees called the left subtree and the right subtree of the root, which are disjoint from each
More informationChapter 13: Query Processing. Basic Steps in Query Processing
Chapter 13: Query Processing! Overview! Measures of Query Cost! Selection Operation! Sorting! Join Operation! Other Operations! Evaluation of Expressions 13.1 Basic Steps in Query Processing 1. Parsing
More informationBinary Heaps * * * * * * * / / \ / \ / \ / \ / \ * * * * * * * * * * * / / \ / \ / / \ / \ * * * * * * * * * *
Binary Heaps A binary heap is another data structure. It implements a priority queue. Priority Queue has the following operations: isempty add (with priority) remove (highest priority) peek (at highest
More informationApproximation Algorithms for Art Gallery Problems
Approximation Algorithms for Art Gallery Problems Subhas C. Nandy (nandysc@isical.ac.in) Advanced Computing and Microelectronics Unit Indian Statistical Institute Kolkata 700108, India. Outline 1 Introduction
More informationChapter 3.1 Angles. Geometry. Objectives: Define what an angle is. Define the parts of an angle.
Chapter 3.1 Angles Define what an angle is. Define the parts of an angle. Recall our definition for a ray. A ray is a line segment with a definite starting point and extends into infinity in only one direction.
More information8.1 Min Degree Spanning Tree
CS880: Approximations Algorithms Scribe: Siddharth Barman Lecturer: Shuchi Chawla Topic: Min Degree Spanning Tree Date: 02/15/07 In this lecture we give a local search based algorithm for the Min Degree
More informationBinary Heaps. CSE 373 Data Structures
Binary Heaps CSE Data Structures Readings Chapter Section. Binary Heaps BST implementation of a Priority Queue Worst case (degenerate tree) FindMin, DeleteMin and Insert (k) are all O(n) Best case (completely
More informationMultiWay Search Trees (B Trees)
MultiWay Search Trees (B Trees) Multiway Search Trees An mway search tree is a tree in which, for some integer m called the order of the tree, each node has at most m children. If n
More informationOptimal Binary Space Partitions in the Plane
Optimal Binary Space Partitions in the Plane Mark de Berg and Amirali Khosravi TU Eindhoven, P.O. Box 513, 5600 MB Eindhoven, the Netherlands Abstract. An optimal bsp for a set S of disjoint line segments
More informationStudent Name: Teacher: Date: District: MiamiDade County Public Schools. Assessment: 9_12 Mathematics Geometry Exam 1
Student Name: Teacher: Date: District: MiamiDade County Public Schools Assessment: 9_12 Mathematics Geometry Exam 1 Description: GEO Topic 1 Test: Tools of Geometry Form: 201 1. A student followed the
More informationBounds on the Obstacle Number
Bounds on the Obstacle Number OCICS Seminar Tommy Reddad Supervisors: Pat Morin, Vida Dujmović, Prosenjit Bose Computational Geometry Lab Carleton University October 25, 2013 Overview Obstacle number is
More informationFull and Complete Binary Trees
Full and Complete Binary Trees Binary Tree Theorems 1 Here are two important types of binary trees. Note that the definitions, while similar, are logically independent. Definition: a binary tree T is full
More informationVector storage and access; algorithms in GIS. This is lecture 6
Vector storage and access; algorithms in GIS This is lecture 6 Vector data storage and access Vectors are built from points, line and areas. (x,y) Surface: (x,y,z) Vector data access Access to vector
More informationCatalan Numbers. Thomas A. Dowling, Department of Mathematics, Ohio State Uni versity.
7 Catalan Numbers Thomas A. Dowling, Department of Mathematics, Ohio State Uni Author: versity. Prerequisites: The prerequisites for this chapter are recursive definitions, basic counting principles,
More informationReflex Vertices A 2. A 1 Figure 2a
Reflex Vertices For any integer n 3, the polygon determined by the n points 1,..., n (1) in the plane consists of the n segments 1 2, 2 3,..., n1 n, n 1, (2) provided that we never pass through a point
More informationPersistent Data Structures
6.854 Advanced Algorithms Lecture 2: September 9, 2005 Scribes: Sommer Gentry, Eddie Kohler Lecturer: David Karger Persistent Data Structures 2.1 Introduction and motivation So far, we ve seen only ephemeral
More informationAnalysis of Algorithms I: Optimal Binary Search Trees
Analysis of Algorithms I: Optimal Binary Search Trees Xi Chen Columbia University Given a set of n keys K = {k 1,..., k n } in sorted order: k 1 < k 2 < < k n we wish to build an optimal binary search
More informationThe Orthogonal Art Gallery Theorem with Constrained Guards
The Orthogonal Art Gallery Theorem with Constrained Guards T. S. Michael 1 Mathematics Department United States Naval Academy Annapolis, MD, U.S.A. Val Pinciu 2 Department of Mathematics Southern Connecticut
More informationUNIVERSITI MALAYSIA SARAWAK KOTA SAMARAHAN SARAWAK PSD2023 ALGORITHM & DATA STRUCTURE
STUDENT IDENTIFICATION NO UNIVERSITI MALAYSIA SARAWAK 94300 KOTA SAMARAHAN SARAWAK FAKULTI SAINS KOMPUTER & TEKNOLOGI MAKLUMAT (Faculty of Computer Science & Information Technology) Diploma in Multimedia
More informationx 2 f 2 e 1 e 4 e 3 e 2 q f 4 x 4 f 3 x 3
KarlFranzensUniversitat Graz & Technische Universitat Graz SPEZIALFORSCHUNGSBEREICH F 003 OPTIMIERUNG und KONTROLLE Projektbereich DISKRETE OPTIMIERUNG O. Aichholzer F. Aurenhammer R. Hainz New Results
More informationFast Evaluation of UnionIntersection Expressions
Fast Evaluation of UnionIntersection Expressions Philip Bille Anna Pagh Rasmus Pagh IT University of Copenhagen Data Structures for Intersection Queries Preprocess a collection of sets S 1,..., S m independently
More informationcircumscribed circle Vocabulary Flash Cards Chapter 10 (p. 539) Chapter 10 (p. 530) Chapter 10 (p. 538) Chapter 10 (p. 530)
Vocabulary Flash ards adjacent arcs center of a circle hapter 10 (p. 539) hapter 10 (p. 530) central angle of a circle chord of a circle hapter 10 (p. 538) hapter 10 (p. 530) circle circumscribed angle
More informationLecture 1: Course overview, circuits, and formulas
Lecture 1: Course overview, circuits, and formulas Topics in Complexity Theory and Pseudorandomness (Spring 2013) Rutgers University Swastik Kopparty Scribes: John Kim, Ben Lund 1 Course Information Swastik
More informationBoolean Operations on Intervals and AxisAligned Rectangles
Boolean Operations on Intervals and AxisAligned Rectangles David Eberly Geometric Tools, LLC http://www.geometrictools.com/ Copyright c 19982016. All Rights Reserved. Created: July 28, 2008 Contents
More informationarxiv:1209.1595v5 [math.co] 26 Dec 2014
TRIANGLEFREE INTERSECTION GRAPHS OF LINE SEGMENTS WITH LARGE CHROMATIC NUMBER ARKADIUSZ PAWLIK, JAKUB KOZIK, TOMASZ KRAWCZYK, MICHAŁ LASOŃ, PIOTR MICEK, WILLIAM T. TROTTER, AND BARTOSZ WALCZAK arxiv:1209.1595v5
More information1/1 7/4 2/2 12/7 10/30 12/25
Binary Heaps A binary heap is dened to be a binary tree with a key in each node such that: 1. All leaves are on, at most, two adjacent levels. 2. All leaves on the lowest level occur to the left, and all
More informationA binary search tree or BST is a binary tree that is either empty or in which the data element of each node has a key, and:
Binary Search Trees 1 The general binary tree shown in the previous chapter is not terribly useful in practice. The chief use of binary trees is for providing rapid access to data (indexing, if you will)
More information6.852: Distributed Algorithms Fall, 2009. Class 2
.8: Distributed Algorithms Fall, 009 Class Today s plan Leader election in a synchronous ring: Lower bound for comparisonbased algorithms. Basic computation in general synchronous networks: Leader election
More informationOn the effect of forwarding table size on SDN network utilization
IBM Haifa Research Lab On the effect of forwarding table size on SDN network utilization Rami Cohen IBM Haifa Research Lab Liane Lewin Eytan Yahoo Research, Haifa Seffi Naor CS Technion, Israel Danny Raz
More informationTHE PROBLEM WORMS (1) WORMS (2) THE PROBLEM OF WORM PROPAGATION/PREVENTION THE MINIMUM VERTEX COVER PROBLEM
1 THE PROBLEM OF WORM PROPAGATION/PREVENTION I.E. THE MINIMUM VERTEX COVER PROBLEM Prof. Tiziana Calamoneri Network Algorithms A.y. 2014/15 2 THE PROBLEM WORMS (1)! A computer worm is a standalone malware
More informationPartitioning edgecoloured complete graphs into monochromatic cycles and paths
arxiv:1205.5492v1 [math.co] 24 May 2012 Partitioning edgecoloured complete graphs into monochromatic cycles and paths Alexey Pokrovskiy Departement of Mathematics, London School of Economics and Political
More informationRemoving Local Extrema from Imprecise Terrains
Removing Local Extrema from Imprecise Terrains Chris Gray Frank Kammer Maarten Löffler Rodrigo I. Silveira Abstract In this paper we consider imprecise terrains, that is, triangulated terrains with a vertical
More informationGRAPHING (2 weeks) Main Underlying Questions: 1. How do you graph points?
GRAPHING (2 weeks) The Rectangular Coordinate System 1. Plot ordered pairs of numbers on the rectangular coordinate system 2. Graph paired data to create a scatter diagram 1. How do you graph points? 2.
More information5.2. Systems of linear equations and their solution sets
5.2. Systems of linear equations and their solution sets Solution sets of systems of equations as intersections of sets Any collection of two or more equations is called a system of equations. The solution
More informationAnalysis of Algorithms, I
Analysis of Algorithms, I CSOR W4231.002 Eleni Drinea Computer Science Department Columbia University Thursday, February 26, 2015 Outline 1 Recap 2 Representing graphs 3 Breadthfirst search (BFS) 4 Applications
More informationBinary Image Scanning Algorithm for Cane Segmentation
Binary Image Scanning Algorithm for Cane Segmentation Ricardo D. C. Marin Department of Computer Science University Of Canterbury Canterbury, Christchurch ricardo.castanedamarin@pg.canterbury.ac.nz Tom
More informationeach college c i C has a capacity q i  the maximum number of students it will admit
n colleges in a set C, m applicants in a set A, where m is much larger than n. each college c i C has a capacity q i  the maximum number of students it will admit each college c i has a strict order i
More informationEfficient Recovery of Secrets
Efficient Recovery of Secrets Marcel Fernandez Miguel Soriano, IEEE Senior Member Department of Telematics Engineering. Universitat Politècnica de Catalunya. C/ Jordi Girona 1 i 3. Campus Nord, Mod C3,
More informationAnalysis of a Search Algorithm
CSE 326 Lecture 4: Lists and Stacks 1. Agfgd 2. Dgsdsfd 3. Hdffdsf 4. Sdfgsfdg 5. Tefsdgass We will review: Analysis: Searching a sorted array (from last time) List ADT: Insert, Delete, Find, First, Kth,
More information