1 Schematization of Networks Rida Sadek. 2 This talk discusses: An algorithm that is studied in the following papers:  S. Cabello, M. de Berg, and M.

Slides:



Advertisements
Similar presentations
Chapter 5: Tree Constructions
Advertisements

Two Segments Intersect?
Polygon Triangulation
Lower Bound for Sparse Euclidean Spanners Presented by- Deepak Kumar Gupta(Y6154), Nandan Kumar Dubey(Y6279), Vishal Agrawal(Y6541)
Walks, Paths and Circuits Walks, Paths and Circuits Sanjay Jain, Lecturer, School of Computing.
Divide and Conquer. Subject Series-Parallel Digraphs Planarity testing.
Efficient access to TIN Regular square grid TIN Efficient access to TIN Let q := (x, y) be a point. We want to estimate an elevation at a point q: 1. should.
Planar Orientations Chapter 4 ( ) in the book Written By: Tomer Heber.
Map Overlay Algorithm. Birch forest Wolves Map 1: Vegetation Map 2: Animals.
Introduction to Graphs
Approximations of points and polygonal chains
Dynamic Planar Convex Hull Operations in Near- Logarithmic Amortized Time TIMOTHY M. CHAN.
2/14/13CMPS 3120 Computational Geometry1 CMPS 3120: Computational Geometry Spring 2013 Planar Subdivisions and Point Location Carola Wenk Based on: Computational.
Greedy Algorithms Greed is good. (Some of the time)
Determinization of Büchi Automata
Brute-Force Triangulation
2/3/15CMPS 3130/6130 Computational Geometry1 CMPS 3130/6130 Computational Geometry Spring 2015 Triangulations and Guarding Art Galleries II Carola Wenk.
One of the most important problems is Computational Geometry is to find an efficient way to decide, given a subdivision of E n and a point P, in which.
UNC Chapel Hill M. C. Lin Polygon Triangulation Chapter 3 of the Textbook Driving Applications –Guarding an Art Gallery –3D Morphing.
1 Voronoi Diagrams. 2 Voronoi Diagram Input: A set of points locations (sites) in the plane.Input: A set of points locations (sites) in the plane. Output:
By Groysman Maxim. Let S be a set of sites in the plane. Each point in the plane is influenced by each point of S. We would like to decompose the plane.
1 Constructing Convex 3-Polytopes From Two Triangulations of a Polygon Benjamin Marlin Dept. of Mathematics & Statistics McGill University Godfried Toussaint.
Computing the Fréchet Distance Between Folded Polygons
Zoo-Keeper’s Problem An O(nlogn) algorithm for the zoo-keeper’s problem Sergei Bespamyatnikh Computational Geometry 24 (2003), pp th CGC Workshop.
9/5/06CS 6463: AT Computational Geometry1 CS 6463: AT Computational Geometry Fall 2006 Plane Sweep Algorithms and Segment Intersection Carola Wenk.
Robert Pless, CS 546: Computational Geometry Lecture #3 Last Time: Convex Hulls Today: Plane Sweep Algorithms, Segment Intersection, + (Element Uniqueness,
17. Computational Geometry Chapter 7 Voronoi Diagrams.
Rajat K. Pal. Chapter 3 Emran Chowdhury # P Presented by.
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
Point Location Computational Geometry, WS 2007/08 Lecture 5 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät für.
Roadmap Methods How do I get there? Visibility Graph Voronoid Diagram.
Computing the Delaunay Triangulation By Nacha Chavez Math 870 Computational Geometry; Ch.9; de Berg, van Kreveld, Overmars, Schwarzkopf By Nacha Chavez.
Chapter 4: Straight Line Drawing Ronald Kieft. Contents Introduction Algorithm 1: Shift Method Algorithm 2: Realizer Method Other parts of chapter 4 Questions?
Lecture 6: Point Location Computational Geometry Prof. Dr. Th. Ottmann 1 Point Location 1.Trapezoidal decomposition. 2.A search structure. 3.Randomized,
Voronoi Diagrams.
1 Separator Theorems for Planar Graphs Presented by Shira Zucker.
Phylogenetic Networks of SNPs with Constrained Recombination D. Gusfield, S. Eddhu, C. Langley.
Roadmap Methods How do I get there? Visibility Graph Voronoid Diagram.
Important Problem Types and Fundamental Data Structures
Brute-Force Triangulation
Let G be a pseudograph with vertex set V, edge set E, and incidence mapping f. Let n be a positive integer. A path of length n between vertex v and vertex.
9/7/06CS 6463: AT Computational Geometry1 CS 6463: AT Computational Geometry Fall 2006 Triangulations and Guarding Art Galleries Carola Wenk.
UNC Chapel Hill M. C. Lin Point Location Reading: Chapter 6 of the Textbook Driving Applications –Knowing Where You Are in GIS Related Applications –Triangulation.
“On an Algorithm of Zemlyachenko for Subtree Isomorphism” Yefim Dinitz, Alon Itai, Michael Rodeh (1998) Presented by: Masha Igra, Merav Bukra.
UNC Chapel Hill M. C. Lin Line Segment Intersection Chapter 2 of the Textbook Driving Applications –Map overlap problems –3D Polyhedral Morphing.
Center for Graphics and Geometric Computing, Technion 1 Computational Geometry Chapter 8 Arrangements and Duality.
How to Cut Pseudoparabolas into Segments Seminar on Geometric Incidences By: Almog Freizeit.
Center for Graphics and Geometric Computing, Technion 1 Computational Geometry Chapter 8 Arrangements and Duality.
Lecture 11 Algorithm Analysis Arne Kutzner Hanyang University / Seoul Korea.
CMPS 3130/6130 Computational Geometry Spring 2015
Introduction to Graphs. This Lecture In this part we will study some basic graph theory. Graph is a useful concept to model many problems in computer.
February 17, 2005Lecture 6: Point Location Point Location (most slides by Sergi Elizalde and David Pritchard)
Great Theoretical Ideas in Computer Science for Some.
9/8/10CS 6463: AT Computational Geometry1 CS 6463: AT Computational Geometry Fall 2010 Triangulations and Guarding Art Galleries Carola Wenk.
Center for Graphics and Geometric Computing, Technion 1 Computational Geometry Chapter 9 Line Arrangements.
Polygon Triangulation
UNC Chapel Hill M. C. Lin Geometric Data Structures Reading: Chapter 10 of the Textbook Driving Applications –Windowing Queries Related Application –Query.
CMPS 3130/6130 Computational Geometry Spring 2017
3. Polygon Triangulation
How do I get there? Roadmap Methods Visibility Graph Voronoid Diagram.
Computational Geometry
Geometric Data Structures
Graph Theory CSRU1400, Fall 2007 Ellen Zhang.
CMPS 3130/6130 Computational Geometry Spring 2017
Planarity Testing.
Computational Geometry Capter:1-2.1
Instructor: Shengyu Zhang
2IMG15 Algorithms for Geographic Data
Computational Geometry
GRAPHS Lecture 17 CS2110 Spring 2018.
Presentation transcript:

