Fractional Cascading CSE737 2002. What is Fractional Cascading anyway? An efficient strategy for dealing with iterative searches that achieves optimal.

Slides:



Advertisements
Similar presentations
Introduction to Algorithms
Advertisements

Lecture 15. Graph Algorithms
Bart Jansen 1.  Problem definition  Instance: Connected graph G, positive integer k  Question: Is there a spanning tree for G with at least k leaves?
Polygon Triangulation
INTERVAL TREE & SEGMENTATION TREE
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.
Map Overlay Algorithm. Birch forest Wolves Map 1: Vegetation Map 2: Animals.
Approximations of points and polygonal chains
Advanced Topics in Algorithms and Data Structures Lecture 7.2, page 1 Merging two upper hulls Suppose, UH ( S 2 ) has s points given in an array according.
Augmenting Data Structures Advanced Algorithms & Data Structures Lecture Theme 07 – Part I Prof. Dr. Th. Ottmann Summer Semester 2006.
I/O-Algorithms Lars Arge Fall 2014 September 25, 2014.
2/14/13CMPS 3120 Computational Geometry1 CMPS 3120: Computational Geometry Spring 2013 Planar Subdivisions and Point Location Carola Wenk Based on: Computational.
 Distance Problems: › Post Office Problem › Nearest Neighbors and Closest Pair › Largest Empty and Smallest Enclosing Circle  Sub graphs of Delaunay.
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:
The Divide-and-Conquer Strategy
Convex Hulls in 3-space Jason C. Yang.
Zoo-Keeper’s Problem An O(nlogn) algorithm for the zoo-keeper’s problem Sergei Bespamyatnikh Computational Geometry 24 (2003), pp th CGC Workshop.
K-structure, Separating Chain, Gap Tree, and Layered DAG Presented by Dave Tahmoush.
17. Computational Geometry Chapter 7 Voronoi Diagrams.
Multiversion Access Methods - Temporal Indexing. Basics A data structure is called : Ephemeral: updates create a new version and the old version cannot.
BTrees & Bitmap Indexes
I/O-Algorithms Lars Arge Spring 2009 March 3, 2009.
I/O-Algorithms Lars Arge Aarhus University March 5, 2008.
Space Efficient Point Location forTriangulations.
Randomized Planning for Short Inspection Paths Tim Danner Lydia E. Kavraki Department of Computer Science Rice University.
©Silberschatz, Korth and Sudarshan12.1Database System Concepts Chapter 12: Part B Part A:  Index Definition in SQL  Ordered Indices  Index Sequential.
Point Location Computational Geometry, WS 2007/08 Lecture 5 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät für.
Lecture 6: Point Location Computational Geometry Prof. Dr. Th. Ottmann 1 Point Location 1.Trapezoidal decomposition. 2.A search structure. 3.Randomized,
Voronoi Diagrams.
Homework #3 Due Thursday, April 17 Problems: –Chapter 11: 11.6, –Chapter 12: 12.1, 12.2, 12.3, 12.4, 12.5, 12.7.
Fractional Cascading and Its Applications G. S. Lueker. A data structure for orthogonal range queries. In Proc. 19 th annu. IEEE Sympos. Found. Comput.
Orthogonal Range Searching I Range Trees. Range Searching S = set of geometric objects Q = query object Report/Count objects in S that intersect Q Query.
Delaunay Triangulations Presented by Glenn Eguchi Computational Geometry October 11, 2001.
Indexing. Goals: Store large files Support multiple search keys Support efficient insert, delete, and range queries.
Data Structures and Algorithms Graphs Minimum Spanning Tree PLSD210.
Dijkstras Algorithm Named after its discoverer, Dutch computer scientist Edsger Dijkstra, is an algorithm that solves the single-source shortest path problem.
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.
Chapter 2 Graph Algorithms.
UNC Chapel Hill M. C. Lin Orthogonal Range Searching Reading: Chapter 5 of the Textbook Driving Applications –Querying a Database Related Application –Crystal.
CSCE350 Algorithms and Data Structure Lecture 17 Jianjun Hu Department of Computer Science and Engineering University of South Carolina
Representing and Using Graphs
Mehdi Mohammadi March Western Michigan University Department of Computer Science CS Advanced Data Structure.
Lars Arge Presented by Or Ozery. I/O Model Previously defined: N = # of elements in input M = # of elements that fit into memory B = # of elements per.
ITEC 2620A Introduction to Data Structures Instructor: Prof. Z. Yang Course Website: 2620a.htm Office: TEL 3049.
Bin Yao (Slides made available by Feifei Li) R-tree: Indexing Structure for Data in Multi- dimensional Space.
Data Structures and Algorithms in Parallel Computing Lecture 2.
Graphs A graphs is an abstract representation of a set of objects, called vertices or nodes, where some pairs of the objects are connected by links, called.
Indexing Database Management Systems. Chapter 12: Indexing and Hashing Basic Concepts Ordered Indices B + -Tree Index Files File Organization 2.
UNC Chapel Hill M. C. Lin Delaunay Triangulations Reading: Chapter 9 of the Textbook Driving Applications –Height Interpolation –Constrained Triangulation.
CMPS 3130/6130 Computational Geometry Spring 2015
February 17, 2005Lecture 6: Point Location Point Location (most slides by Sergi Elizalde and David Pritchard)
Graphs and Shortest Paths Using ADTs and generic programming.
Polygon Triangulation
::Network Optimization:: Minimum Spanning Trees and Clustering Taufik Djatna, Dr.Eng. 1.
1 GRAPHS – Definitions A graph G = (V, E) consists of –a set of vertices, V, and –a set of edges, E, where each edge is a pair (v,w) s.t. v,w  V Vertices.
Lecture 20. Graphs and network models 1. Recap Binary search tree is a special binary tree which is designed to make the search of elements or keys in.
Computational Geometry
Greedy Technique.
CMPS 3130/6130 Computational Geometry Spring 2017
Computing Connected Components on Parallel Computers
Orthogonal Range Searching and Kd-Trees
Graph Algorithm.
Graphs Representation, BFS, DFS
Graphs Chapter 11 Objectives Upon completion you will be able to:
Search Related Algorithms
Lectures on Graph Algorithms: searching, testing and sorting
Graphs.
Database Design and Programming
INTRODUCTION A graph G=(V,E) consists of a finite non empty set of vertices V , and a finite set of edges E which connect pairs of vertices .
Presentation transcript:

