Lecture 2: Fixed-Radius Near Neighbors and Geometric Basics

Size: px
Start display at page:

Download "Lecture 2: Fixed-Radius Near Neighbors and Geometric Basics"

Transcription

1 structure arises in many alications of geometry. The dual structure, called a Delaunay triangulation also has many interesting roerties. Figure 3: Voronoi diagram and Delaunay triangulation. Search: Geometric search roblems are of the following general form. Given a data set (e.g. oints, lines, olygons) which will not change, rerocess this data set into a data structure so that some tye of query can be answered as efficiently as ossible. For examle, a nearest neighbor search query is: determine the oint of the data set that is closest to a given query oint. A range query is: determine the set of oints (or count the number of oints) from the data set that lie within a given region. The region may be a rectangle, disc, or olygonal shae, like a triangle. Lecture 2: Fixed-Radius Near Neighbors and Geometric Basics Reading: The material on the Fixed-Radius Near Neighbor roblem is taken from the aer: The comlexity of finding fixed-radius near neighbors, by J. L. Bentley, D. F. Stanat, and E. H. Williams, Information Processing Letters, 6(6), 1977, The material on affine and Euclidean geometry is covered in many textbooks on basic geometry and comuter grahics. Fixed-Radius Near Neighbor Problem: As a warm-u exercise for the course, we begin by considering one of the oldest results in comutational geometry. This roblem was considered back in the mid 70 s, and is a fundamental roblem involving a set of oints in dimension d. We will consider the roblem in the lane, but the generalization to higher dimensions will be straightforward. We assume that we are given a set P of n oints in the lane. As will be our usual ractice, we assume that each oint is reresented by its (x, y) coordinates, denoted ( x, y ). The Euclidean distance between two oints and q, denoted q is q = ( x q x ) 2 +( y q y ) 2. Given the set P and a distance r>0, our goal is to reort all airs of distinct oints, q P such that q r. This is called the fixed-radius near neighbor (reorting) roblem. Reorting versus Counting: We note that this is a reorting roblem, which means that our objective is to reort all such airs. This is in contrast to the corresonding counting roblem, in which the objective is to return a count of the number of airs satisfying the distance condition. It is usually easier to solve reorting roblems otimally than counting roblems. This may seem counterintuitive at first (after all, if you can reort, then you can certainly count). The reason is that we know that any algorithm that reorts some number k of airs must take at least Ω(k) time. Thus if k is large, a reorting algorithm has the luxury of being able to run for a longer time and still claim to be otimal. In contrast, we cannot aly such a lower bound to a counting algorithm. Lecture Notes 5 CMSC 754

2 Simle Observations: To begin, let us make a few simle observations. This roblem can easily be solved in O(n 2 ) time, by simly enumerating all airs of distinct oints and comuting the distance between each air. The number of distinct airs of n oints is ( ) n = 2 n(n 1). 2 Letting k denote the number of airs that reorted, our goal will be to find an algorithm whose running time is (nearly) linear in n and k, ideally O(n + k). This will be otimal, since any algorithm must take the time to read all the inut and rint all the results. (This assumes a naive reresentation of the outut. Perhas there are more clever ways in which to encode the outut, which would require less than O(k) sace.) To gain some insight to the roblem, let us consider how to solve the 1-dimensional version, where we are just given a set of n oints on the line, say, x 1,x 2,...,x n. In this case, one solution would be to first sort the values in increasing order. Let suose we have already done this, and so: x 1 <x 2 <...<x n. Now, for i running from 1 to n, we consider the successive oints x i+1, x i+2, x i+3, and so on, until we first find a oint whose distance exceeds r. We reort x i together with all succeeding oints that are within distance r. r x 1 x 2 x 3 x 4 x 5 x 6 Figure 4: Fixed radius nearest neighbor on the line. The running time of this algorithm involves the O(n log n) time needed to sort the oints and the time required for distance comutations. Let k i denote the number of airs generated when we visit i. Observe that the rocessing of i involves k i +1 distance comutations (one additional comutation for the oints whose distance exceeds r). Thus, u to constant factors, the total running time is: T (n, k) = n log n + n (k i +1) = n log n + n + i=1 = n log n + n + k = O(k + n log n). This is close to the O(k + n) time we were hoing for. It seems that any aroach based on sorting is doomed to take at least Ω(n log n) time. So, if we are to imrove uon this, we cannot sort. But is sorting really necessary? Let us consider an aroach based on bucketing. 1-dimensional Solution with Bucketing: Rather than sorting the oints, suose that we subdivide the line into intervals of length r. In articular, we can take the line to be comosed of an infinite collection of half-oen intervals:...,[ 3r, 2r), [ 2r, r), [ r, 0), [0,r), [r, 2r), [2r, 3r),... In general, interval b is [br, (b +1)r). A oint x lies in the interval b = x/r. Thus, in O(n) time we can associate the n oints of P with a set of n integer bucket indices b i. Although there are an infinite number of intervals, at most n will be occuied, meaning that they contain a oint of P. There are a number of ways to organize the occuied buckets. They could be sorted, but then we are back to O(n log n) time. Since bucket indices are integers, a better aroach is to store the occuied bucket indices n i=1 k i Lecture Notes 6 CMSC 754

3 in a hash table. Thus in O(1) exected time, we can determine which bucket contains a given oint and look this bucket u in the hash table. We can store all the oints lying with any given bucket in an (unsorted) list associated with its bucket, in O(n) total time. The fact that the running time is in the exected case, rather than worst case is a bit unleasant. However, it can be shown that by using a good randomized hash function, the robability that the total running time is worse than O(n) can be made arbitrarily small. If the algorithm erforms significantly more than the exected number of comutations, we can simly chose a different random hash function and try again. This will lead to a very ractical solution. How does bucketing hel? Observe that if oint x lies in bucket b, then any successors that lie within distance r must lie either in bucket b or in b +1. This suggests the straightforward solution shown below. Fixed-Radius Near Neighbor on the Line by Bucketing (1) Store the oints of P into buckets of size r, stored in a hash table. (2) For each x P do the following: (a) Let b be the bucket containing x. (b) Search all the oints of buckets b and b +1, reort x along with all those oints x that lie within distance r of x. To avoid dulicates, we need only reort airs (x, x ) where x >x. The key question is determining the time comlexity of this algorithm is how many distance comutations are erformed in ste (2b). We comare each oint in bucket b with all the oints in buckets b and b +1. However, not all of these distance comutations will result in a air of oints whose distance is within r. Might it be that we waste a great deal of time in erforming comutations for which we receive no benefit? The lemma below shows that we erform no more than a constant factor times as many distance comutations and airs that are roduced. It will simlify things considerably if, rather than counting distinct airs of oints, we simly count all (ordered) airs of oints that lie within distance r of each other. Thus each air of oints will be counted twice, (, q) and (q, ). Note that this includes reorting each oint as a air (, ) as well, since each oint is within distance r of itself. This does not affect the asymtotic bounds, since the number of distinct airs is smaller by a factor of roughly 1/2. Lemma: Let k denote the number of (not necessarily distinct) airs of oints of P that are within distance r of each other. Let D denote the total number distance comutations made in ste (2b) of the above algorithm. Then D 2k. Proof: We will make use of the following inequality in the roof: xy x2 + y 2. 2 This follows by exanding the obvious inequality (x y) 2 0. Let B denote the (infinite) set of buckets. For any bucket b B, let b +1denote its successor bucket on the line, and let n b denote the number of oints of P in b. Define S = b B n 2 b. First we bound the total number of distance comutations D as a function of S. Each oint in bucket b comutes the distance to every other oint in bucket b and every oint in bucket b +1, and hence D = n b (n b + n b+1 ) = n 2 b + n b n b+1 b B b B = b B n 2 b + b B n b n b+1 Lecture Notes 7 CMSC 754