1 Schematization of Networks Rida Sadek

2 This talk discusses: An algorithm that is studied in the following papers:  S. Cabello, M. de Berg, and M. van Kreveld. Schematization of networks. Computational Geometry: Theory and Applications 30: 223–238 (2005).

3 Overview Introduction Algorithm sketch Definitions and concepts needed Details of each part of the algorithm When does the algorithm fails?

4 Introduction We have: railroad or highway map (a network map) We want: A schematized version of that map a) Nodes and connections to be displayed in a highly simplified form. b) Preserve the approximate layout of the map  Preserve recognizability for readers.

5 Introduction Simplification is achieved by displaying the paths as a 2-link or 3-link paths AND links are restricted to certain orientations Preserving recognizability is achieved by having the output map EQUIVALENT to the input map.

6 Algorithm Input and Output Input: A planar embedding of a graph consisting of polygonal paths between specified points called endpoints. Output: Another planar embedding where all endpoints have the same positions AND every path is either a 2-link or 3-link path where links are restricted to certain orientations.

7 Algorithm Sketch 1) Extract connections from original map and ORDER them top to bottom in a list. 2) Remove connections from original map but keep endpoints. 3) Place connections:  one by one from top to bottom leaving as much space as possible for later  Each newly placed connection must be of the desired shape and below the previously placed connections

