Range Searching. 2010/11/22 Yang Lei

Size: px
Start display at page:

Download "Range Searching. 2010/11/22 Yang Lei"

Transcription

1 Range Searching 2010/11/22 Yang Lei

2 Outline What is range searching? 1D range searching (Property 26.1) 2D range searching Algorithm 1: Projection (worst cases: L-shape) Algorithm 2: Grid Method (Predetermined) (Property 26.2) How to divide grids? Too coarse, too fine? (size? maxg?) Worst case: Clustered data. Algorithm 3: Two-Dimensional Trees (Adpative) Property 26.3, property 26.4 Multidimensional Range Searching (3D, 4D,.,kD)

3 Definition Finding all records in a database that satisfy specified range restrictions on a specified set of attributes (dimensions) is called range searching. Example: (1) On Amazon.com : search all watches with price $100<P<$200; (1D) (2) In UH: search for all undergraduate students graduated between year 2000 to 2009 with GPA between 3.0 to 4.0(3D) (3) Select a group of files by draging a rectangle [P1(x1,y1), P2(x2,y2)] using mouse on your computer. (2D)

4 P1(x1,y1) and P2(x2,y2) Define a Rect. (x1<x<x2)&&(y1<y<y2)

5 One Dimensional Range Searching Method1: 1.Sorting all points for preprocessing, 2.Then do binary search on the endpoints of the interval to return all points fall between. Method2: 1.Build a binary search tree, 2.Do recursive traversal of the tree. Property 26.1 It can be done with O(N*logN) steps for preprocessing, and O(R+logN) for range searching, where R is the number of points actually falling in the range.

6 Note: Exceptions The algorithm we considered here are not expected for queries a large number of points, say R is small. If R is as large as N, use other algorithm. Batching all requests within the memory capacity and do a sequential search through an external database (big&slow), return all requested records. Example: we receive 1K users searching requests per second User 1 requests: $50<watch<$100; User 2 requests: $100<watch<$200; User 3 requests: $50< watch <$450; User 999 requests: $xxx<watch<$yyyy; Go through database only once!

7 Two-Dimensional Range Searching Algorithm 1: Projection If compare sequentially, N=16, there are 2N=16*2=32 comparisons.

8 Algorithm 1: Projection Project points to the narrower side of Rect. Compare X coordinates, 16 comparisons; then compare Y coordinates for {D, E, F, C, H}, 5 comparisons. Total=21 comparisons. Saving 35%.

9 Worst Case of Projection L-shape distribution. Project points to X, compare X coordinates, 16 comparisons; then compare Y coordinates for {LGPEOADHNC}, 10 comparisons; total 26 comparisons. Saving 18%.

10 Algorithm 2: Grid Method Draw artificial grids. Each grid is (size by size large). Total maxg*maxg grids. (i, j)

11 Algorithm 2: Grid Method If there are N points and we want M points per grid square, then we need N/M grid squares, then: The width of a grid square size is sqrt(n/m). The number of a grid square maxg is (int)(n/m), where MAX is the maximum points coordinates. There are maxg by maxg (N/M) grid squares, the point coordinates range between [0, size*maxg]. These estimates are not accurate for small values, but are useful for most situations.

12 A2 Grid Method: Initialize data Preprocessing: artificial grids and short lists Input the N points (array) Determine the grid size size and number of grids maxg *maxg Initialize the grid array and the corresponding lists For each point p i (i=0,1, N-1), divide its coordinates by maxg to get the grid indexed by ( floor(p i.x/maxg), floor(p i.y/maxg)) Insert point p i into the list for the grid it belongs to Loop until all points are processed Complexity: O(N)

13 A2 Grid Method: Searching Range searching Read in the Range R(x1,x2,y1,y2) Determine the grids intersecting the range by indexing (i, j): i from R.x1/maxG to R.x2/maxG && j from R.y1/maxG to R.y2/maxG For each grid intersecting the range Traverse its linked list representing the points contained in that grid Call InsideRect() for every point in the list to examine the insideness Loop until all the intersecting grids (and the corresponding lists) are processed, output the points within the range

14 Grid method is a predetermined approach. Property 26.2 The grid method for range searching is linear in the number of points in the range, on the average, and linear in the total number of points in the worst case. The grid method for range searching is linear in the number of points in the range, on the average, and linear in the total number of points N in the worst case. This depends on choosing parameters so that expected number of points in each grid is constant. The grid method works well if points are well distributed over the assumed range. The worst case is clustered data. All data in one grid, other grids are all empty.

15 Two-Dimensional Trees

16

17 Two-Dimensional Trees 2D dimensional trees are dynamic, adaptable data structures that are similar with binary tree, but divide up a geometric space in a manner convenient for range search. The idea is to build binary search trees with points in the nodes, using the y & x coordinates of the points as keys in a strict alternating sequence. Space division is adaptive to the distribution of the points, so that range searching can be done efficiently.

18 Algorithm 3: 2D Trees Inserting points into 2D trees is same as in normal binary search tree; but at root we use y coordinate. For smaller y than the root, go left; For larger y than the root, go right. At next level use x coordinate, then y at next level; altering until an external node is encountered.

