263 research outputs found

    Algorithms for Subpath Convex Hull Queries and Ray-Shooting Among Segments

    Get PDF
    In this paper, we first consider the subpath convex hull query problem: Given a simple path ? of n vertices, preprocess it so that the convex hull of any query subpath of ? can be quickly obtained. Previously, Guibas, Hershberger, and Snoeyink [SODA 90\u27] proposed a data structure of O(n) space and O(log n log log n) query time; reducing the query time to O(log n) increases the space to O(nlog log n). We present an improved result that uses O(n) space while achieving O(log n) query time. Like the previous work, our query algorithm returns a compact interval tree representing the convex hull so that standard binary-search-based queries on the hull can be performed in O(log n) time each. Our new result leads to improvements for several other problems. In particular, with the help of the above result, we present new algorithms for the ray-shooting problem among segments. Given a set of n (possibly intersecting) line segments in the plane, preprocess it so that the first segment hit by a query ray can be quickly found. We give a data structure of O(n log n) space that can answer each query in (?n log n) time. If the segments are nonintersecting or if the segments are lines, then the space can be reduced to O(n). All these are classical problems that have been studied extensively. Previously data structures of O?(?n) query time were known in early 1990s; nearly no progress has been made for over two decades. For all problems, our results provide improvements by reducing the space of the data structures by at least a logarithmic factor while the preprocessing and query times are the same as before or even better

    Pattern Matching for sets of segments

    Full text link
    In this paper we present algorithms for a number of problems in geometric pattern matching where the input consist of a collections of segments in the plane. Our work consists of two main parts. In the first, we address problems and measures that relate to collections of orthogonal line segments in the plane. Such collections arise naturally from problems in mapping buildings and robot exploration. We propose a new measure of segment similarity called a \emph{coverage measure}, and present efficient algorithms for maximising this measure between sets of axis-parallel segments under translations. Our algorithms run in time O(n^3\polylog n) in the general case, and run in time O(n^2\polylog n) for the case when all segments are horizontal. In addition, we show that when restricted to translations that are only vertical, the Hausdorff distance between two sets of horizontal segments can be computed in time roughly O(n^{3/2}{\sl polylog}n). These algorithms form significant improvements over the general algorithm of Chew et al. that takes time O(n4log⁥2n)O(n^4 \log^2 n). In the second part of this paper we address the problem of matching polygonal chains. We study the well known \Frd, and present the first algorithm for computing the \Frd under general translations. Our methods also yield algorithms for computing a generalization of the \Fr distance, and we also present a simple approximation algorithm for the \Frd that runs in time O(n^2\polylog n).Comment: To appear in the 12 ACM Symposium on Discrete Algorithms, Jan 200

    Threadable Curves

    Get PDF
    We define a plane curve to be threadable if it can rigidly pass through a point-hole in a line L without otherwise touching L. Threadable curves are in a sense generalizations of monotone curves. We have two main results. The first is a linear-time algorithm for deciding whether a polygonal curve is threadable---O(n) for a curve of n vertices---and if threadable, finding a sequence of rigid motions to thread it through a hole. We also sketch an argument that shows that the threadability of algebraic curves can be decided in time polynomial in the degree of the curve. The second main result is an O(n polylog n)-time algorithm for deciding whether a 3D polygonal curve can thread through hole in a plane in R^3, and if so, providing a description of the rigid motions that achieve the threading.Comment: 16 pages, 12 figures, 12 references. v2: Revised with brief addendum after Mikkel Abrahamsen pointed us to a relevant reference on "sweepable polygons." v3: Major revisio

    New results on stabbing segments with a polygon

    Get PDF
    We consider a natural variation of the concept of stabbing a set of segments with a simple polygon: a segment s is stabbed by a simple polygon P if at least one endpoint of s is contained in P, and a segment set S is stabbed by P if P stabs every element of S. Given a segment set S, we study the problem of finding a simple polygon P stabbing S in a way that some measure of P (such as area or perimeter) is optimized. We show that if the elements of S are pairwise disjoint, the problem can be solved in polynomial time. In particular, this solves an open problem posed by Loftier and van Kreveld [Algorithmica 56(2), 236-269 (2010)] [16] about finding a maximum perimeter convex hull for a set of imprecise points modeled as line segments. Our algorithm can also be extended to work for a more general problem, in which instead of segments, the set S consists of a collection of point sets with pairwise disjoint convex hulls. We also prove that for general segments our stabbing problem is NP-hard. (C) 2014 Elsevier B.V. All rights reserved.Peer ReviewedPostprint (author's final draft

    Improved time-space trade-offs for computing Voronoi diagrams

    Get PDF
    Let P be a planar set of n sites in general position. For k∈{1,
,n−1}, the Voronoi diagram of order k for P is obtained by subdividing the plane into cells such that points in the same cell have the same set of nearest k neighbors in P. The (nearest site) Voronoi diagram (NVD) and the farthest site Voronoi diagram (FVD) are the particular cases of k=1 and k=n−1, respectively. For any given K∈{1,
,n−1}, the family of all higher-order Voronoi diagrams of order k=1,
,K for P can be computed in total time O(nK2+nlogn) using O(K2(n−K)) space [Aggarwal et al., DCG'89; Lee, TC'82]. Moreover, NVD and FVD for P can be computed in O(nlogn) time using O(n) space [Preparata, Shamos, Springer'85]. For s∈{1,
,n} , an s-workspace algorithm has random access to a read-only array with the sites of P in arbitrary order. Additionally, the algorithm may use O(s) words, of Θ(logn) bits each, for reading and writing intermediate data. The output can be written only once and cannot be accessed or modified afterwards. We describe a deterministic s -workspace algorithm for computing NVD and FVD for P that runs in O((n2/s)logs) time. Moreover, we generalize our s-workspace algorithm so that for any given K∈O(s√), we compute the family of all higher-order Voronoi diagrams of order k=1,
,K for P in total expected time O(n2K5s(logs+K2O(log∗K))) or in total deterministic time O(n2K5s(logs+KlogK)). Previously, for Voronoi diagrams, the only known s-workspace algorithm runs in expected time O((n2/s)logs+nlogslog∗s) [Korman et al., WADS'15] and only works for NVD (i.e., k=1). Unlike the previous algorithm, our new method is very simple and does not rely on advanced data structures or random sampling techniques

    Bounds on the maximum multiplicity of some common geometric graphs

    Get PDF
    We obtain new lower and upper bounds for the maximum multiplicity of some weighted and, respectively, non-weighted common geometric graphs drawn on n points in the plane in general position (with no three points collinear): perfect matchings, spanning trees, spanning cycles (tours), and triangulations. (i) We present a new lower bound construction for the maximum number of triangulations a set of n points in general position can have. In particular, we show that a generalized double chain formed by two almost convex chains admits {\Omega}(8.65^n) different triangulations. This improves the bound {\Omega}(8.48^n) achieved by the double zig-zag chain configuration studied by Aichholzer et al. (ii) We present a new lower bound of {\Omega}(12.00^n) for the number of non-crossing spanning trees of the double chain composed of two convex chains. The previous bound, {\Omega}(10.42^n), stood unchanged for more than 10 years. (iii) Using a recent upper bound of 30^n for the number of triangulations, due to Sharir and Sheffer, we show that n points in the plane in general position admit at most O(68.62^n) non-crossing spanning cycles. (iv) We derive lower bounds for the number of maximum and minimum weighted geometric graphs (matchings, spanning trees, and tours). We show that the number of shortest non-crossing tours can be exponential in n. Likewise, we show that both the number of longest non-crossing tours and the number of longest non-crossing perfect matchings can be exponential in n. Moreover, we show that there are sets of n points in convex position with an exponential number of longest non-crossing spanning trees. For points in convex position we obtain tight bounds for the number of longest and shortest tours. We give a combinatorial characterization of the longest tours, which leads to an O(nlog n) time algorithm for computing them

    Space-Time Trade-offs for Stack-Based Algorithms

    Get PDF
    In memory-constrained algorithms we have read-only access to the input, and the number of additional variables is limited. In this paper we introduce the compressed stack technique, a method that allows to transform algorithms whose space bottleneck is a stack into memory-constrained algorithms. Given an algorithm \alg\ that runs in O(n) time using Θ(n)\Theta(n) variables, we can modify it so that it runs in O(n2/s)O(n^2/s) time using a workspace of O(s) variables (for any s∈o(log⁥n)s\in o(\log n)) or O(nlog⁥n/log⁥p)O(n\log n/\log p) time using O(plog⁥n/log⁥p)O(p\log n/\log p) variables (for any 2≀p≀n2\leq p\leq n). We also show how the technique can be applied to solve various geometric problems, namely computing the convex hull of a simple polygon, a triangulation of a monotone polygon, the shortest path between two points inside a monotone polygon, 1-dimensional pyramid approximation of a 1-dimensional vector, and the visibility profile of a point inside a simple polygon. Our approach exceeds or matches the best-known results for these problems in constant-workspace models (when they exist), and gives the first trade-off between the size of the workspace and running time. To the best of our knowledge, this is the first general framework for obtaining memory-constrained algorithms
    • 

    corecore