4 b B n 2 b + b B n 2 b + n2 b+1 2 = n 2 b + b B b B n 2 b 2 + n 2 b+1 2 b B = S + S 2 + S 2 = 2S. Next we bound the number of airs reorted from below as a function of S. Since each air of oints lying in bucket b is within distance r of every other, there are n 2 b airs in bucket b alone that are within distance r of each other, and hence (considering just the airs generated within each bucket) we have k S. Therefore we have D 2S 2k, which comletes the roof. By combining this with the O(n) exected time needed to bucket the oints, it follows that the total exected running time is O(n + k). Generalization to d dimensions: This bucketing algorithm is easy to extend to multile dimensions. For examle, in dimension 2, we bucket oints into a square grid in which each grid square is of side length r. The bucket index of a oint (x, y) is a air ( x/r, y/r ). We aly a hash function that accets two arguments. To generalize the algorithm, for each oint we consider the oints in its surrounding 3 3 subgrid of buckets. By generalizing the above arguements, it can be shown that the algorithm s exected running time is O(n + k). The details are left as an exercise. r Figure 5: Fixed radius nearest neighbor on the lane. This examle roblem serves to illustrate some of the tyical elements of comutational geometry. Geometry itself did not lay a significant role in the roblem, other than the relatively easy task of comuting distances. We will see examles later this semester where geometry lays a much more imortant role. The major emhasis was on accounting for the algorithm s running time. Also note that, although we discussed the ossibility of generalizing the algorithm to higher dimensions, we did not treat the dimension as an asymtotic quantity. In fact, a more careful analysis reveals that this algorithm s running time increases exonentially with the dimension. (Can you see why?) Geometry Basics: As we go through the semester, we will introduce much of the geometric facts and comutational rimitives that we will be needing. For the most art, we will assume that any geometric rimitive involving a Lecture Notes 8 CMSC 754

5 constant number of elements of constant comlexity can be comuted in O(1) time, and we will not concern ourselves with how this comutation is done. (For examle, given three noncolinear oints in the lane, comute the unique circle assing through these oints.) Nonetheless, for a bit of comleteness, let us begin with a quick review of the basic elements of affine and Euclidean geometry. There are a number of different geometric systems that can be used to exress geometric algorithms: affine geometry, Euclidean geometry, and rojective geometry, for examle. This semester we will be working almost exclusively with affine and Euclidean geometry. Before getting to Euclidean geometry we will first define a somewhat more basic geometry called affine geometry. Later we will add one oeration, called an inner roduct, which extends affine geometry to Euclidean geometry. Affine Geometry: An affine geometry consists of a set of scalars (the real numbers), a set of oints, and a set of free vectors (or simly vectors). Points are used to secify osition. Free vectors are used to secify direction and magnitude, but have no fixed osition in sace. (This is in contrast to linear algebra where there is no real distinction between oints and vectors. However this distinction is useful, since the two are really quite different.) The following are the oerations that can be erformed on scalars, oints, and vectors. Vector oerations are just the familiar ones from linear algebra. It is ossible to subtract two oints. The difference q of two oints results in a free vector directed from q to. It is also ossible to add a oint to a vector. In oint-vector addition + v results in the oint which is translated by v from. Letting S denote an generic scalar, V a generic vector and P a generic oint, the following are the legal oerations in affine geometry: S V V scalar-vector multilication V + V V vector addition P P V oint subtraction P + V P oint-vector addition u+v u v vector addition q q oint subtraction +v v oint vector addition Figure 6: Affine oerations. A number of oerations can be derived from these. For examle, we can define the subtraction of two vectors u v as u +( 1) v or scalar-vector division v/α as (1/α) v rovided α 0. There is one secial vector, called the zero vector, 0, which has no magnitude, such that v + 0 = v. Note that it is not ossible to multily a oint times a scalar or to add two oints together. However there is a secial oeration that combines these two elements, called an affine combination. Given two oints 0 and 1 and two scalars α 0 and α 1, such that α 0 + α 1 =1, we define the affine combination aff( 0, 1 ; α 0,α 1 ) = α α 1 1 = 0 + α 1 ( 1 0 ). Note that the middle term of the above equation is not legal given our list of oerations. But this is how the affine combination is tyically exressed, namely as the weighted average of two oints. The right-hand side (which is easily seen to be algebraically equivalent) is legal. An imortant observation is that, if 0 1, then Lecture Notes 9 CMSC 754

6 aff(,q; 1/2, 3/2) aff(,q; 0,1) aff(,q; 1/2,1/2) aff(,q; 1,0) q Figure 7: Affine combination. the oint aff( 0, 1 ; α 0,α 1 ) lies on the line joining 0 and 1.Asα 1 varies from to + it traces out all the oints on this line. In the secial case where 0 α 0,α 1 1, aff( 0, 1 ; α 0,α 1 ) is a oint that subdivides the line segment 0 1 into two subsegments of relative sizes α 1 to α 0. The resulting oeration is called a convex combination, and the set of all convex combinations traces out the line segment 0 1. It is easy to extend both tyes of combinations to more than two oints, by adding the condition that the sum α 0 + α 1 + α 2 =1. aff( 0, 1, 2 ; α 0,α 1,α 2 ) = α α α 2 2 = 0 + α 1 ( 1 0 )+α 2 ( 2 0 ). The set of all affine combinations of three (noncolinear) oints generates a lane. The set of all convex combinations of three oints generates all the oints of the triangle defined by the oints. These shaes are called the affine san or affine closure, and convex closure of the oints, resectively. Euclidean Geometry: In affine geometry we have rovided no way to talk about angles or distances. Euclidean geometry is an extension of affine geometry which includes one additional oeration, called the inner roduct, which mas two real vectors (not oints) into a nonnegative real. One imortant examle of an inner roduct is the dot roduct, defined as follows. Suose that the d-dimensional vector u is reresented by the (nonhomogeneous) coordinate vector (u 1,u 2,...,u d ). Then define d 1 u v = u i v i, i=0 The dot roduct is useful in comuting the following entities. Length: of a vector v is defined to be v = v v. Normalization: Given any nonzero vector v, define the normalization to be a vector of unit length that oints in the same direction as v. We will denote this by ˆv: ˆv = v v. Distance between oints: Denoted either dist(, q) or q is the length of the vector between them, q. Angle: between two nonzero vectors u and v (ranging from 0 to π)is ( ) u v ang( u, v) =cos 1. =cos 1 (û ˆv). u v This is easy to derive from the law of cosines. Lecture Notes 10 CMSC 754

7 Lecture 3: Orientations and Convex Hulls Reading: Chater 1 in the 4M s (de Berg, van Kreveld, Overmars, Schwarzkof). The divide-and-conquer algorithm is given in Joseh O Rourke s, Comutational Geometry in C. O Rourke s book is also a good source for information about orientations and some other geometric rimitives. Orientation: In order to make discrete decisions, we would like a geometric oeration that oerates on oints in a manner that is analogous to the relational oerations (<, =,>) with numbers. There does not seem to be any natural intrinsic way to comare two oints in d-dimensional sace, but there is a natural relation between ordered (d +1)-tules of oints in d-sace, which extends the notion of binary relations in 1-sace, called orientation. Given an ordered trile of oints, q, r in the lane, we say that they have ositive orientation if they define a counterclockwise oriented triangle, negative orientation if they define a clockwise oriented triangle, and zero orientation if they are collinear (which includes as well the case where two or more of the oints are identical). Note that orientation deends on the order in which the oints are given. r ositive q negative r q r zero Figure 8: Orientations of the ordered trile (, q, r). Orientation is formally defined as the sign of the determinant of the oints given in homogeneous coordinates, that is, by reending a 1 to each coordinate. For examle, in the lane, we define 1 x y Orient(, q, r) =det 1 q x q y. 1 r x r y Observe that in the 1-dimensional case, Orient(, q) is just q. Hence it is ositive if <q, zero if = q, and negative if >q. Thus orientation generalizes <, =,>in 1-dimensional sace. Also note that the sign of the orientation of an ordered trile is unchanged if the oints are translated, rotated, or scaled (by a ositive scale factor). A reflection transformation, e.g., f(x, y) =( x, y), reverses the sign of the orientation. In general, alying any affine transformation to the oint alters the sign of the orientation according to the sign of the matrix used in the transformation. In general, given an ordered 4-tule oints in 3-sace, we can also define their orientation as being either ositive (forming a right-handed screw), negative (a left-handed screw), or zero (colanar). This can be generalized to any ordered (d +1)-tule oints in d-sace. Areas and Angles: The orientation determinant, together with the Euclidean norm can be used to comute angles in the lane. This determinant Orient(, q, r) is equal to twice the signed area of the triangle qr (ositive if CCW and negative otherwise). Thus the area of the triangle can be determined by dividing this quantity by 2. In general in dimension d the area of the simlex sanned by d +1oints can be determined by taking this determinant and dividing by (d!). Once you know the area of a triangle, you can use this to comute the area of a olygon, by exressing it as the sum of triangle areas. (Although there are other methods that may be faster or easier to imlement.) Recall that the dot roduct returns the cosine of an angle. However, this is not helful for distinguishing ositive from negative angles. The sine of the angle θ = qr (the signed angled from vector q to vector r q) can q =r zero q Lecture Notes 11 CMSC 754