8 Terminology  A path is a continuous mapping c: [0,1]  R 2  Let |c| denotes the complexity of the path c  the number of edges it has.  A (polygonal) map M is a set of simple polygonal paths {c 1, …, c m } such that two paths do not intersect except at shared endpoints.  A monotone map is a map where all paths are x- monotone.  We denote by P M the set of endpoints {c(0), c(1) | c Є M}

9 Definitions and Concepts Equivalence: (intuitively) 2 maps are equivalent if all paths can be transformed from one map to the other in a continuous way, fixing the endpoints and without crossing any “important points”.  Important points of a path c are the endpoints of the other paths.  Algorithm can be adapted to take additional “important points”. In terms of the algorithm, the algorithm should keep the face structure on both embeddings (input and output)  The cyclic order of paths around endpoints is maintained.

10 Definitions and Concepts Equivalence: (formally) Given a set of points P, two paths c and c’ with the same endpoints are equivalent in (R 2 \ P) if and only if there exists a continuous function F : [0,1] x [0,1]  R 2 \ P (minus P because the deformation of the path should not cross any point in P) such that:  F(0,t) = c(t) and F(1,t) = c’(t), for all t Є [0,1] (the first path is c, the final path is c’),  F(s,0) = c(0) = c’(0) and F(s,1) = c(1) = c’(1), for all sЄ[0,1] (the endpoints are fixed). Two maps M = {c 1,…,c m } and M’ = {c’ 1,…,c’ m } are equivalent maps iff for some renumbering of the paths in M’, paths c i and c’ i are equivalent in (R 2 \P M )U {c i (0), c i (1)} for all paths c i Є M

11 Definitions and Concepts Above-Below relation among paths:  Let c be a path. A point p Є R 2 with p not on c is above (below) c if for every equivalent path c’ in R 2 \ {p} the intersection of l p - (respectively l p + ) and c’ is nonempty. A path c i is above c j if c i (0) or c i (1) (one of the endpoints) is above c j, or if c j (0) or c j (1) is below c i.

12 Definitions and Concepts Lemma 1: The above-below relation among paths is an invariant between equivalent maps  Proof: For any point p in R 2, equivalent paths in R 2 \{p} have the same relation with respect to the point p. Let M and M’ be equivalent maps. And for every c i Є M, let c’ i Є M’ be its corresponding path. Since c i and c’ i are equivalent in (R 2 \ P M ) U {c i (0), c i (1)} (with respect to the endpoints of the paths without their own.)  for any endpoint p Є (P M \ {c i (0), c i (1)}) c i and c’ i are also equivalent with respect to p.  Any endpoint other than the endpoints of c i have the same above-below relationship with c i and c’ i.  the Lemma.

13 Canonical Sequence It is the “thing” that will help us to algorithmically compute the above-below relation and equivalence among paths.

14 Canonical Sequence(contd) Let P be a set of points Let l p - and l p + be the vertical rays for all points pЄP For a given path c:  Start walking from c(0)  Write the sequence of rays that are being crossed  Stop walking at c(1) Repeatedly remove adjacent rays that are identical Result is the canonical sequence of path c with respect to the set of points P

15 Canonical Sequence (contd) If P is only one point p Then:  Any path c’ equivalent to c with respect to P has to cross the rays l p + or l p - that appear in the canonical sequence of c with respect to {p}.   a point p is below a path c iff l p + appear in the canonical sequence of c with respect to {p}.

16 Canonical Sequence (contd) Lemma 2: Two paths with the same endpoints have the same canonical sequence with respect to P if and only if they are equivalent in R 2 \P.  Proof: This Lemma is proofed using the concept of universal cover in a paper titled “Testing Homotopy (equivalence in our terms) for Paths in the Plane”.

17 Above-Below Relations in Monotone Maps The same definition we gave before using the monotonicity becomes:  x-monotone path a is above x-monotone path b iff there are points (x,y a ) Є a and (x,y b ) Є b with y a >y b.