19 Algorithm 3: 2D Trees Dividing up the plane in a simple way: All points below the point at the root point go in left sub-tree; All those above the root point go in right sub-tree; All points above the root point and to the left of the point in the right sub-tree go in the left sub-tree of the right sub-tree of the root.

20 A3 2D Trees: Preprocessing Preprocessing: building of the 2D-Tree Input the N points (array) and initialize the empty tree Pick one (randomly) as the root of the empty tree For each point p i (i=1,2, N-1), insert it into the tree by Going down the tree by comparing its keys (two coordinates) to the root nodes and other nodes in the tree Alternating the x and y coordinates as the comparing keys while going down the tree level by level For every comparison, if smaller, go to left sub-tree; if bigger, go to right sub-tree. Repeat until reach a external node Insert point p i into the current position Loop until all points are inserted

21 A3 2D Trees: Range searching Range searching Read in the Range R(x1,x2,y1,y2) Travel through the 2D-Tree by comparing the key of the node point to the corresponding interval (x1,x2) or (y1,y2): Go down to the left sub-tree, if x2 <= p.x ( or y2 <= p.y ) Go down to the right sub-tree, if x1 >= p.x ( or y1 >= p.y ) Check both sub-trees, if x1 < p.x < x2 ( or y1 < p.y <y2 ) Check the other coordinate of those node points which are cut through the interval or on the edge lines Repeat until reach external nodes, output the points within R

22 A3: 2D Tree Algorithm Analysis The complexity of preprocessing is O(2N*lnN). The complexity of range searching is O(R+logN), where R is number of points to be found, and N is number of total points.

Computational Geometry

Computational Geometry Windowing queries Windowing Windowing queries Zoom in; re-center and zoom in; select by outlining Windowing Windowing queries Windowing Windowing queries Given a set of n axis-parallel line segments, preprocess

More information

Advanced Algorithm Design and Analysis (Lecture 12) SW5 fall 2005 Simonas Šaltenis E1-215b

Advanced Algorithm Design and Analysis (Lecture 12) SW5 fall 2005 Simonas Šaltenis E1-215b Advanced Algorithm Design and Analysis (Lecture 12) SW5 fall 2005 Simonas Šaltenis E1-215b simas@cs.aau.dk Range Searching in 2D Main goals of the lecture: to understand and to be able to analyze the kd-trees

More information

Computational Geometry

Computational Geometry Windowing queries Windowing Windowing queries Zoom in; re-center and zoom in; select by outlining Windowing Windowing queries Windowing Windowing queries Given a set of n axis-parallel line segments, preprocess

More information

Orthogonal range searching. Range Trees. Orthogonal range searching. 1D range searching. CS Spring 2009

Orthogonal range searching. Range Trees. Orthogonal range searching. 1D range searching. CS Spring 2009 CS 5633 -- Spring 2009 Orthogonal range searching Range Trees Carola Wenk Slides courtesy of Charles Leiserson with small changes by Carola Wenk CS 5633 Analysis of Algorithms 1 Input: n points in d dimensions

More information

Point Enclosure and the Interval Tree

Point Enclosure and the Interval Tree C.S. 252 Prof. Roberto Tamassia Computational Geometry Sem. II, 1992 1993 Lecture 8 Date: March 3, 1993 Scribe: Dzung T. Hoang Point Enclosure and the Interval Tree Point Enclosure We consider the 1-D

More information

Student Outcomes. Lesson Notes. Classwork. Opening Exercise (3 minutes)

Student Outcomes. Lesson Notes. Classwork. Opening Exercise (3 minutes) Student Outcomes Students solve problems related to the distance between points that lie on the same horizontal or vertical line Students use the coordinate plane to graph points, line segments and geometric

More information

Multidimensional Indexes [14]

Multidimensional Indexes [14] CMSC 661, Principles of Database Systems Multidimensional Indexes [14] Dr. Kalpakis http://www.csee.umbc.edu/~kalpakis/courses/661 Motivation Examined indexes when search keys are in 1-D space Many interesting

More information

1 The range query problem

1 The range query problem CS268: Geometric Algorithms Handout #12 Design and Analysis Original Handout #12 Stanford University Thursday, 19 May 1994 Original Lecture #12: Thursday, May 19, 1994 Topics: Range Searching with Partition

More information

Computational Geometry. Lecture 17

Computational Geometry. Lecture 17 Computational Geometry Lecture 17 Computational geometry Algorithms for solving geometric problems in 2D and higher. Fundamental objects: Basic structures: point line segment line point set polygon L17.2

More information

CS210 Project 5 (Kd-Trees) Swami Iyer