8 be comuted as sin θ = q r q Orient(q,, r). (Notice the order of the arameters.) By knowing both the sine and cosine of an angle we can unambiguously determine the angle. Convexity: Now that we have discussed some of the basics, let us consider a fundamental structure in comutational geometry, called the convex hull. We will give a more formal definition later, but the convex hull can be defined intuitively by surrounding a collection of oints with a rubber band and letting the rubber band sna tightly around the oints. Figure 9: A oint set and its convex hull. There are a number of reasons that the convex hull of a oint set is an imortant geometric structure. One is that it is one of the simlest shae aroximations for a set of oints. It can also be used for aroximating more comlex shaes. For examle, the convex hull of a olygon in the lane or olyhedron in 3-sace is the convex hull of its vertices. (Perhas the most common shae aroximation used in the minimum axis-arallel bounding box, but this is trivial to comute.) Also many algorithms comute the convex hull as an initial stage in their execution or to filter out irrelevant oints. For examle, in order to find the smallest rectangle or triangle that encloses a set of oints, it suffices to first comute the convex hull of the oints, and then find the smallest rectangle or triangle enclosing the hull. Convexity: A set S is convex if given any oints, q S any convex combination of and q is in S, or equivalently, the line segment q S. Convex hull: The convex hull of any set S is the intersection of all convex sets that contains S, or more intuitively, the smallest convex set that contains S. Following our book s notation, we will denote this CH(S). An equivalent definition of convex hull is the set of oints that can be exressed as convex combinations of the oints in S. (A roof can be found in any book on convexity theory.) Recall that a convex combination of three or more oints is an affine combination of the oints in which the coefficients sum to 1 and all the coefficients are in the interval [0, 1]. Some Terminology: Although we will not discuss toology with any degree of formalism, we will need to use some terminology from toology. These terms deserve formal definitions, but we are going to cheat and rely on intuitive definitions, which will suffice for the sort simle, well behaved geometry objects that we will be dealing with. Beware that these definitions are not fully general, and you are refered to a good text on toology for formal definitions. For our uroses, define a neighborhood of a oint to be the set of oints whose distance to is strictly less than some ositive r, that is, it is the set of oints lying within an oen ball of radius r centered about. Given a set S, a oint is an interior oint of S if for some radius r the neighborhood about of radius r is contained within S. A oint is an exterior oint if it an interior oint for the comlement of S. Points that are neither interior or exterior are boundary oints. A set is oen if it contains none of its boundary oints and closed if its comlement is oen. If is in S but is not an interior oint, we will call it a boundary oint. We say that a geometric set is bounded if it can be enclosed in a ball of finite radius. A comact set is one that is both closed and bounded. Lecture Notes 12 CMSC 754

9 In general, convex sets may have either straight or curved boundaries and may be bounded or unbounded. Convex sets may be toologically oen or closed. Some examles are shown in the figure below. The convex hull of a finite set of oints in the lane is a bounded, closed, convex olygon. Neighborhood Oen Closed Unbounded Nonconvex Convex Figure 10: Terminology. Convex hull roblem: The (lanar) convex hull roblem is, given a set of n oints P in the lane, outut a reresentation of P s convex hull. The convex hull is a closed convex olygon, the simlest reresentation is a counterclockwise enumeration of the vertices of the convex hull. (A clockwise is also ossible. We usually refer counterclockwise enumerations, since they corresond to ositive orientations, but obviously one reresentation is easily converted into the other.) Ideally, the hull should consist only of extreme oints, in the sense that if three oints lie on an edge of the boundary of the convex hull, then the middle oint should not be outut as art of the hull. There is a simle O(n 3 ) convex hull algorithm, which oerates by considering each ordered air of oints (, q), and the determining whether all the remaining oints of the set lie within the half-lane lying to the right of the directed line from to q. (Observe that this can be tested using the orientation test.) The question is, can we do better? Graham s scan: We will resent an O(n log n) algorithm for convex hulls. It is a simle variation of a famous algorithm for convex hulls, called Graham s scan. This algorithm dates back to the early 70 s. The algorithm is based on an aroach called incremental construction, in which oints are added one at a time, and the hull is udated with each new insertion. If we were to add oints in some arbitrary order, we would need some method of testing whether oints are inside the existing hull or not. To avoid the need for this test, we will add oints in increasing order of x-coordinate, thus guaranteeing that each newly added oint is outside the current hull. (Note that Graham s original algorithm sorted oints in a different way. It found the lowest oint in the data set and then sorted oints cyclically around this oint.) Since we are working from left to right, it would be convenient if the convex hull vertices were also ordered from left to right. The convex hull is a cyclically ordered sets. Cyclically ordered sets are somewhat messier to work with than simle linearly ordered sets, so we will break the hull into two hulls, an uer hull and lower hull. The break oints common to both hulls will be the leftmost and rightmost vertices of the convex hull. After building both, the two hulls can be concatenated into a single cyclic counterclockwise list. Here is a brief resentation of the algorithm for comuting the uer hull. We will store the hull vertices in a stack U, where the to of the stack corresonds to the most recently added oint. Let first(u) and second(u) denote the to and second element from the to of U, resectively. Observe that as we read the stack from to to bottom, the oints should make a (strict) left-hand turn, that is, they should have a ositive orientation. Thus, after adding the last oint, if the revious two oints fail to have a ositive orientation, we o them off the stack. Since the orientations of remaining oints on the stack are unaffected, there is no need to check any oints other than the most recent oint and its to two neighbors on the stack. Let us consider the uer hull, since the lower hull is symmetric. Let 1, 2,..., n denote the set of oints, sorted by increase x-coordinates. As we walk around the uer hull from left to right, observe that each consecutive trile along the hull makes a right-hand turn. That is, if, q, r are consecutive oints along the uer hull, then Orient(, q, r) < 0. When a new oint i is added to the current hull, this may violate the right-hand turn Lecture Notes 13 CMSC 754

10 (1) Sort the oints according to increasing order of their x-coordinates, denoted 1, 2,..., n. (2) Push 1 and then 2 onto U. (3) for i =3to n do: (a) while size(u) 2 and Orient( i, first(u), second(u)) 0, o U. (b) Push i onto U. Graham s Scan uer hull i i 1 n o lower hull rocessing [i] after adding [i] Figure 11: Convex hulls and Graham s scan. invariant. So we check the last three oints on the uer hull, including i. They fail to form a right-hand turn, then we delete the oint rior to i. This is reeated until the number of oints on the uer hull (including i ) is less than three, or the right-hand turn condition is reestablished. See the text for a comlete descrition of the code. We have ignored a number of secial cases. We will consider these next time. Analysis: Let us rove the main result about the running time of Graham s scan. Theorem: Graham s scan runs in O(n log n) time. Proof: Sorting the oints according to x-coordinates can be done by any efficient sorting algorithm in O(n log n) time. Let D i denote the number of oints that are oed (deleted) on rocessing i. Because each orientation test takes O(1) time, the amount of time sent rocessing i is O(D i +1). (The extra +1 is for the last oint tested, which is not deleted.) Thus, the total running time is roortional to n n (D i +1) = n + D i. i=1 To bound i D i, observe that each of the n oints is ushed onto the stack once. Once a oint is deleted it can never be deleted again. Since each of n oints can be deleted at most once, i D i n. Thus after sorting, the total running time is O(n). Since this is true for the lower hull as well, the total time is O(2n) =O(n). Convex Hull by Divide-and-Conquer: As with sorting, there are many different aroaches to solving the convex hull roblem for a lanar oint set P. Next we will consider another O(n log n) algorithm, which is based on the divide-and-conquer design technique. It can be viewed as a generalization of the famous MergeSort sorting algorithm (see Cormen, Leiserson, and Rivest). Here is an outline of the algorithm. It begins by sorting the oints by their x-coordinate, in O(n log n) time. The asymtotic running time of the algorithm can be exressed by a recurrence. Given an inut of size n, consider the time needed to erform all the arts of the rocedure, ignoring the recursive calls. This includes the time to artition the oint set, comute the two tangents, and return the final result. Clearly the first and third of these stes can be erformed in O(n) time, assuming a linked list reresentation of the hull vertices. Below we i=1 Lecture Notes 14 CMSC 754