18 Above-Below Relations in Monotone Maps (contd) Facts for a monotone map M:  The above-below relation among paths is acyclic. If a is above b and b above c then c is below a and below b AND can’t be above a nor b.  If M has complexity n, then a total order extending the above-below relation can be computed in O(nlogn) Note also that:  If a given map M do not admit a partial order among its paths then no monotone map can be equivalent to M.

19 Above-Below Relations in Monotone Maps (contd) Let M = {c 1,…,c m } and M’={c’ 1,…,c’ m } be two monotone maps such that the paths c i and c’ i have the same endpoints. Then, the maps M and M’ are equivalent if and only if they define the same above-below relation.

20 Above-Below Relations in Monotone Maps (contd) Proof:  We have already proven the first implication when we said that the above-below relation among paths is an invariant between equivalent maps.  To prove the other implication we will show that if M and M’ are not equivalent then they define a different above-below relation. If c i and c’ i are not equivalent in R 2 \P M U {c i (0), c i (1)}  Then there is a point p in the regions between the 2 paths in question  These regions are well defined because the paths are x- monotone.   p has a different above-below relation with c i and c’ i  AND for any path c j that has p as an endpoint  The above-below relation between c j and c i is different than the above-below relation between c’ j and c’ i.

21 Computing the Order in a map This is done in 3 steps:  Convert the map into a rectified map.  Transform the rectified map into a map with x-monotone pieces.  Compute the order on that map.

22 Rectified maps Definition: A set of paths M’ = {c’ 1,…,c’ m } is a rectification of a map M = {c 1,…,c m } if:  M’ is a map (its paths only intersect in common endpoints);  the complexity of map M’ is linear in the complexity of map M;  paths c’ i are made of axis-aligned segments;  paths c i and c j have the same above-below relation as c’ i and c’ j.

23 How we rectify M? Decompose each path c i into monotone pieces {c i 1 ;…; c i ki } and the result is M mono = {c 1 1,…,c 1 k1,…,c m 1,…,c m km } M mono has complexity O(n).  we can compute a total order extending the partial order in O(nlogn) (as we have seen before in the facts of the monotone map). This will lead to a rank r for each piece.

24 Construction of the rectified map Let c i j be a piece with left endpoint (p x,p y ), right endpoint (q x, q y ), and rank r. Make the horizontal segment h i j = [px, qx] * r in the rectified map. Path c’ i joins h i 1, …, h i k by connecting the endpoints of every two consecutive horizontal segments by a vertical segment M’ is the collection of these paths {c’ 1,…,c’ m } Note that an endpoint sharing several paths will be mapped into several points above each other vertically BECAUSE same x but different rank r.

25 Time analysis for computation of M’ As per a previous fact that states: If M is monotone and has complexity n, then a total order extending the above-below relation (or any partial relation) can be computed in O(nlogn) The work done after that take actually O(n) time since each step takes O(1) time and M mono has O(n) complexity.  O(nlogn) time in total.

26 Computing order using a rectified map In a paper titled “Testing Homotopy (equivalence in our terms) for Paths in the Plane” an algorithm called rcp (rectified canonical path) is presented. rcp transforms the path c’ i Є M’ (the rectified map) into another path rcp(c’ i ) with the following properties:  rcp(c’ i ) is equivalent to c’ i in (R 2 \P M ) U {c’ i (0), c’ i (1)}  |rcp(c’ i )| ≤ |c’ i |;  if c’ i and c’ j don't intersect, then rcp(c’ i ) and rcp(c’ j ) do not intersect either;  rcp(c’ i ) has the minimum possible number of x-monotone pieces that any path equivalent to c’ i in (R 2 \P M ) U {c’ i (0), c’ i (1)} can have.

27 Computing order using a rectified map (contd) Use rcp to get a map N = {rcp(c’ 1 ),…,rcp(c’ m )} N has the following properties:  It is a map with complexity O(n): M’ has complexity linear to M (by definition) |rcp(c’ i )| ≤ |c’ i |  N can be constructed in O(nlogn) To make M’ we take O(nlogn) To make N we take O(|M’|log|M’|) and since |M’| is O(n)  O(nlogn)  N has the same above-below relation among its paths as M rcp(c’ i ) is equivalent to c’ i (by properties of rcp) c i and c j have the same above-below relation as c’ i and c’ j (by definition of rectified maps)  N has the same above-below relation as M