Fractional Cascading CSE

What is Fractional Cascading anyway? An efficient strategy for dealing with iterative searches that achieves optimal time in linear space. [“Fractional Cascading”, Chazelle & Guibas, Algorithmica, 1986] An efficient strategy for solving the multiple look-up query problems. [“Yet Another Look at Fractional Cascading. B-graphs with Application to Point Location”, Yap & Zhu, CCCG, 2001] A technique to reduce the query time in the case of many 1-dimensional searches with the same range by using the result of one search to speed up other searches. [dBvKOS]

Iterative Searching Graph where vertices have lists associated.

Iterative Searching Graph where vertices have lists associated. 2, 44, 78, 234…

Iterative Searching Graph where vertices have lists associated. Do a search in lists associated with vertices along a path in the graph.

Iterative Searching Graph where vertices have lists associated. Do a search in lists associated with vertices along a path in the graph.

Iterative Searching Graph where vertices have lists associated. Do a search in lists associated with vertices along a path in the graph.

Iterative Searching Graph where vertices have lists associated. Do a search in lists associated with vertices along a path in the graph.

Example of Iterative Searching: Onion Find what layer a point lies on. a b c d e f

Example of Iterative Searching: Onion Find what layer a point lies on. a b c d e f d bf ace Associated graph (binary tree)

Example of Iterative Searching: Onion Find what layer a point lies on. a b c d e f d bf ace Search in the list associated to each vertex

Example of Iterative Searching: Onion Find what layer a point lies on. a b c d e f d bf ace Search in the list associated to each vertex

Example of Iterative Searching: Onion Find what layer a point lies on. a b c d e f d bf ace Query path along the graph