11 Divide-and-Conquer Convex Hull (1) If P 3, then comute the convex hull by brute force in O(1) time and return. (2) Otherwise, artition the oint set P into two sets A and B, where A consists of half the oints with the lowest x-coordinates and B consists of half of the oints with the highest x-coordinates. (3) Recursively comute H A = CH(A) and H B = CH(B). (4) Merge the two hulls into a common convex hull, H, by comuting the uer and lower tangents for H A and H B and discarding all the oints lying between these two tangents. uer tangent b A B A a B lower tangent (a) (b) Figure 12: Comuting the lower tangent. will show that the tangents can be comuted in O(n) time. Thus, ignoring constant factors, we can describe the running time by the following recurrence. { 1 if n 3 T (n) = n +2T (n/2) otherwise. This is the same recurrence that arises in Mergesort. It is easy to show that it solves to T (n) O(n log n) (see CLR). All that remains is showing how to comute the two tangents. One thing that simlifies the rocess of comuting the tangents is that the two oint sets A and B are searated from each other by a vertical line (assuming no dulicate x-coordinates). Let s concentrate on the lower tangent, since the uer tangent is symmetric. The algorithm oerates by a simle walking rocedure. We initialize a to be the rightmost oint of H A and b is the leftmost oint of H B. (These can be found in linear time.) Lower tangency is a condition that can be tested locally by an orientation test of the two vertices and neighboring vertices on the hull. (This is a simle exercise.) We iterate the following two loos, which march a and b down, until they reach the oints lower tangency. Finding the Lower Tangent LowerTangent(H A,H B ): (1) Let a be the rightmost oint of H A. (2) Let b be the leftmost oint of H B. (3) While ab is not a lower tangent for H A and H B do (a) While ab is not a lower tangent to H A do a = a 1 (move a clockwise). (b) While ab is not a lower tangent to H B do b = b +1(move b counterclockwise). (4) Return ab. Proving the correctness of this rocedure is a little tricky, but not too bad. Check O Rourke s book out for a careful roof. The imortant thing is that each vertex on each hull can be visited at most once by the search, and Lecture Notes 15 CMSC 754

12 hence its running time is O(m), where m = H A + H B A + B. This is exactly what we needed to get the overall O(n log n) running time. Lecture 4: More Convex Hull Algorithms Reading: Today s material is not covered in the 4M s book. It is covered in O Rourke s book on Comutational Geometry. Chan s algorithm can be found in T. Chan, Otimal outut-sensitive convex hull algorithms in two and three dimensions, Discrete and Comutational Geometry, 16, 1996, QuickHull: If the divide-and-conquer algorithm can be viewed as a sort of generalization of MergeSort, one might ask whether there is corresonding generalization of other sorting algorithm for comuting convex hulls. In articular, the next algorithm that we will consider can be thought of as a generalization of the QuickSort sorting rocedure. The resulting algorithm is called QuickHull. Like QuickSort, this algorithm runs in O(n log n) time for favorable inuts but can take as long as O(n 2 ) time for unfavorable inuts. However, unlike QuickSort, there is no obvious way to convert it into a randomized algorithm with O(n log n) exected running time. Nonetheless, QuickHull tends to erform very well in ractice. The intuition is that in many alications most of the oints lie in the interior of the hull. For examle, if the oints are uniformly distributed in a unit square, then it can be shown that the exected number of oints on the convex hull is O(log n). The idea behind QuickHull is to discard oints that are not on the hull as quickly as ossible. QuickHull begins by comuting the oints with the maximum and minimum, x- and y-coordinates. Clearly these oints must be on the hull. Horizontal and vertical lines assing through these oints are suort lines for the hull, and so define a bounding rectangle, within which the hull is contained. Furthermore, the convex quadrilateral defined by these four oints lies within the convex hull, so the oints lying within this quadrilateral can be eliminated from further consideration. All of this can be done in O(n) time. discard these Figure 13: QuickHull s initial quadrilateral. To continue the algorithm, we classify the remaining oints into the four corner triangles that remain. In general, as this algorithm executes, we will have an inner convex olygon, and associated with each edge we have a set of oints that lie outside of that edge. (More formally, these oints are witnesses to the fact that this edge is not on the convex hull, because they lie outside the half-lane defined by this edge.) When this set of oints is emty, the edge is a final edge of the hull. Consider some edge ab. Assume that the oints that lie outside of this hull edge have been laced in a bucket that is associated with ab. Our job is to find a oint c among these oints that lies on the hull, discard the oints in the triangle abc, and slit the remaining oints into two subsets, those that lie outside ac and those than lie outside of cb. We can classify each oint by making two orientation tests. How should c be selected? There are a number of ossible selection criteria that one might think of. The method that is most often roosed is to let c be the oint that maximizes the erendicular distance from the line ab. (For examle, another ossible choice might be the oint that maximizes the angle cba or cab. It turns out that Lecture Notes 16 CMSC 754

CMSC 754 Computational Geometry 1

CMSC 754 Computational Geometry 1 CMSC 754 Comutational Geometry 1 David M. Mount Deartment of Comuter Science University of Maryland Fall 2002 1 Coyright, David M. Mount, 2002, Det. of Comuter Science, University of Maryland, College

More information

Cross products. p 2 p. p p1 p2. p 1. Line segments The convex combination of two distinct points p1 ( x1, such that for some real number with 0 1,

Cross products. p 2 p. p p1 p2. p 1. Line segments The convex combination of two distinct points p1 ( x1, such that for some real number with 0 1, CHAPTER 33 Comutational Geometry Is the branch of comuter science that studies algorithms for solving geometric roblems. Has alications in many fields, including comuter grahics robotics, VLSI design comuter

More information

Cross products Line segments The convex combination of two distinct points p

Cross products Line segments The convex combination of two distinct points p CHAPTER Comutational Geometry Is the branch of comuter science that studies algorithms for solving geometric roblems. Has alications in many fields, including comuter grahics robotics, VLSI design comuter

More information

Lecture 3: Geometric Algorithms(Convex sets, Divide & Conquer Algo.)

Lecture 3: Geometric Algorithms(Convex sets, Divide & Conquer Algo.) Advanced Algorithms Fall 2015 Lecture 3: Geometric Algorithms(Convex sets, Divide & Conuer Algo.) Faculty: K.R. Chowdhary : Professor of CS Disclaimer: These notes have not been subjected to the usual

More information

COT5405: GEOMETRIC ALGORITHMS

COT5405: GEOMETRIC ALGORITHMS COT5405: GEOMETRIC ALGORITHMS Objects: Points in, Segments, Lines, Circles, Triangles Polygons, Polyhedra R n Alications Vision, Grahics, Visualizations, Databases, Data mining, Networks, GIS Scientific

More information

Lecture 8: Orthogonal Range Searching

Lecture 8: Orthogonal Range Searching CPS234 Comutational Geometry Setember 22nd, 2005 Lecture 8: Orthogonal Range Searching Lecturer: Pankaj K. Agarwal Scribe: Mason F. Matthews 8.1 Range Searching The general roblem of range searching is

More information

CMSC 425: Lecture 16 Motion Planning: Basic Concepts

CMSC 425: Lecture 16 Motion Planning: Basic Concepts : Lecture 16 Motion lanning: Basic Concets eading: Today s material comes from various sources, including AI Game rogramming Wisdom 2 by S. abin and lanning Algorithms by S. M. LaValle (Chats. 4 and 5).

More information

CMSC 754 Computational Geometry 1

CMSC 754 Computational Geometry 1 CMSC 754 Computational Geometry 1 David M. Mount Department of Computer Science University of Maryland Spring 2007 1 Copyright, David M. Mount, 2007, Dept. of Computer Science, University of Maryland,

More information

Convex Hulls. Helen Cameron. Helen Cameron Convex Hulls 1/101

Convex Hulls. Helen Cameron. Helen Cameron Convex Hulls 1/101 Convex Hulls Helen Cameron Helen Cameron Convex Hulls 1/101 What Is a Convex Hull? Starting Point: Points in 2D y x Helen Cameron Convex Hulls 3/101 Convex Hull: Informally Imagine that the x, y-lane is

More information

Randomized algorithms: Two examples and Yao s Minimax Principle

Randomized algorithms: Two examples and Yao s Minimax Principle Randomized algorithms: Two examles and Yao s Minimax Princile Maximum Satisfiability Consider the roblem Maximum Satisfiability (MAX-SAT). Bring your knowledge u-to-date on the Satisfiability roblem. Maximum

More information

Shuigeng Zhou. May 18, 2016 School of Computer Science Fudan University

Shuigeng Zhou. May 18, 2016 School of Computer Science Fudan University Query Processing Shuigeng Zhou May 18, 2016 School of Comuter Science Fudan University Overview Outline Measures of Query Cost Selection Oeration Sorting Join Oeration Other Oerations Evaluation of Exressions

More information

Range Searching. Data structure for a set of objects (points, rectangles, polygons) for efficient range queries.

Range Searching. Data structure for a set of objects (points, rectangles, polygons) for efficient range queries. Range Searching Data structure for a set of objects (oints, rectangles, olygons) for efficient range queries. Y Q Deends on tye of objects and queries. Consider basic data structures with broad alicability.

More information

Computing the Convex Hull of. W. Hochstattler, S. Kromberg, C. Moll

Computing the Convex Hull of. W. Hochstattler, S. Kromberg, C. Moll Reort No. 94.60 A new Linear Time Algorithm for Comuting the Convex Hull of a Simle Polygon in the Plane by W. Hochstattler, S. Kromberg, C. Moll 994 W. Hochstattler, S. Kromberg, C. Moll Universitat zu

More information

We will then introduce the DT, discuss some of its fundamental properties and show how to compute a DT directly from a given set of points.

We will then introduce the DT, discuss some of its fundamental properties and show how to compute a DT directly from a given set of points. Voronoi Diagram and Delaunay Triangulation 1 Introduction The Voronoi Diagram (VD, for short) is a ubiquitious structure that aears in a variety of discilines - biology, geograhy, ecology, crystallograhy,

More information

CMSC 754 Computational Geometry 1

CMSC 754 Computational Geometry 1 CMSC 754 Computational Geometry 1 David M. Mount Department of Computer Science University of Maryland Spring 2007 1 Copyright, David M. Mount, 2007, Dept. of Computer Science, University of Maryland,

More information

Constrained Empty-Rectangle Delaunay Graphs

Constrained Empty-Rectangle Delaunay Graphs CCCG 2015, Kingston, Ontario, August 10 12, 2015 Constrained Emty-Rectangle Delaunay Grahs Prosenjit Bose Jean-Lou De Carufel André van Renssen Abstract Given an arbitrary convex shae C, a set P of oints

More information

Graduate Algorithms CS F-19 Computational Geometry

Graduate Algorithms CS F-19 Computational Geometry Graduate Algorithms CS673-016F-19 Comutational Geometry David Galles Deartment of Comuter Science University of San Francisco 19-0: Cross Products Given any two oints 1 = (x 1,y 1 ) and = (x,y ) Cross

More information

CS 428: Fall Introduction to. Geometric Transformations. Andrew Nealen, Rutgers, /15/2010 1

CS 428: Fall Introduction to. Geometric Transformations. Andrew Nealen, Rutgers, /15/2010 1 CS 428: Fall 21 Introduction to Comuter Grahics Geometric Transformations Andrew Nealen, Rutgers, 21 9/15/21 1 Toic overview Image formation and OenGL (last week) Modeling the image formation rocess OenGL

More information

Source Coding and express these numbers in a binary system using M log

Source Coding and express these numbers in a binary system using M log Source Coding 30.1 Source Coding Introduction We have studied how to transmit digital bits over a radio channel. We also saw ways that we could code those bits to achieve error correction. Bandwidth is

More information

Curve Reconstruction taken from [1]

Curve Reconstruction taken from [1] Notes by Tamal K. Dey, OSU 47 Curve Reconstruction taken from [1] The simlest class of manifolds that ose nontrivial reconstruction roblems are curves in the lane. We will describe two algorithms for curve

More information

CMSC 754 Computational Geometry 1

CMSC 754 Computational Geometry 1 CMSC 754 Computational Geometry 1 David M. Mount Department of Computer Science University of Maryland Fall 2005 1 Copyright, David M. Mount, 2005, Dept. of Computer Science, University of Maryland, College

More information

Sensitivity Analysis for an Optimal Routing Policy in an Ad Hoc Wireless Network

Sensitivity Analysis for an Optimal Routing Policy in an Ad Hoc Wireless Network 1 Sensitivity Analysis for an Otimal Routing Policy in an Ad Hoc Wireless Network Tara Javidi and Demosthenis Teneketzis Deartment of Electrical Engineering and Comuter Science University of Michigan Ann

More information

GEOMETRIC CONSTRAINT SOLVING IN < 2 AND < 3. Department of Computer Sciences, Purdue University. and PAMELA J. VERMEER

GEOMETRIC CONSTRAINT SOLVING IN < 2 AND < 3. Department of Computer Sciences, Purdue University. and PAMELA J. VERMEER GEOMETRIC CONSTRAINT SOLVING IN < AND < 3 CHRISTOPH M. HOFFMANN Deartment of Comuter Sciences, Purdue University West Lafayette, Indiana 47907-1398, USA and PAMELA J. VERMEER Deartment of Comuter Sciences,

More information

CS2 Algorithms and Data Structures Note 8

CS2 Algorithms and Data Structures Note 8 CS2 Algorithms and Data Structures Note 8 Heasort and Quicksort We will see two more sorting algorithms in this lecture. The first, heasort, is very nice theoretically. It sorts an array with n items in

More information

521493S Computer Graphics Exercise 3 (Chapters 6-8)

521493S Computer Graphics Exercise 3 (Chapters 6-8) 521493S Comuter Grahics Exercise 3 (Chaters 6-8) 1 Most grahics systems and APIs use the simle lighting and reflection models that we introduced for olygon rendering Describe the ways in which each of

More information

1/60. Geometric Algorithms. Lecture 1: Introduction. Convex Hulls

1/60. Geometric Algorithms. Lecture 1: Introduction. Convex Hulls 1/60 Geometric Algorithms Lecture 1: Introduction Convex Hulls Geometric algorithms scope 2/60 Geometry algorithms (practice): Study of geometric problems that arise in various applications and how algorithms

More information

CS 532: 3D Computer Vision 14 th Set of Notes

CS 532: 3D Computer Vision 14 th Set of Notes 1 CS 532: 3D Computer Vision 14 th Set of Notes Instructor: Philippos Mordohai Webpage: www.cs.stevens.edu/~mordohai E-mail: Philippos.Mordohai@stevens.edu Office: Lieb 215 Lecture Outline Triangulating

More information

Introduction to Visualization and Computer Graphics

Introduction to Visualization and Computer Graphics Introduction to Visualization and Comuter Grahics DH2320, Fall 2015 Prof. Dr. Tino Weinkauf Introduction to Visualization and Comuter Grahics Grids and Interolation Next Tuesday No lecture next Tuesday!

More information

Lecture 3: Art Gallery Problems and Polygon Triangulation

Lecture 3: Art Gallery Problems and Polygon Triangulation EECS 396/496: Computational Geometry Fall 2017 Lecture 3: Art Gallery Problems and Polygon Triangulation Lecturer: Huck Bennett In this lecture, we study the problem of guarding an art gallery (specified

More information

The Edge-flipping Distance of Triangulations

The Edge-flipping Distance of Triangulations The Edge-fliing Distance of Triangulations Sabine Hanke (Institut für Informatik, Universität Freiburg, Germany hanke@informatik.uni-freiburg.de) Thomas Ottmann (Institut für Informatik, Universität Freiburg,

More information

Advanced Algorithms Computational Geometry Prof. Karen Daniels. Spring, 2010

Advanced Algorithms Computational Geometry Prof. Karen Daniels. Spring, 2010 UMass Lowell Computer Science 91.504 Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2010 Lecture 3 O Rourke Chapter 3: 2D Convex Hulls Thursday, 2/18/10 Chapter 3 2D Convex Hulls

More information

Computational Geometry

Computational Geometry Lecture 1: Introduction and convex hulls Geometry: points, lines,... Geometric objects Geometric relations Combinatorial complexity Computational geometry Plane (two-dimensional), R 2 Space (three-dimensional),

More information

CS2 Algorithms and Data Structures Note 8

CS2 Algorithms and Data Structures Note 8 CS2 Algorithms and Data Structures Note 8 Heasort and Quicksort We will see two more sorting algorithms in this lecture. The first, heasort, is very nice theoretically. It sorts an array with n items in

More information

Lecture 18. Today, we will discuss developing algorithms for a basic model for parallel computing the Parallel Random Access Machine (PRAM) model.

Lecture 18. Today, we will discuss developing algorithms for a basic model for parallel computing the Parallel Random Access Machine (PRAM) model. U.C. Berkeley CS273: Parallel and Distributed Theory Lecture 18 Professor Satish Rao Lecturer: Satish Rao Last revised Scribe so far: Satish Rao (following revious lecture notes quite closely. Lecture

More information

Using Rational Numbers and Parallel Computing to Efficiently Avoid Round-off Errors on Map Simplification

Using Rational Numbers and Parallel Computing to Efficiently Avoid Round-off Errors on Map Simplification Using Rational Numbers and Parallel Comuting to Efficiently Avoid Round-off Errors on Ma Simlification Maurício G. Grui 1, Salles V. G. de Magalhães 1,2, Marcus V. A. Andrade 1, W. Randolh Franklin 2,

More information

search(i): Returns an element in the data structure associated with key i

search(i): Returns an element in the data structure associated with key i CS161 Lecture 7 inary Search Trees Scribes: Ilan Goodman, Vishnu Sundaresan (2015), Date: October 17, 2017 Virginia Williams (2016), and Wilbur Yang (2016), G. Valiant Adated From Virginia Williams lecture

More information

The convex hull of a set Q of points is the smallest convex polygon P for which each point in Q is either on the boundary of P or in its interior.

The convex hull of a set Q of points is the smallest convex polygon P for which each point in Q is either on the boundary of P or in its interior. CS 312, Winter 2007 Project #1: Convex Hull Due Dates: See class schedule Overview: In this project, you will implement a divide and conquer algorithm for finding the convex hull of a set of points and

More information

Image Segmentation Using Topological Persistence

Image Segmentation Using Topological Persistence Image Segmentation Using Toological Persistence David Letscher and Jason Fritts Saint Louis University Deartment of Mathematics and Comuter Science {letscher, jfritts}@slu.edu Abstract. This aer resents

More information

AUTOMATIC GENERATION OF HIGH THROUGHPUT ENERGY EFFICIENT STREAMING ARCHITECTURES FOR ARBITRARY FIXED PERMUTATIONS. Ren Chen and Viktor K.

AUTOMATIC GENERATION OF HIGH THROUGHPUT ENERGY EFFICIENT STREAMING ARCHITECTURES FOR ARBITRARY FIXED PERMUTATIONS. Ren Chen and Viktor K. inuts er clock cycle Streaming ermutation oututs er clock cycle AUTOMATIC GENERATION OF HIGH THROUGHPUT ENERGY EFFICIENT STREAMING ARCHITECTURES FOR ARBITRARY FIXED PERMUTATIONS Ren Chen and Viktor K.

More information

Introduction to Parallel Algorithms

Introduction to Parallel Algorithms CS 1762 Fall, 2011 1 Introduction to Parallel Algorithms Introduction to Parallel Algorithms ECE 1762 Algorithms and Data Structures Fall Semester, 2011 1 Preliminaries Since the early 1990s, there has

More information

EXTREME POINTS AND AFFINE EQUIVALENCE

EXTREME POINTS AND AFFINE EQUIVALENCE EXTREME POINTS AND AFFINE EQUIVALENCE The purpose of this note is to use the notions of extreme points and affine transformations which are studied in the file affine-convex.pdf to prove that certain standard

More information

Dr Pavan Chakraborty IIIT-Allahabad

Dr Pavan Chakraborty IIIT-Allahabad GVC-43 Lecture - 5 Ref: Donald Hearn & M. Pauline Baker, Comuter Grahics Foley, van Dam, Feiner & Hughes, Comuter Grahics Princiles & Practice Dr Pavan Chakraborty IIIT-Allahabad Summary of line drawing

More information

Truth Trees. Truth Tree Fundamentals

Truth Trees. Truth Tree Fundamentals Truth Trees 1 True Tree Fundamentals 2 Testing Grous of Statements for Consistency 3 Testing Arguments in Proositional Logic 4 Proving Invalidity in Predicate Logic Answers to Selected Exercises Truth

More information

Computational Geometry: Proximity and Location

Computational Geometry: Proximity and Location 63 Comutational Geometry: Proximity and Location 63.1 Introduction Proximity and location are fundamental concets in geometric comutation. The term roximity refers informally to the uality of being close

More information

Trigonometric Functions

Trigonometric Functions Similar Right-Angled Triangles Trigonometric Functions We lan to introduce trigonometric functions as certain ratios determined by similar right-angled triangles. By de nition, two given geometric gures

More information

EE678 Application Presentation Content Based Image Retrieval Using Wavelets

EE678 Application Presentation Content Based Image Retrieval Using Wavelets EE678 Alication Presentation Content Based Image Retrieval Using Wavelets Grou Members: Megha Pandey megha@ee. iitb.ac.in 02d07006 Gaurav Boob gb@ee.iitb.ac.in 02d07008 Abstract: We focus here on an effective

More information

Space-efficient Region Filling in Raster Graphics

Space-efficient Region Filling in Raster Graphics "The Visual Comuter: An International Journal of Comuter Grahics" (submitted July 13, 1992; revised December 7, 1992; acceted in Aril 16, 1993) Sace-efficient Region Filling in Raster Grahics Dominik Henrich

More information

2 Geometry Solutions

2 Geometry Solutions 2 Geometry Solutions jacques@ucsd.edu Here is give problems and solutions in increasing order of difficulty. 2.1 Easier problems Problem 1. What is the minimum number of hyperplanar slices to make a d-dimensional

More information

Earthenware Reconstruction Based on the Shape Similarity among Potsherds

Earthenware Reconstruction Based on the Shape Similarity among Potsherds Original Paer Forma, 16, 77 90, 2001 Earthenware Reconstruction Based on the Shae Similarity among Potsherds Masayoshi KANOH 1, Shohei KATO 2 and Hidenori ITOH 1 1 Nagoya Institute of Technology, Gokiso-cho,

More information

CS649 Sensor Networks IP Track Lecture 6: Graphical Models

CS649 Sensor Networks IP Track Lecture 6: Graphical Models CS649 Sensor Networks IP Track Lecture 6: Grahical Models I-Jeng Wang htt://hinrg.cs.jhu.edu/wsn06/ Sring 2006 CS 649 1 Sring 2006 CS 649 2 Grahical Models Grahical Model: grahical reresentation of joint

More information

Equality-Based Translation Validator for LLVM

Equality-Based Translation Validator for LLVM Equality-Based Translation Validator for LLVM Michael Ste, Ross Tate, and Sorin Lerner University of California, San Diego {mste,rtate,lerner@cs.ucsd.edu Abstract. We udated our Peggy tool, reviously resented

More information

An improved algorithm for Hausdorff Voronoi diagram for non-crossing sets

An improved algorithm for Hausdorff Voronoi diagram for non-crossing sets An imroved algorithm for Hausdorff Voronoi diagram for non-crossing sets Frank Dehne, Anil Maheshwari and Ryan Taylor May 26, 2006 Abstract We resent an imroved algorithm for building a Hausdorff Voronoi

More information

10. Parallel Methods for Data Sorting

10. Parallel Methods for Data Sorting 10. Parallel Methods for Data Sorting 10. Parallel Methods for Data Sorting... 1 10.1. Parallelizing Princiles... 10.. Scaling Parallel Comutations... 10.3. Bubble Sort...3 10.3.1. Sequential Algorithm...3

More information

IMS Network Deployment Cost Optimization Based on Flow-Based Traffic Model

IMS Network Deployment Cost Optimization Based on Flow-Based Traffic Model IMS Network Deloyment Cost Otimization Based on Flow-Based Traffic Model Jie Xiao, Changcheng Huang and James Yan Deartment of Systems and Comuter Engineering, Carleton University, Ottawa, Canada {jiexiao,

More information

Recognizing Convex Polygons with Few Finger Probes

Recognizing Convex Polygons with Few Finger Probes Pattern Analysis and Alications manuscrit No. (will be inserted by the editor) Recognizing Convex Polygons with Few Finger Probes Sumanta Guha Kiêu Trọng Khánh Received: date / Acceted: date Abstract The

More information

The Spatial Skyline Queries

The Spatial Skyline Queries Coffee sho The Satial Skyline Queries Mehdi Sharifzadeh and Cyrus Shahabi VLDB 006 Presented by Ali Khodaei Coffee sho Three friends Coffee sho Three friends Don t choose this lace is closer to each three

More information

A Novel Iris Segmentation Method for Hand-Held Capture Device

A Novel Iris Segmentation Method for Hand-Held Capture Device A Novel Iris Segmentation Method for Hand-Held Cature Device XiaoFu He and PengFei Shi Institute of Image Processing and Pattern Recognition, Shanghai Jiao Tong University, Shanghai 200030, China {xfhe,

More information

Grouping of Patches in Progressive Radiosity

Grouping of Patches in Progressive Radiosity Grouing of Patches in Progressive Radiosity Arjan J.F. Kok * Abstract The radiosity method can be imroved by (adatively) grouing small neighboring atches into grous. Comutations normally done for searate

More information

Deformable Free Space Tilings for Kinetic Collision Detection

Deformable Free Space Tilings for Kinetic Collision Detection Deformable Free Sace Tilings for Kinetic Collision Detection Pankaj K. Agarwal Julien Basch Leonidas J. Guibas John Hershberger Li Zhang Abstract We resent kinetic data structures for detecting collisions

More information

Clipping. Administrative. Assignment 1 Gallery. Questions about previous lectures? Overview of graphics pipeline? Assignment 2

Clipping. Administrative. Assignment 1 Gallery. Questions about previous lectures? Overview of graphics pipeline? Assignment 2 Cliing MIT EECS 6.837 Frédo Durand and Seth Teller Some slides and images courtesy of Leonard McMillan MIT EECS 6.837, Teller and Durand 1 MIT EECS 6.837, Teller and Durand 2 Administrative Assignment

More information

Computational Geometry Overview from Cormen, et al.

Computational Geometry Overview from Cormen, et al. UMass Lowell Computer Science 91.503 Graduate Algorithms Prof. Karen Daniels Spring, 2014 Computational Geometry Overview from Cormen, et al. Chapter 33 (with additional material from other sources) 1

More information

UPDATING ALGORITHMS FOR CONSTRAINT DELAUNAY TIN

UPDATING ALGORITHMS FOR CONSTRAINT DELAUNAY TIN UPDATING ALGORITMS FOR CONSTRAINT DELAUNAY TIN WU LiXin a,b WANG YanBing a, c a Institute for GIS/RS/GPS & Subsidence Engineering Research, China Uni Mining & Technology, Beijing, China, 100083 - awulixin@263.net,

More information

An Efficient Video Program Delivery algorithm in Tree Networks*

An Efficient Video Program Delivery algorithm in Tree Networks* 3rd International Symosium on Parallel Architectures, Algorithms and Programming An Efficient Video Program Delivery algorithm in Tree Networks* Fenghang Yin 1 Hong Shen 1,2,** 1 Deartment of Comuter Science,

More information

Efficient Parallel Hierarchical Clustering

Efficient Parallel Hierarchical Clustering Efficient Parallel Hierarchical Clustering Manoranjan Dash 1,SimonaPetrutiu, and Peter Scheuermann 1 Deartment of Information Systems, School of Comuter Engineering, Nanyang Technological University, Singaore

More information

CMSC 754 Computational Geometry 1

CMSC 754 Computational Geometry 1 CMSC 754 Computational Geometry 1 David M. Mount Department of Computer Science University of Maryland Fall 2016 1 Copyright, David M. Mount, 2016, Dept. of Computer Science, University of Maryland, College

More information

AUTOMATIC EXTRACTION OF BUILDING OUTLINE FROM HIGH RESOLUTION AERIAL IMAGERY

AUTOMATIC EXTRACTION OF BUILDING OUTLINE FROM HIGH RESOLUTION AERIAL IMAGERY AUTOMATIC EXTRACTION OF BUILDING OUTLINE FROM HIGH RESOLUTION AERIAL IMAGERY Yandong Wang EagleView Technology Cor. 5 Methodist Hill Dr., Rochester, NY 1463, the United States yandong.wang@ictometry.com

More information

Computational Geometry. Geometry Cross Product Convex Hull Problem Sweep Line Algorithm

Computational Geometry. Geometry Cross Product Convex Hull Problem Sweep Line Algorithm GEOMETRY COMP 321 McGill University These slides are mainly compiled from the following resources. - Professor Jaehyun Park slides CS 97SI - Top-coder tutorials. - Programming Challenges books. Computational

More information

CSE4421/5324: Introduction to Robotics

CSE4421/5324: Introduction to Robotics CSE442/5324: Introduction to Robotics Contact Information Burton Ma Lassonde 246 burton@cse.yorku.ca EECS442/5324 lectures Monday, Wednesday, Friday :3-2:3PM (SLH C) Lab Thursday 2:3-2:3, Prism 4 Lab 2

More information

level 0 level 1 level 2 level 3

level 0 level 1 level 2 level 3 Communication-Ecient Deterministic Parallel Algorithms for Planar Point Location and 2d Voronoi Diagram? Mohamadou Diallo 1, Afonso Ferreira 2 and Andrew Rau-Chalin 3 1 LIMOS, IFMA, Camus des C zeaux,

More information

Extracting Optimal Paths from Roadmaps for Motion Planning

Extracting Optimal Paths from Roadmaps for Motion Planning Extracting Otimal Paths from Roadmas for Motion Planning Jinsuck Kim Roger A. Pearce Nancy M. Amato Deartment of Comuter Science Texas A&M University College Station, TX 843 jinsuckk,ra231,amato @cs.tamu.edu

More information

Planar Graphs. 1 Graphs and maps. 1.1 Planarity and duality

Planar Graphs. 1 Graphs and maps. 1.1 Planarity and duality Planar Graphs In the first half of this book, we consider mostly planar graphs and their geometric representations, mostly in the plane. We start with a survey of basic results on planar graphs. This chapter

More information

Stereo Disparity Estimation in Moment Space

Stereo Disparity Estimation in Moment Space Stereo Disarity Estimation in oment Sace Angeline Pang Faculty of Information Technology, ultimedia University, 63 Cyberjaya, alaysia. angeline.ang@mmu.edu.my R. ukundan Deartment of Comuter Science, University

More information

Privacy Preserving Moving KNN Queries

Privacy Preserving Moving KNN Queries Privacy Preserving Moving KNN Queries arxiv:4.76v [cs.db] 4 Ar Tanzima Hashem Lars Kulik Rui Zhang National ICT Australia, Deartment of Comuter Science and Software Engineering University of Melbourne,

More information

Patterned Wafer Segmentation

Patterned Wafer Segmentation atterned Wafer Segmentation ierrick Bourgeat ab, Fabrice Meriaudeau b, Kenneth W. Tobin a, atrick Gorria b a Oak Ridge National Laboratory,.O.Box 2008, Oak Ridge, TN 37831-6011, USA b Le2i Laboratory Univ.of

More information

Lecture 7: Objects (Chapter 15) CS 1110 Introduction to Computing Using Python

Lecture 7: Objects (Chapter 15) CS 1110 Introduction to Computing Using Python htt://www.cs.cornell.edu/courses/cs1110/2018s Lecture 7: Objects (Chater 15) CS 1110 Introduction to Comuting Using Python [E. Andersen, A. Bracy, D. Gries, L. Lee, S. Marschner, C. Van Loan, W. White]

More information

CSE 5311 Notes 13: Computational Geometry

CSE 5311 Notes 13: Computational Geometry CSE 5311 Notes 13: Computational Geometry (Last updated 4/17/17 4:39 PM) SMALLEST ENCLOSING DISK See section 4.7 of de Berg ( http://dx.doi.org.ezproxy.uta.edu/10.1007/978-3-540-77974-2 ) Algorithm MINIDISC(P)

More information

Chapter 3: Graphics Output Primitives. OpenGL Line Functions. OpenGL Point Functions. Line Drawing Algorithms

Chapter 3: Graphics Output Primitives. OpenGL Line Functions. OpenGL Point Functions. Line Drawing Algorithms Chater : Grahics Outut Primitives Primitives: functions in grahics acage that we use to describe icture element Points and straight lines are the simlest rimitives Some acages include circles, conic sections,

More information

Preferred directions for resolving the non-uniqueness of Delaunay triangulations

Preferred directions for resolving the non-uniqueness of Delaunay triangulations Preferred directions for resolving the non-uniqueness of Delaunay triangulations Christopher Dyken and Michael S. Floater Abstract: This note proposes a simple rule to determine a unique triangulation

More information

Ad Hoc Networks. Latency-minimizing data aggregation in wireless sensor networks under physical interference model

Ad Hoc Networks. Latency-minimizing data aggregation in wireless sensor networks under physical interference model Ad Hoc Networks (4) 5 68 Contents lists available at SciVerse ScienceDirect Ad Hoc Networks journal homeage: www.elsevier.com/locate/adhoc Latency-minimizing data aggregation in wireless sensor networks

More information

Convex Hull Algorithms

Convex Hull Algorithms Convex Hull Algorithms Design and Analysis of Algorithms prof. F. Malucelli Villa Andrea e Ceriani Simone Outline Problem Definition Basic Concepts Bruteforce Algorithm Graham Scan Algorithm Divide and

More information

Lecture 2 September 3

Lecture 2 September 3 EE 381V: Large Scale Optimization Fall 2012 Lecture 2 September 3 Lecturer: Caramanis & Sanghavi Scribe: Hongbo Si, Qiaoyang Ye 2.1 Overview of the last Lecture The focus of the last lecture was to give

More information

Polygon Triangulation

Polygon Triangulation Polygon Triangulation Definition Simple Polygons 1. A polygon is the region of a plane bounded by a finite collection of line segments forming a simple closed curve. 2. Simple closed curve means a certain

More information

PREDICTING LINKS IN LARGE COAUTHORSHIP NETWORKS

PREDICTING LINKS IN LARGE COAUTHORSHIP NETWORKS PREDICTING LINKS IN LARGE COAUTHORSHIP NETWORKS Kevin Miller, Vivian Lin, and Rui Zhang Grou ID: 5 1. INTRODUCTION The roblem we are trying to solve is redicting future links or recovering missing links

More information

Learning Motion Patterns in Crowded Scenes Using Motion Flow Field

Learning Motion Patterns in Crowded Scenes Using Motion Flow Field Learning Motion Patterns in Crowded Scenes Using Motion Flow Field Min Hu, Saad Ali and Mubarak Shah Comuter Vision Lab, University of Central Florida {mhu,sali,shah}@eecs.ucf.edu Abstract Learning tyical

More information

Collective communication: theory, practice, and experience

Collective communication: theory, practice, and experience CONCURRENCY AND COMPUTATION: PRACTICE AND EXPERIENCE Concurrency Comutat.: Pract. Exer. 2007; 19:1749 1783 Published online 5 July 2007 in Wiley InterScience (www.interscience.wiley.com)..1206 Collective

More information

OMNI: An Efficient Overlay Multicast. Infrastructure for Real-time Applications

OMNI: An Efficient Overlay Multicast. Infrastructure for Real-time Applications OMNI: An Efficient Overlay Multicast Infrastructure for Real-time Alications Suman Banerjee, Christoher Kommareddy, Koushik Kar, Bobby Bhattacharjee, Samir Khuller Abstract We consider an overlay architecture

More information

Computational Geometry Algorithmische Geometrie

Computational Geometry Algorithmische Geometrie Algorithmische Geometrie Panos Giannopoulos Wolfgang Mulzer Lena Schlipf AG TI SS 2013 !! Register in Campus Management!! Outline What you need to know (before taking this course) What is the course about?

More information

Efficient Processing of Top-k Dominating Queries on Multi-Dimensional Data

Efficient Processing of Top-k Dominating Queries on Multi-Dimensional Data Efficient Processing of To-k Dominating Queries on Multi-Dimensional Data Man Lung Yiu Deartment of Comuter Science Aalborg University DK-922 Aalborg, Denmark mly@cs.aau.dk Nikos Mamoulis Deartment of

More information

Triangulation and Convex Hull. 8th November 2018

Triangulation and Convex Hull. 8th November 2018 Triangulation and Convex Hull 8th November 2018 Agenda 1. Triangulation. No book, the slides are the curriculum 2. Finding the convex hull. Textbook, 8.6.2 2 Triangulation and terrain models Here we have

More information

Folded Structures Satisfying Multiple Conditions

Folded Structures Satisfying Multiple Conditions Journal of Information Processing Vol.5 No.4 1 10 (Oct. 017) [DOI: 1197/isjji.5.1] Regular Paer Folded Structures Satisfying Multile Conditions Erik D. Demaine 1,a) Jason S. Ku 1,b) Received: November

More information

Notes and Answers to Homework Exam 1, Geometric Algorithms, 2017

Notes and Answers to Homework Exam 1, Geometric Algorithms, 2017 Notes and Answers to Homework Exam 1, Geometric Algorithms, 2017 Below are some notes and sketches of correct answers for the first homework exam. We have also included the most common mistakes that were

More information

Lecture 16: Voronoi Diagrams and Fortune s Algorithm

Lecture 16: Voronoi Diagrams and Fortune s Algorithm contains q changes as a result of the ith insertion. Let P i denote this probability (where the probability is taken over random insertion orders, irrespective of the choice of q). Since q could fall through

More information

Distributed Estimation from Relative Measurements in Sensor Networks

Distributed Estimation from Relative Measurements in Sensor Networks Distributed Estimation from Relative Measurements in Sensor Networks #Prabir Barooah and João P. Hesanha Abstract We consider the roblem of estimating vectorvalued variables from noisy relative measurements.

More information

Source-to-Source Code Generation Based on Pattern Matching and Dynamic Programming

Source-to-Source Code Generation Based on Pattern Matching and Dynamic Programming Source-to-Source Code Generation Based on Pattern Matching and Dynamic Programming Weimin Chen, Volker Turau TR-93-047 August, 1993 Abstract This aer introduces a new technique for source-to-source code

More information

Complexity Issues on Designing Tridiagonal Solvers on 2-Dimensional Mesh Interconnection Networks

Complexity Issues on Designing Tridiagonal Solvers on 2-Dimensional Mesh Interconnection Networks Journal of Comuting and Information Technology - CIT 8, 2000, 1, 1 12 1 Comlexity Issues on Designing Tridiagonal Solvers on 2-Dimensional Mesh Interconnection Networks Eunice E. Santos Deartment of Electrical

More information

Lecture 7: Computational Geometry

Lecture 7: Computational Geometry Lecture 7: Computational Geometry CS 491 CAP Uttam Thakore Friday, October 7 th, 2016 Credit for many of the slides on solving geometry problems goes to the Stanford CS 97SI course lecture on computational

More information

Taut ideal triangulations of 3-manifolds

Taut ideal triangulations of 3-manifolds Abstract Taut ideal triangulations of 3-manifolds Marc Lackenby Mathematical Institute, Oxford University, 24-29 St Giles, Oxford OX1 3LB, UK Email: lackenby@maths.ox.ac.uk A taut ideal triangulation of

More information

Directed File Transfer Scheduling

Directed File Transfer Scheduling Directed File Transfer Scheduling Weizhen Mao Deartment of Comuter Science The College of William and Mary Williamsburg, Virginia 387-8795 wm@cs.wm.edu Abstract The file transfer scheduling roblem was

More information

Collective Communication: Theory, Practice, and Experience. FLAME Working Note #22

Collective Communication: Theory, Practice, and Experience. FLAME Working Note #22 Collective Communication: Theory, Practice, and Exerience FLAME Working Note # Ernie Chan Marcel Heimlich Avi Purkayastha Robert van de Geijn Setember, 6 Abstract We discuss the design and high-erformance

More information

The Helly Number of the Prime-coordinate Point Set

The Helly Number of the Prime-coordinate Point Set The Helly Number of the Prime-coordinate Point Set By KEVIN BARRETT SUMMERS SENIOR THESIS Submitted in partial satisfaction of the requirements for Highest Honors for the degree of BACHELOR OF SCIENCE

More information