28 Computing order using a rectified map (contd) Claim: N is monotone if and only if M admits an equivalent monotone map. Only going to proof that if M admit an equivalent monotone map then N is monotone The other implication will not be proven After proving the Claim we can conclude that we can decide in O(nlogn) time whether an equivalent monotone map exists for M.

29 Computing order using a rectified map (contd) Proof:  Recall: An endpoint pЄP M of several paths in M is mapped into several endpoints p’ЄP M’ in M’  By construction, no segment of M’ can pass between 2 points of p’   When considering the canonical sequence of a path c’ i with respect to P M’ \{c’i(0),c’i(1)} we can treat the set of these p’ points as one point. Let that point be also called p’.

30 Computing order using a rectified map (contd) Proof (contd):  This means that IF replace each occurrence of l p + with l p’ + (same for l p - ) in the canonical seq of c i with respect to P M \{c i (0),c i (1)} THEN we get the canonical sequence of c’ i with respect to P M’ \{c’i(0),c’i(1)}  NOW: IF M admit a monotone equivalent map THEN the canonical seq of each path c i Є M don’t contain 2 rays emanating from the same point (otherwise there would be a turn point which contradicts the monotone hypotheses)  Canonical seq c’ i don’t contain 2 rays emanating from the same point.  By the last property of rcp “rcp(c’ i ) has the minimum possible number of x-monotone pieces that any path equivalent to c’ i in (R 2 \P M ) U {c’ i (0), c’ i (1)} can have” we conclude that rcp(c’ i ) is x-monotone.   N is monotone.

31 Computing order using a rectified map (contd) Finally:  Since the order among paths in M is the same as the order among paths in N  And Since if M admit a monotone equivalent map then N is monotone.  And Since we can compute a total order extending the partial order (above-below) among paths of N in O(nlogn) time (because N is monotone)  THEREFORE we can compute in O(nlogn) time a total order extending the partial order (above-below) among paths of M.

32 Recall The sketch of the algorithm was: 1) Extract connections from original map and ORDER them top to bottom in a list. (DONE) 2) Remove connections from original map but keep endpoints. 3) Place connections one by one leaving as much space as possible for later AND each newly placed connection must be of the desired shape and below the previously placed connections (LEFT to do)

33 Placing paths in the schematic map Place paths one by one in the computed order Place each path as high as possible. A minimum vertical separation distance can be specified. Each path is either a 2-link or a 3-link path where each link has a certain direction. The idea of the algorithm can be applied to any type of schematic connection (variations of 2-link or 3- link).

34 Placing paths in the schematic map (contd) We are going to describe the placement algorithm for the case of 3-link {HDH,VDV} paths that are L 2 shortest.

35 Placing paths in the schematic map (contd) Idea:  Incrementally place paths from top to bottom respecting the order.  Maintain the lower envelope of the already-placed paths in a balanced binary search tree sorted on x-coordinate.  To add a path: Search with the left and right endpoints and collect the part of the lower envelope in between. Determine the topmost placement of the new path, with or without a minimum separation distance. The new path will replace the pieces of the lower envelope we collected  In the tree this is basically: deleting the leaves we collected and inserting up to 3 leaves (a leaf for each link).

36 Placing paths in the schematic map (contd) In the case of {HDH, VDV}-paths, to decide which kind of path to use, we make use of the endpoints of the path. Since the path has to be L 2 shortest then:  Use HDH path when vertical distance between the endpoints is smaller than the horizontal distance  Otherwise use VDV.

37 Placing paths in the schematic map (contd) Time analysis:  Searching with the left and right endpoints in the tree takes O(logn) time.  Updating the tree involves Deletion of k leaves (where k in the number of pieces the new path is below) Insertion of O(1) leaves (at most 3). This takes O((k+1)logn) time  Since in total O(n) leaves are inserted and each leave is deleted at most once  Total time of placing the schematic paths takes O(nlogn) time.

38 When does the algorithm fails? It fails in 2 different ways:  When computing the order: It can happen that the connections cannot be ordered.  When placing the connections: It can happen that we cannot place the next connection due to the schematic connection chosen When placing the next path, if an endpoint happens to be above the part of lower envelope we searched for.

39 Questions?