CS210 Project 5 (Kd-Trees) Swami Iyer The purpose of this assignment is to create a symbol table data type whose keys are two-dimensional points. We ll use a 2d-tree to support efficient range search (find all the points contained in a query

More information

1D Range Searching (cont) 5.1: 1D Range Searching. Database queries

1D Range Searching (cont) 5.1: 1D Range Searching. Database queries kd!trees SMD156 Lecture 5 Orthogonal Range Searching Database queries Divide!and!conquer Orthogonal Range Searching Range Trees Searching for items using many ranges of criteria at a time SMD156 Computational

More information

Computational Geometry

Computational Geometry Range searching and kd-trees 1 Database queries 1D range trees Databases Databases store records or objects Personnel database: Each employee has a name, id code, date of birth, function, salary, start

More information

Algorithms. Algorithms GEOMETRIC APPLICATIONS OF BSTS. 1d range search line segment intersection kd trees interval search trees rectangle intersection

Algorithms. Algorithms GEOMETRIC APPLICATIONS OF BSTS. 1d range search line segment intersection kd trees interval search trees rectangle intersection Algorithms ROBERT SEDGEWICK KEVIN WAYNE GEOMETRIC APPLICATIONS OF BSTS Algorithms F O U R T H E D I T I O N ROBERT SEDGEWICK KEVIN WAYNE 1d range search line segment intersection kd trees interval search

More information

Algorithms. Algorithms GEOMETRIC APPLICATIONS OF BSTS. 1d range search line segment intersection kd trees interval search trees rectangle intersection

Algorithms. Algorithms GEOMETRIC APPLICATIONS OF BSTS. 1d range search line segment intersection kd trees interval search trees rectangle intersection Algorithms ROBERT SEDGEWICK KEVIN WAYNE GEOMETRIC APPLICATIONS OF BSTS Algorithms F O U R T H E D I T I O N ROBERT SEDGEWICK KEVIN WAYNE 1d range search line segment intersection kd trees interval search

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

Orthogonal Range Search and its Relatives

Orthogonal Range Search and its Relatives Orthogonal Range Search and its Relatives Coordinate-wise dominance and minima Definition: dominates Say that point (x,y) dominates (x', y') if x

More information

Introduction to Spatial Database Systems

Introduction to Spatial Database Systems Introduction to Spatial Database Systems by Cyrus Shahabi from Ralf Hart Hartmut Guting s VLDB Journal v3, n4, October 1994 Data Structures & Algorithms 1. Implementation of spatial algebra in an integrated

More information

Computational Geometry

Computational Geometry CS 5633 -- Spring 2004 Computational Geometry Carola Wenk Slides courtesy of Charles Leiserson with small changes by Carola Wenk CS 5633 Analysis of Algorithms 1 Computational geometry Algorithms for solving

More information

Range Searching and Windowing

Range Searching and Windowing CS 6463 -- Fall 2010 Range Searching and Windowing Carola Wenk 1 Orthogonal range searching Input: n points in d dimensions E.g., representing a database of n records each with d numeric fields Query:

More information

Ray Tracing Acceleration Data Structures

Ray Tracing Acceleration Data Structures Ray Tracing Acceleration Data Structures Sumair Ahmed October 29, 2009 Ray Tracing is very time-consuming because of the ray-object intersection calculations. With the brute force method, each ray has

More information

Geometric Algorithms. Geometric search: overview. 1D Range Search. 1D Range Search Implementations

Geometric Algorithms. Geometric search: overview. 1D Range Search. 1D Range Search Implementations Geometric search: overview Geometric Algorithms Types of data:, lines, planes, polygons, circles,... This lecture: sets of N objects. Range searching Quadtrees, 2D trees, kd trees Intersections of geometric

More information

CSE 554 Lecture 5: Contouring (faster)

CSE 554 Lecture 5: Contouring (faster) CSE 554 Lecture 5: Contouring (faster) Fall 2016 CSE554 Contouring II Slide 1 Review Iso-contours Points where a function evaluates to be a given value (iso-value) Smooth thresholded boundaries Contouring

More information

Planar Point Location

Planar Point Location C.S. 252 Prof. Roberto Tamassia Computational Geometry Sem. II, 1992 1993 Lecture 04 Date: February 15, 1993 Scribe: John Bazik Planar Point Location 1 Introduction In range searching, a set of values,

More information

Algorithms. Algorithms GEOMETRIC APPLICATIONS OF BSTS. 1d range search line segment intersection kd trees interval search trees rectangle intersection

Algorithms. Algorithms GEOMETRIC APPLICATIONS OF BSTS. 1d range search line segment intersection kd trees interval search trees rectangle intersection Algorithms ROBERT SEDGEWICK KEVIN WAYNE GEOMETRIC APPLICATIONS OF BSTS Algorithms F O U R T H E D I T I O N ROBERT SEDGEWICK KEVIN WAYNE 1d range search line segment intersection kd trees interval search

More information

1. Create a map of the layer and attribute that needs to be queried

1. Create a map of the layer and attribute that needs to be queried Single Layer Query 1. Create a map of the layer and attribute that needs to be queried 2. Choose the desired Select Type. This can be changed from the Map menu at the far top or from the Select Type Icon

More information

Algorithms. Algorithms GEOMETRIC APPLICATIONS OF BSTS. 1d range search kd trees line segment intersection interval search trees rectangle intersection

Algorithms. Algorithms GEOMETRIC APPLICATIONS OF BSTS. 1d range search kd trees line segment intersection interval search trees rectangle intersection KdTree Next Assignment due /26 (Tuesday after Spring Break) This Thursday, precept will cover the assignment in detail using a great worksheet (thanks Maia!). Due two days after Spring break ends. Second

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

Polyhedron Nets. National Standards (NCTM) 21 st Century Skills. Middle School

Polyhedron Nets. National Standards (NCTM) 21 st Century Skills. Middle School Polyhedron Nets Middle School National Standards (NCTM) 21 st Century Skills Instructional programs from prekindergarten through grade 12 in Geometry should enable each and every student to Analyze characteristics

More information

Introduction to Indexing R-trees. Hong Kong University of Science and Technology

Introduction to Indexing R-trees. Hong Kong University of Science and Technology Introduction to Indexing R-trees Dimitris Papadias Hong Kong University of Science and Technology 1 Introduction to Indexing 1. Assume that you work in a government office, and you maintain the records

More information

Range Reporting. Range Reporting. Range Reporting Problem. Applications

Range Reporting. Range Reporting. Range Reporting Problem. Applications Philip Bille Problem problem. Preprocess at set of points P R 2 to support report(x1, y1, x2, y2): Return the set of points in R P, where R is rectangle given by (x1, y1) and (x2, y2). Applications Relational

More information

Partitioning and Divide-and-Conquer Strategies

Partitioning and Divide-and-Conquer Strategies Partitioning and Divide-and-Conquer Strategies Chapter 4 slides4-1 Partitioning Partitioning simply divides the problem into parts. Divide and Conquer Characterized by dividing problem into subproblems

More information

An angle that has a measure less than a right angle.

An angle that has a measure less than a right angle. Unit 1 Study Strategies: Two-Dimensional Figures Lesson Vocab Word Definition Example Formed by two rays or line segments that have the same 1 Angle endpoint. The shared endpoint is called the vertex.

More information

Introduction to Algorithms

Introduction to Algorithms Introduction to Algorithms 6.046J/18.401 Lecture 17 Prof. Piotr Indyk Computational Geometry ctd. Segment intersection problem: Given: a set of n distinct segments s 1 s n, represented by coordinates of

More information

January 10-12, NIT Surathkal Introduction to Graph and Geometric Algorithms

January 10-12, NIT Surathkal Introduction to Graph and Geometric Algorithms Geometric data structures Sudebkumar Prasant Pal Department of Computer Science and Engineering IIT Kharagpur, 721302. email: spp@cse.iitkgp.ernet.in January 10-12, 2012 - NIT Surathkal Introduction to

More information

Computational Geometry

Computational Geometry Orthogonal Range Searching omputational Geometry hapter 5 Range Searching Problem: Given a set of n points in R d, preprocess them such that reporting or counting the k points inside a d-dimensional axis-parallel

More information

Describe Plane Shapes

Describe Plane Shapes Lesson 12.1 Describe Plane Shapes You can use math words to describe plane shapes. point an exact position or location line endpoints line segment ray a straight path that goes in two directions without

More information

Module 4: Index Structures Lecture 13: Index structure. The Lecture Contains: Index structure. Binary search tree (BST) B-tree. B+-tree.

Module 4: Index Structures Lecture 13: Index structure. The Lecture Contains: Index structure. Binary search tree (BST) B-tree. B+-tree. The Lecture Contains: Index structure Binary search tree (BST) B-tree B+-tree Order file:///c /Documents%20and%20Settings/iitkrana1/My%20Documents/Google%20Talk%20Received%20Files/ist_data/lecture13/13_1.htm[6/14/2012

More information

Computational Geometry

Computational Geometry Range trees Range queries Database queries salary G. Ometer born: Aug 16, 1954 salary: $3,500 A database query may ask for all employees with age between a 1 and a 2, and salary between s 1 and s 2 19,500,000

More information

= f (a, b) + (hf x + kf y ) (a,b) +

= f (a, b) + (hf x + kf y ) (a,b) + Chapter 14 Multiple Integrals 1 Double Integrals, Iterated Integrals, Cross-sections 2 Double Integrals over more general regions, Definition, Evaluation of Double Integrals, Properties of Double Integrals

More information

Lecture 3 February 9, 2010

Lecture 3 February 9, 2010 6.851: Advanced Data Structures Spring 2010 Dr. André Schulz Lecture 3 February 9, 2010 Scribe: Jacob Steinhardt and Greg Brockman 1 Overview In the last lecture we continued to study binary search trees

More information

Chapter 10. Exploring Conic Sections

Chapter 10. Exploring Conic Sections Chapter 10 Exploring Conic Sections Conics A conic section is a curve formed by the intersection of a plane and a hollow cone. Each of these shapes are made by slicing the cone and observing the shape

More information

Algorithms GEOMETRIC APPLICATIONS OF BSTS. 1d range search line segment intersection kd trees interval search trees rectangle intersection

Algorithms GEOMETRIC APPLICATIONS OF BSTS. 1d range search line segment intersection kd trees interval search trees rectangle intersection GEOMETRIC APPLICATIONS OF BSTS Algorithms F O U R T H E D I T I O N 1d range search line segment intersection kd trees interval search trees rectangle intersection R O B E R T S E D G E W I C K K E V I

More information

GRADE 5 UNIT 5 SHAPE AND COORDINATE GEOMETRY Established Goals: Standards

GRADE 5 UNIT 5 SHAPE AND COORDINATE GEOMETRY Established Goals: Standards GRADE 5 UNIT 5 SHAPE AND COORDINATE GEOMETRY Established Goals: Standards 5.NBT.7 Add, subtract, multiply, and divide decimals to hundredths, using concrete models or drawings and strategies based on place

More information

27 Geometric Intersection

27 Geometric Intersection 27 eometric ntersection ------------------------------------------------------------- A natural problem that arises frequently in applications involving geometric data is: "iven a set of N objects, do

More information

1. [1 pt] What is the solution to the recurrence T(n) = 2T(n-1) + 1, T(1) = 1

1. [1 pt] What is the solution to the recurrence T(n) = 2T(n-1) + 1, T(1) = 1 Asymptotics, Recurrence and Basic Algorithms 1. [1 pt] What is the solution to the recurrence T(n) = 2T(n-1) + 1, T(1) = 1 1. O(logn) 2. O(n) 3. O(nlogn) 4. O(n 2 ) 5. O(2 n ) 2. [1 pt] What is the solution

More information

Unit 5: Quadratic Functions

Unit 5: Quadratic Functions Unit 5: Quadratic Functions LESSON #5: THE PARABOLA GEOMETRIC DEFINITION DIRECTRIX FOCUS LATUS RECTUM Geometric Definition of a Parabola Quadratic Functions Geometrically, a parabola is the set of all

More information

Partitioning and Divide-and- Conquer Strategies

Partitioning and Divide-and- Conquer Strategies Partitioning and Divide-and- Conquer Strategies Partitioning Strategies Partitioning simply divides the problem into parts Example - Adding a sequence of numbers We might consider dividing the sequence

More information

Carnegie Mellon Univ. Dept. of Computer Science Database Applications. Why Sort? Why Sort? select... order by

Carnegie Mellon Univ. Dept. of Computer Science Database Applications. Why Sort? Why Sort? select... order by Carnegie Mellon Univ. Dept. of Computer Science 15-415 - Database Applications Lecture 12: external sorting (R&G ch. 13) Faloutsos 15-415 1 Why Sort? Faloutsos 15-415 2 Why Sort? select... order by e.g.,

More information

26 The closest pair problem

26 The closest pair problem The closest pair problem 1 26 The closest pair problem Sweep algorithms solve many kinds of proximity problems efficiently. We present a simple sweep that solves the two-dimensional closest pair problem

More information

Conquer Strategies. Partitioning and Divide-and- Partitioning Strategies + + Using separate send()s and recv()s. Slave

Conquer Strategies. Partitioning and Divide-and- Partitioning Strategies + + Using separate send()s and recv()s. Slave Partitioning and Divide-and- Conquer Strategies Partitioning Strategies Partitioning simply divides the problem into parts Example - Adding a sequence of numbers We might consider dividing the sequence

More information

Problem A. The Lawyer

Problem A. The Lawyer Problem A. The Lawyer 1 second n segments on a straight line are given. The goal is to find two segments that do not cross (or determine such a pair does not exist) Find the segment with minimum right

More information

Problem Set 6 Solutions

Problem Set 6 Solutions Introduction to Algorithms October 29, 2001 Massachusetts Institute of Technology 6.046J/18.410J Singapore-MIT Alliance SMA5503 Professors Erik Demaine, Lee Wee Sun, and Charles E. Leiserson Handout 24

More information

Week - 04 Lecture - 01 Merge Sort. (Refer Slide Time: 00:02)

Week - 04 Lecture - 01 Merge Sort. (Refer Slide Time: 00:02) Programming, Data Structures and Algorithms in Python Prof. Madhavan Mukund Department of Computer Science and Engineering Indian Institute of Technology, Madras Week - 04 Lecture - 01 Merge Sort (Refer

More information

MET 107 Drawing Tool (Shapes) Notes Day 3

MET 107 Drawing Tool (Shapes) Notes Day 3 MET 107 Drawing Tool (Shapes) Notes Day 3 Shapes: (Insert Tab Shapes) Example: Select on the rounded rectangle Then use the mouse to position the upper left corner and produce the size by dragging out

More information

Algorithms for Euclidean TSP

Algorithms for Euclidean TSP This week, paper [2] by Arora. See the slides for figures. See also http://www.cs.princeton.edu/~arora/pubs/arorageo.ps Algorithms for Introduction This lecture is about the polynomial time approximation

More information

CSE 373 Autumn 2012: Midterm #2 (closed book, closed notes, NO calculators allowed)

CSE 373 Autumn 2012: Midterm #2 (closed book, closed notes, NO calculators allowed) Name: Sample Solution Email address: CSE 373 Autumn 0: Midterm # (closed book, closed notes, NO calculators allowed) Instructions: Read the directions for each question carefully before answering. We may

More information

Final Exam Solutions

Final Exam Solutions Introduction to Algorithms December 14, 2010 Massachusetts Institute of Technology 6.006 Fall 2010 Professors Konstantinos Daskalakis and Patrick Jaillet Final Exam Solutions Final Exam Solutions Problem

More information

Hierarchical Intelligent Cuttings: A Dynamic Multi-dimensional Packet Classification Algorithm

Hierarchical Intelligent Cuttings: A Dynamic Multi-dimensional Packet Classification Algorithm 161 CHAPTER 5 Hierarchical Intelligent Cuttings: A Dynamic Multi-dimensional Packet Classification Algorithm 1 Introduction We saw in the previous chapter that real-life classifiers exhibit structure and

More information

Module 8: Range-Searching in Dictionaries for Points

Module 8: Range-Searching in Dictionaries for Points Module 8: Range-Searching in Dictionaries for Points CS 240 Data Structures and Data Management T. Biedl K. Lanctot M. Sepehri S. Wild Based on lecture notes by many previous cs240 instructors David R.

More information

Computational Geometry

Computational Geometry Planar point location Point location Introduction Planar point location Strip-based structure Point location problem: Preprocess a planar subdivision such that for any query point q, the face of the subdivision

More information

Autodesk Inventor 2019 and Engineering Graphics

Autodesk Inventor 2019 and Engineering Graphics Autodesk Inventor 2019 and Engineering Graphics An Integrated Approach Randy H. Shih SDC PUBLICATIONS Better Textbooks. Lower Prices. www.sdcpublications.com Powered by TCPDF (www.tcpdf.org) Visit the

More information

Approximation Algorithms for Geometric Intersection Graphs

Approximation Algorithms for Geometric Intersection Graphs Approximation Algorithms for Geometric Intersection Graphs Subhas C. Nandy (nandysc@isical.ac.in) Advanced Computing and Microelectronics Unit Indian Statistical Institute Kolkata 700108, India. Outline

More information

Binary Space Partitions for Orthogonal Segments and Hyperrectangles Adrian Dumitrescu Joe Mitchell Micha Sharir

Binary Space Partitions for Orthogonal Segments and Hyperrectangles Adrian Dumitrescu Joe Mitchell Micha Sharir Binary Space Partitions for Orthogonal Segments and Hyperrectangles Adrian Dumitrescu Joe Mitchell Micha Sharir State University of New York Stony Brook, NY 11794 3600 Binary Space Partitions (BSP): l5

More information

Hidden Surface Elimination: BSP trees

Hidden Surface Elimination: BSP trees Hidden Surface Elimination: BSP trees Outline Binary space partition (BSP) trees Polygon-aligned 1 BSP Trees Basic idea: Preprocess geometric primitives in scene to build a spatial data structure such

More information

Multidimensional Data and Modelling - DBMS

Multidimensional Data and Modelling - DBMS Multidimensional Data and Modelling - DBMS 1 DBMS-centric approach Summary: l Spatial data is considered as another type of data beside conventional data in a DBMS. l Enabling advantages of DBMS (data

More information

Efficient Algorithmic Techniques for Several Multidimensional Geometric Data Management and Analysis Problems

Efficient Algorithmic Techniques for Several Multidimensional Geometric Data Management and Analysis Problems Efficient Algorithmic Techniques for Several Multidimensional Geometric Data Management and Analysis Problems Mugurel Ionuţ Andreica Politehnica University of Bucharest, Romania, mugurel.andreica@cs.pub.ro

More information

Lesson 18: Slicing on an Angle

Lesson 18: Slicing on an Angle Student Outcomes Students describe polygonal regions that result from slicing a right rectangular prism or pyramid by a plane that is not necessarily parallel or perpendicular to a base. Lesson Notes In

More information

CSCI567 Machine Learning (Fall 2014)

CSCI567 Machine Learning (Fall 2014) CSCI567 Machine Learning (Fall 2014) Drs. Sha & Liu {feisha,yanliu.cs}@usc.edu September 9, 2014 Drs. Sha & Liu ({feisha,yanliu.cs}@usc.edu) CSCI567 Machine Learning (Fall 2014) September 9, 2014 1 / 47

More information

List of Practical for Master in Computer Application (5 Year Integrated) (Through Distance Education)

List of Practical for Master in Computer Application (5 Year Integrated) (Through Distance Education) List of Practical for Master in Computer Application (5 Year Integrated) (Through Distance Education) Directorate of Distance Education Guru Jambeshwar University of Science & Technology, Hissar First

More information

MPM1D Page 1 of 6. length, width, thickness, area, volume, flatness, infinite extent, contains infinite number of points. A part of a with endpoints.

MPM1D Page 1 of 6. length, width, thickness, area, volume, flatness, infinite extent, contains infinite number of points. A part of a with endpoints. MPM1D Page 1 of 6 Unit 5 Lesson 1 (Review) Date: Review of Polygons Activity 1: Watch: http://www.mathsisfun.com/geometry/dimensions.html OBJECT Point # of DIMENSIONS CHARACTERISTICS location, length,

More information

Range Reporting. Range reporting problem 1D range reporting Range trees 2D range reporting Range trees Predecessor in nested sets kd trees

Range Reporting. Range reporting problem 1D range reporting Range trees 2D range reporting Range trees Predecessor in nested sets kd trees Range Reporting Range reporting problem 1D range reporting Range trees 2D range reporting Range trees Predecessor in nested sets kd trees Philip Bille Range Reporting Range reporting problem 1D range reporting

More information

Algorithms for GIS:! Quadtrees

Algorithms for GIS:! Quadtrees Algorithms for GIS: Quadtrees Quadtree A data structure that corresponds to a hierarchical subdivision of the plane Start with a square (containing inside input data) Divide into 4 equal squares (quadrants)

More information

CSE 544 Principles of Database Management Systems. Magdalena Balazinska Winter 2009 Lecture 6 - Storage and Indexing

CSE 544 Principles of Database Management Systems. Magdalena Balazinska Winter 2009 Lecture 6 - Storage and Indexing CSE 544 Principles of Database Management Systems Magdalena Balazinska Winter 2009 Lecture 6 - Storage and Indexing References Generalized Search Trees for Database Systems. J. M. Hellerstein, J. F. Naughton

More information

Lesson 2: Basic Concepts of Geometry

Lesson 2: Basic Concepts of Geometry : Basic Concepts of Geometry Learning Target I can identify the difference between a figure notation and its measurements I can list collinear and non collinear points I can find the distance / length

More information

Conic Sections. College Algebra

Conic Sections. College Algebra Conic Sections College Algebra Conic Sections A conic section, or conic, is a shape resulting from intersecting a right circular cone with a plane. The angle at which the plane intersects the cone determines

More information

Geometry Lesson Polyhedron Nets. National Standards

Geometry Lesson Polyhedron Nets. National Standards Geometry Lesson Polyhedron Nets National Standards Instructional programs for Algebra grades 6 th -8 th should enable all students to: Precisely describe, classify, and understand relationships among types

More information

Partitioning and Divide-and-Conquer Strategies

Partitioning and Divide-and-Conquer Strategies Chapter 4 Slide 125 Partitioning and Divide-and-Conquer Strategies Slide 126 Partitioning Partitioning simply divides the problem into parts. Divide and Conquer Characterized by dividing problem into subproblems

More information

SolidWorks 2013 and Engineering Graphics

SolidWorks 2013 and Engineering Graphics SolidWorks 2013 and Engineering Graphics An Integrated Approach Randy H. Shih SDC PUBLICATIONS Schroff Development Corporation Better Textbooks. Lower Prices. www.sdcpublications.com Visit the following

More information

A Distributed Approach to Fast Map Overlay

A Distributed Approach to Fast Map Overlay A Distributed Approach to Fast Map Overlay Peter Y. Wu Robert Morris University Abstract Map overlay is the core operation in many GIS applications. We briefly survey the different approaches, and describe

More information

Spatial Data Management

Spatial Data Management Spatial Data Management [R&G] Chapter 28 CS432 1 Types of Spatial Data Point Data Points in a multidimensional space E.g., Raster data such as satellite imagery, where each pixel stores a measured value

More information

Clipping Points Consider a clip window which is rectangular in shape. P(x, y) is a point to be displayed.

Clipping Points Consider a clip window which is rectangular in shape. P(x, y) is a point to be displayed. Usually only a specified region of a picture needs to be displayed. This region is called the clip window. An algorithm which displays only those primitives (or part of the primitives) which lie inside

More information

Data Mining. Part 2. Data Understanding and Preparation. 2.4 Data Transformation. Spring Instructor: Dr. Masoud Yaghini. Data Transformation

Data Mining. Part 2. Data Understanding and Preparation. 2.4 Data Transformation. Spring Instructor: Dr. Masoud Yaghini. Data Transformation Data Mining Part 2. Data Understanding and Preparation 2.4 Spring 2010 Instructor: Dr. Masoud Yaghini Outline Introduction Normalization Attribute Construction Aggregation Attribute Subset Selection Discretization

More information

Picture Maze Generation by Repeated Contour Connection and Graph Structure of Maze

Picture Maze Generation by Repeated Contour Connection and Graph Structure of Maze Computer Science and Engineering 2013, 3(3): 76-83 DOI: 10.5923/j.computer.20130303.04 Picture Maze Generation by Repeated Contour Connection and Graph Structure of Maze Tomio Kurokawa Department of Information

More information

Spatial Data Management

Spatial Data Management Spatial Data Management Chapter 28 Database management Systems, 3ed, R. Ramakrishnan and J. Gehrke 1 Types of Spatial Data Point Data Points in a multidimensional space E.g., Raster data such as satellite

More information

Database Applications (15-415)

Database Applications (15-415) Database Applications (15-415) DBMS Internals- Part V Lecture 13, March 10, 2014 Mohammad Hammoud Today Welcome Back from Spring Break! Today Last Session: DBMS Internals- Part IV Tree-based (i.e., B+

More information

LINEAR PROGRAMMING: A GEOMETRIC APPROACH. Copyright Cengage Learning. All rights reserved.

LINEAR PROGRAMMING: A GEOMETRIC APPROACH. Copyright Cengage Learning. All rights reserved. 3 LINEAR PROGRAMMING: A GEOMETRIC APPROACH Copyright Cengage Learning. All rights reserved. 3.1 Graphing Systems of Linear Inequalities in Two Variables Copyright Cengage Learning. All rights reserved.

More information

Solutions to Problem Set 1

Solutions to Problem Set 1 CSCI-GA.3520-001 Honors Analysis of Algorithms Solutions to Problem Set 1 Problem 1 An O(n) algorithm that finds the kth integer in an array a = (a 1,..., a n ) of n distinct integers. Basic Idea Using

More information

Step 4: Generate a Mesh

Step 4: Generate a Mesh صفحه 1 از 8 Step 4: Generate a Mesh You will generate the mesh in three steps. First you will modify the order in which objects are meshed. Then you will create a coarse mesh and examine it to determine

More information

Computer Graphics: 8-Hidden Surface Removal

Computer Graphics: 8-Hidden Surface Removal Computer Graphics: 8-Hidden Surface Removal Prof. Dr. Charles A. Wüthrich, Fakultät Medien, Medieninformatik Bauhaus-Universität Weimar caw AT medien.uni-weimar.de Depth information Depth information is

More information

Multidimensional Indexing The R Tree

Multidimensional Indexing The R Tree Multidimensional Indexing The R Tree Module 7, Lecture 1 Database Management Systems, R. Ramakrishnan 1 Single-Dimensional Indexes B+ trees are fundamentally single-dimensional indexes. When we create

More information

create 2 new grid lines

create 2 new grid lines STEP 1: open your class-01 Project file _ go to Level 1 _ select grid line 1 _ type CO (copy) _ repeat for grid line 3 as shown in image 1 Architectural Column STEP 2: from the Ribbon under the Home tab

More information

Symbol Table. Symbol table is used widely in many applications. dictionary is a kind of symbol table data dictionary is database management

Symbol Table. Symbol table is used widely in many applications. dictionary is a kind of symbol table data dictionary is database management Hashing Symbol Table Symbol table is used widely in many applications. dictionary is a kind of symbol table data dictionary is database management In general, the following operations are performed on

More information

5. Hashing. 5.1 General Idea. 5.2 Hash Function. 5.3 Separate Chaining. 5.4 Open Addressing. 5.5 Rehashing. 5.6 Extendible Hashing. 5.

5. Hashing. 5.1 General Idea. 5.2 Hash Function. 5.3 Separate Chaining. 5.4 Open Addressing. 5.5 Rehashing. 5.6 Extendible Hashing. 5. 5. Hashing 5.1 General Idea 5.2 Hash Function 5.3 Separate Chaining 5.4 Open Addressing 5.5 Rehashing 5.6 Extendible Hashing Malek Mouhoub, CS340 Fall 2004 1 5. Hashing Sequential access : O(n). Binary

More information

Introducing Robotics Vision System to a Manufacturing Robotics Course

Introducing Robotics Vision System to a Manufacturing Robotics Course Paper ID #16241 Introducing Robotics Vision System to a Manufacturing Robotics Course Dr. Yuqiu You, Ohio University c American Society for Engineering Education, 2016 Introducing Robotics Vision System

More information

Quadrilaterals Mini- Lesson

Quadrilaterals Mini- Lesson Quadrilaterals Mini- Lesson Students investigate and compare the characteristics of quadrilaterals. This activity helps students to: Identify the characteristics (equal side length, equal angle, lines

More information

Section 1: Introduction to Geometry Points, Lines, and Planes

Section 1: Introduction to Geometry Points, Lines, and Planes Section 1: Introduction to Geometry Points, Lines, and Planes Topic 1: Basics of Geometry - Part 1... 3 Topic 2: Basics of Geometry Part 2... 5 Topic 3: Midpoint and Distance in the Coordinate Plane Part

More information

! Good algorithms also extend to higher dimensions. ! Curse of dimensionality. ! Range searching. ! Nearest neighbor.

! Good algorithms also extend to higher dimensions. ! Curse of dimensionality. ! Range searching. ! Nearest neighbor. Geometric search: Overview Geometric Algorithms Types of data. Points, lines, planes, polygons, circles,... This lecture. Sets of N objects. Geometric problems extend to higher dimensions.! Good algorithms

More information

Data Structure and Algorithm Homework #3 Due: 2:20pm, Tuesday, April 9, 2013 TA === Homework submission instructions ===

Data Structure and Algorithm Homework #3 Due: 2:20pm, Tuesday, April 9, 2013 TA   === Homework submission instructions === Data Structure and Algorithm Homework #3 Due: 2:20pm, Tuesday, April 9, 2013 TA email: dsa1@csientuedutw === Homework submission instructions === For Problem 1, submit your source code, a Makefile to compile

More information

Geometric Search. range search space partitioning trees intersection search. range search space partitioning trees intersection search.

Geometric Search. range search space partitioning trees intersection search. range search space partitioning trees intersection search. Overview Geometric Search range search space partitioning trees intersection search Types of data. Points, lines, circles, rectangles, planes, polygons,... This lecture. Intersection among N objects. Example

More information

Efficient View-Dependent Sampling of Visual Hulls

Efficient View-Dependent Sampling of Visual Hulls Efficient View-Dependent Sampling of Visual Hulls Wojciech Matusik Chris Buehler Leonard McMillan Computer Graphics Group MIT Laboratory for Computer Science Cambridge, MA 02141 Abstract In this paper

More information