Some definitions [CG] (1 of 16) Catalog: an ordered collection of records with values, stored in non-decreasing order of the value. Values can be repeated inside a catalog, and a catalog contains at least values –  and . Range: an interval of the form [x,y], [x,+  ], [- ,y], specified by the two endpoints. For most problems this is [- , +  ], and can be dropped altogether. Catalog graph: an undirected and connected graph, with one catalog at each vertex and several ranges at each edge. Ranges are specified as pairs of values from the catalogs associated with the vertices joined by the associated edge.

Some definitions [CG] (2 of 2) Multiple lookup query: a pair (x,p), where x is the key value and p the search path such that value x falls within the range of all edges on the path p. vertex edge catalog value in catalog Example of a catalog graph:

Catalog a b c d e f d bf ace

Catalog b d bf ace

Catalog b b2b2 b3b3 b4b4 b5b5 b6b6 b1b1 d bf ace records

Catalog b d bf ace b: b 1.key, b 2.key, b 3.key… Catalog b2b2 b3b3 b4b4 b5b5 b6b6 b1b1

Catalog b d bf ace b: b 1.key, b 2.key, b 3.key… Catalog b2b2 b3b3 b4b4 b5b5 b6b6 b1b1 key

Catalog b d bf ace b: b 0.key, b 1.key… b 0.key Catalog (+ Range endpoints) b2b2 b3b3 b4b4 b5b5 b6b6 b1b1 b1b1 b0b0

Usage Using these concepts, the iterative search problem can be reformulated as looking up a key in the catalogs associated with each vertex along the path. The goal is to construct a data structure such that: 1) Somehow each pair of neighboring catalogs is correlated so a search in one aids a search in the other. 2) The storage space is still linear.

More definitions [CG] (1 of 4) Augmented catalog: a catalog enlarged with additional records.

Augmented Catalog a b c d e f d bf ace

b c d bf ace b2b2 b3b3 b4b4 b5b5 b6b6 b1b1 c1c1 c2c2 c3c3 c4c4 c5c5 c6c6 c7c7 b0b0 c0c0

b c d bf ace b2b2 b3b3 b4b4 b5b5 b6b6 b1b1 c1c1 c2c2 c3c3 c4c4 c5c5 c6c6 c7c7 b0b0 c0c0

b c d bf ace b2b2 b3b3 b4b4 b5b5 b6b6 b1b1 c1c1 c2c2 c3c3 c4c4 c5c5 c6c6 c7c7 c3’c3’ b0b0 c0c0

b c d bf ace b2b2 b3b3 b4b4 b5b5 b6b6 b1b1 c1c1 c2c2 c3c3 c4c4 c5c5 c6c6 c7c7 c3’c3’ c6’c6’ b0b0 c0c0

b c d bf ace b2b2 b3b3 b4b4 b5b5 b6b6 b1b1 c1c1 c2c2 c3c3 c4c4 c5c5 c6c6 c7c7 c3’c3’ c6’c6’ b: b 1, b 2, c 3 ’, b 3 … Augmented Catalog b0b0 c0c0

More definitions [CG] (2 of 4) Augmented catalog: a catalog enlarged with additional records. Bridge: a record in an augmented catalog pointing to a record with the same value in a neighboring augmented catalog.

Bridge b c d bf ace b2b2 b3b3 b4b4 b5b5 b6b6 b1b1 c1c1 c2c2 c3c3 c4c4 c5c5 c6c6 c7c7 c3’c3’ c6’c6’ b0b0 c0c0

More definitions [CG] (3 of 4) Augmented catalog: a catalog enlarged with additional records. Bridge: a record in an augmented catalog pointing to a record with the same value in a neighboring augmented catalog. Gap: a pair of consecutive bridges associated with an edge. To ensure the time bound, gaps have sizes less than 6d-1, where d is the (locally bounded) degree of the graph.

Gap b c d bf ace b2b2 b3b3 b4b4 b5b5 b6b6 b1b1 c1c1 c2c2 c3c3 c4c4 c5c5 c6c6 c7c7 c3’c3’ c6’c6’ b0b0 c0c0

Gap b c d bf ace b2b2 b3b3 b4b4 b5b5 b6b6 b1b1 c1c1 c2c2 c3c3 c4c4 c5c5 c6c6 c7c7 c3’c3’ c6’c6’ Size=|{b 3, b 4, c 4, c 5 }|=4 Gap b0b0 c0c0

More definitions [CG] (4 of 4) Augmented catalog: a catalog enlarged with additional records. Bridge: a record in an augmented catalog pointing to a record with the same value in a neighboring augmented catalog. Gap: a pair of consecutive bridges associated with an edge. To ensure the time bound, gaps have sizes less than 6d-1, where d is the (locally bounded) degree of the graph. Specifically, augmenting a catalog is adding records with values present in neighboring catalogs, such that bridges from them have records with the same value on both sides.

Answering a query [CG] If we know the position of a value in an augmented catalog, we can compute its position in the original catalog in one step. If we know the position of a value in an augmented catalog, we can compute the position of that value in a neighboring augmented catalog in O(d) time, where d is the degree of the vertex. Summarizing, we can handle any multiple lookup query provided that the structures has already been built and efficient searching is possible for the first augmented catalog that is considered.

Multiple Look-Up Query a b c d e f d bf ace

a b c d e f d bf ace Add range endpoints

Multiple Look-Up Query a b c d e f d bf ace Augment catalogs

Multiple Look-Up Query a b c d e f d bf ace Augment catalogs

Multiple Look-Up Query a b c d e f d bf ace Augment catalogs

Multiple Look-Up Query a b c d e f d bf ace Set bridges

Multiple Look-Up Query a b c d e f d bf ace Query

Multiple Look-Up Query a b c d e f d bf ace Query

Multiple Look-Up Query a b c d e f d bf ace Query

Multiple Look-Up Query a b c d e f d bf ace Query

Multiple Look-Up Query a b c d e f d bf ace Query

Multiple Look-Up Query a b c d e f d bf ace Query

Multiple Look-Up Query a b c d e f d bf ace Query

Multiple Look-Up Query a b c d e f d bf ace Query

Complexity [CG] For a graph of size s and degree d it is possible to construct a data structure to solve the iterative search problem in O(s) space and O(ds) time. The time bound can be improved using star trees to construct an emulation graph, thus decreasing the degree of any vertex to 3. The new bound is O(p log d + log s), where p is the length of the search path.

Star trees [CG] A star tree Tn is an oriented tree with n leaves, endowed with a special vertex: its center. Tn can be obtained from Tn-1 by adding 2 new edges to the leaf closest to the center. Star trees are used here to replace vertices and to ensure that the final degree of the graph is minimal. e1 e2 e3 e4 e5 e6 e7 e8 e9 e e1 e2 e3 e4 e5 e6 e7 e8 e9e10 Vertex with 10 edges:Star tree with 10 leaves:

Gateways [CG] To get the search started, we would have to keep a copy of all augmented catalogs in a table, and perform the first search in one of them. To avoid this, we introduce gateways, vertices that have augmented catalogs attached to them, but no catalogs per se. Processing the new nodes yields paths consisting of transit edges and transit vertices. The new structure closely resembles a B-tree. The difference is that splitting and merging gaps may result in coming back to a node previously visited, and go on for an unpredictable length of time.

Contributions of YZ paper In practice catalog graphs are usually trees (directed, acyclic…). Reformulate catalog graphs as catalog DAGs. Relax bridges into semi-bridges (unidirectional pointers): easier to maintain and more space-efficient. In Chazelle & Guibas the query path is ‘magically’ built. Yap & Zhu introduce edge types and discriminant functions to build the query path. Introduce B-graphs as counterparts to catalog DAGs and true generalization of B-trees, inheriting their well- known advantages for I/O efficient algorithms. Generalize the point location algorithm for line segments to monotone chains.

Explicit iterative search. Intersecting a polygonal path with a line (using convex hulls). Slanted range search (points inside a trapezoid). Orthogonal range search. Orthogonal range search in the past. Computing locus-functions. Space compression of data structures. Iterative search extensions of query problems. Applications [CG]

More definitions [CG] (2 of 2) vertex in the graph edge in the graph augmented catalog old value in catalog Example of a graph with augmented catalogs: new value in catalog bridge gap