Comparison of Compressed Quadtrees and Compressed k-d Tries for Range Search

Size: px
Start display at page:

Download "Comparison of Compressed Quadtrees and Compressed k-d Tries for Range Search"

Transcription

1 Comparison of Compressed Quadtrees and Compressed k-d Tries for Range Search Nathan Scott December 19, 2005

2 1 Introduction There is an enourmous number of data structures in existence to represent spatial data, as evidenced by the survey provided by Samet in [6]. While there are many operations one would like to perform on spatial data, a common one is an orthogonal range search. An orthogonal range query provides a hyperrectangular region, parallel to the axes, and asks what points or objects are contained within. Performance is usually measured with respect to the number of points contained in the structure, considering the dimension fixed. This project considers two particular data structures, the Compressed Point-Region Quadtree (PRQT) and the Compressed k-d Trie (KDT), and compares their experimental results for range search with particular attention to how well each structure is able to handle the move to higher dimensions. Sections 2 and 3 provide a description of the compressed PRQT and KDT, respectively. Section 4 presents the experimental results, showing the average size of a PRQT (the size of the KDT is constant) and the average number of nodes visited in range queries when the number of points found is in. Finally section 5 discusses possible explanations for the results obtained, as well as some commentary on possible improvements to be made. 1

3 2 Compressed Point-Region Quadtrees Point-Region Quadtrees (PRQTs) are a way of storing 2-dimensional point data. A PRQT consists of a tree with a branching factor of 4. Each node covers a square region of space (referred hereafter as a quad). Points are stored at the leaf level, and internal nodes divide their quad into 4 subquadrants (North-East, South-East, South-West, and North-West) in such a way that the quads represented by the leaf nodes each contain at most one point. Figure 1 shows a simple PRQT example. Figure 1: An example of a PRQT and a visualization of how space is divided by it. PRQTs can be extended to more than 2 dimensions. In 3 dimensions, internal nodes would divide their cover space into 8 subregions, and such a tree would be called a PR Octtree. In k dimensions, internal nodes divide their cover space into 2 k subregions, and we could refer to the tree as a kr-dimensional hyperocttree. Throughout this paper, the terms PRQT, quadtree, and quad refer to the k-dimensional analogue of the 2-d definitions above, despite the slightly inaccurate usage of the word quad. In this report, internal nodes are sometimes referred to as grey nodes. Leaf nodes can be either white (when they are empty) or black (they contain a point). The midpoint of a node is the point within the quad covered by the node that is the midpoint along every dimension of the quad. One problem with the PRQT is that the size of the resulting tree for a given set of data is highly dependent on the distribution of points. Given two points with arbitrarily small Euclidean distance between them, the height of the resulting tree can be arbitrarily large.[6] Figure 2 shows an example 2

4 of this. Clarkson [2] introduced a compressed version of the PRQT. The compressed PRQT is identical to the ordinary PRQT, with the additional constraint that every internal node in the tree has at least two non-empty children. In this way, only internal nodes that provide useful information (divide the points within its cover space into different quads) are retained. Figure 3 shows the compressed quadtree resolution of the example from figure 2. Figure 2: An example of a very tall PRQT with few points. 2.1 Construction Different algorithms have been presented to construct a compressed PRQT. Clarkson initially described a randomized algorithm that constructs a k- d PRQT from n points in O(c k n log n) time. Bern gives a deterministic algorithm with a running time in O((ck) k n log n). Assuming a uniformly distributed data set, a compressed PRQT that contains n points has height O(log 2 k n). The branching factor of a k-d PRQT is 2 k. Thus a compressed PRQT containing n points in this situation will have O(n) nodes. This presumes a nice, evenly spaced data set where there are no white nodes and the tree is no taller than it needs to be. In the worst 3

5 Figure 3: An example of a compressed PRQT. case a compressed PRQT can still have height O(n), and so contain O(2 nk ) nodes. This project uses a straightforward, iterative insertion method to construct a compressed PRQT. Given a list of points, each point is inserted sequentially as if they were being encountered in a dynamic environment, without any preprocessing involved. Thus the complexity of the construction algorithm used is O(nf(n)) where f(n) is the complexity of the insertion operation. This project was concerned with analysing performance for range search, and so efficient construction was not a priority. 2.2 Insertion To insert a point P into a compressed PRQT, we start at the root and follow the tree down to the leaf level, similar to searching a binary search tree. At each grey node encountered, the point P may lie outside of that node s quad, because of compression. Presuming this does not happen, we will eventually reach a leaf node A. If A is white, we replace it with a black node covering the same quad, containing the point P. If A is black, we replace it with a new grey node G covering A s quad. If the point contained in A and P are within different subquads of G, we insert them into the appropriate ones. Otherwise, we shrink G s quad down until the two points lie in different subquads. These three cases are illustrated in figure 4. If along our traversal of the tree we reach a grey node G and P is outside of G s quad, we have to reconfigure the tree at this point. We construct a 4

6 Figure 4: Examples of the three different possibilities of inserting a new point into a PRQT. 5

7 new grey node G that covers the appropriate subquad of the parent of G. Then we perform the shrinking operation described above until P and the midpoint of G lie within different subquads of G. As it is currently implemented, the number of subdivisions required by the shrinking process depends on the Euclidean distance between the two points. Suppose the width of all of space (or space covered by the root node) is W, the Euclidean distance between two points being seperated via the shrinking process is d, and the number of divisions of the quad is q. Each division reduces the covered space by a factor of 2 along each dimension, and so after q divisions for the two points to fall into two subquads necessarily (even in the worst case), d W must be true. Thus 2 ( q+1) 2q+1 W or q log W log d. d Therefore Ω(log W ) divisions will occur in the worst case. Presuming the more favorable height of a compressed PRQT (see section 2.1) of O(log k n), insertion runs in time Ω(log k n + log W ). This analysis assumes integer points, otherwise it is not even obvious that the shrinking process will terminate (given infinitesimally small d). 2.3 Range Search Advanced algorithms have been given to perform point searches on compressed PRQT, and most extensions of the PRQT involve auxiliary data structures.[1] However, this project looks at the straightforward range search algorithm implied by [6]. Given a hyperrectangular query region and a node to search, we recursively search the children of that node based on the intersection of the query region and the quad covered by the children. There are three outcomes of this intersection, described in 5. Figure 5: The three outcomes of comparing a quad with the query rectangle. 6

8 Algorithm 1 RANGE QUERY(PRQTNode N, QueryRectangle Q, PointList result) {RECT INT decides whether two query rectangles intersect or if one is contained in the other.} {POINT IN RECT decides if a point is contained within a rectangular region.} {REPORT ALL POINTS adds all points contained within a subtree to the list.} if N.Colour = WHITE then do nothing else if N.Colour = BLACK then if POINT IN RECT(N.Data, Q) = TRUE then add N.Data to result end if else {N.Colour = GREY} for all children C i of N do if RECT INT(C i.coverspace, Q) = WITHIN then REPORT ALL POINTS(C i, result) {This child is entirely within the query rectangle.} else if RECT INT(C i.coverspace, Q) = INTERSECT then RANGE QUERY(C i, Q, result) {Recurse.} else {RECT INT returned NO INTERSECT} continue end if end for end if Analysis of range search is tricky. A worst case analysis gives a running time of O(N) where N is the number of nodes in the tree. This is easily seen by constructing a case where the data lies along the perimeter of the shell of space that the tree covers. Assuming a uniform distribution of points, a worst case query would be one that intersected the entire space along all dimensions except for one (i), which is just barely straddles the midpoint of. At the root, all 2 k children are hit by such a query. Within each of these, the query would intersect with half of their children (the ones along that are closest to the midpoint of dimension i), that is 2 k 1 of them. So at level 1 (level 0 being the root) there are 2 k 2 k 1 = 2 2k 1 nodes visited. At level 2, each of the 2 2k 1 nodes at level 1 have another 2 k 1 intersecting children, for 7

9 a total of 2 3k 2. Thus in the end a total of log k n i=1 2 ik i 1 nodes visited. See figure 6 for illustrations of these examples. Figure 6: Examples of bad query rectangles for a PRQT with a poor distribution of data and with uniformly distributed data. 8

10 3 Compressed k-d Tries A trie is a well known data structure that stores finite sequences of some alphabet for effecient search and retrieval. A trie is a tree of nodes, wherein internal nodes at level i branch on the i th symbol of the sequences stored. The data itself is stored at the leaf level. The Patricia trie (or compressed trie), due to Morrison, is obtained, much like with PRQTs, by adding the constraint that every internal node has at least 2 children. Sequences of symbols that would have come from a sequence of one-child internal nodes are collected into a skip string that internal nodes now store. A binary Patricia trie is a Patricia trie on the alphabet 0, 1, and therefore all internal nodes have exactly 2 nodes. Shi and Nickerson showed how to use a binary Patricia trie to perform range queries on combined spatial and textual data.[7] This project is only concerned with spatial data, but this is an easy adaptation of their work. Hereafter these binary Patricia tries are referred to as compressed k-d tries or compressed KDTs. A compressed KDT stores k-d point data by representing the points as binary strings, which are then inserted into the trie. The binary strings are obtained by interleaving the bits of each dimension s value. Let P be a point with b bits of precision along k dimensions. Thus P = (p 11 p p 1b, p 21 p p 2b,..., p k1 p k2... p kb ). Then P = (p 11 p p k1 p 12 p p k2... p 1b p 2b... p kb ) is the binary string of interleaved bits that the trie will store. See figure 7 for an example KDT for a set of points. 3.1 Construction As we will see in section 3.2, inserting a point into a KDT creates exactly two more nodes. A KDT with 1 point has exactly one node. Therefore a KDT containing n points has exactly 2n 1 nodes. In the worst case, a KDT containing n points will have a height of O(n) nodes. Assuming a uniform distribution of points, we would expect each node to split the number of points in half and so a balanced KDT of height O(log n) to result. In terms of the actual the bit strings stored, a KDT containing n points of k-d data with b bits per dimension has a constant height of kb bits. 9

11 Figure 7: Simple example of a KDT containing 2-d integer points, 4 bits per dimension. Construction of compressed KDTs was implemented the same way as it was for PRQTs: repeated insertion of points. Thus the construction algorithm used was again O(nf(n)) where f(n) is the running time of the insertion algorithm. It turns out that our insertion algorithm has f(n) based on the height of the tree, and so presuming the resulting KDT is balanced the construction takes O(n log n) time. 3.2 Insertion The insertion algorithm implemented is an adaptation of the one presented in [7]. Starting at the root, we follow the tree down for as long as the prefix of our node matches the path that we have followed so far. Once we reach a node where the new point diverges from that node s skip string, we replace that node with a new node with 2 children: one is the remainder of the subtree that followed the node we split on, and one is a new leaf node with the new point stored within. See figure 8 for an example. The running time of this algorithm is O(h) where h is the height of the trie. 10

12 Figure 8: Inserting the point (4, 12) = (0100, 1100) = ( ) into a KDT. 3.3 Range search The range search algorithm implemented is adapted from [7]. At each bit p i visited along the tree (either via a branch or looking at a skip string) the cover space of the node is divided in half along dimension imodk, based on if p i = 1 or 0. That dimension of the cover space is compared against the query region to produce results similar to those in 2.3. If the node s cover space is within the query region (black) along all k dimensions, then we can report all points. If the node s cover space is entirely outside the query region (white) along any of the k dimensions, we can prune the subtree rooted at that node. Otherwise, we recurse and continue searching. Pseudocode is given as algorithm 2. [7] provides thorough analysis of the theoretical performance of range search on KDTs. 11

13 Algorithm 2 RANGE QUERY(KDTNode N, int level, CoverSpace C, QueryRectangle Q, Colour[] RI, PointList result) {IN RANGE returns WHITE, GREY, or BLACK depending on the intervals overlap along the given dimension.} {GET COLOUR looks at an array of Colours and determines if it is all black, mixed black and grey, or white.} if N is a leaf then if POINT IN RECT(N.Data, Q) then add N.Data to result end if else i 0 while i < N.SkipString.length do p levelmodk if N.SkipString i = 0 then C.Upper p (C.Lower p + C.Upper p )/2 else {N.SkipString i = 1} C.Lower p (C.Lower p + C.Upper p )/2 end if RI p IN RANGE(C, Q, p) i i + 1 level level + 1 end while colour GET COLOUR(RI) if colour = GREY then {We need to recurse.} p levelmodk if N.Left nil then C.Upper p (C.Lower p + C.Upper p )/2 RI p IN RANGE(C, Q, p) RANGE QUERY(N.Lef t, level, C, Q, RI, result) end if if N.Right nil then C.Lower p (C.Lower p + C.Upper p )/2 RI p IN RANGE(C, Q, p) RANGE QUERY(N.Right, level, C, Q, RI, result) end if else if colour = BLACK then REPORT ALL POINTS(N, result) end if 12 end if

14 4 Results Both the PRQT and KDT were implemented in C++ using the Standard Template Library (STL). They were compiled with g++, with optimization enabled. Source and makefiles are available online at: Alternately, visit and follow the appropriate link. The structures were tested for dimensions 2 k 8, and for n = 1000, 10000, , For each case, 20 random data sets were generated, and 500 random range queries were performed. Tests were performed on a machine running Fedora Core Linux, on an AMD processor (2.2 Ghz) with 2 Gigabytes of RAM. 4.1 Space The limiting factor in terms of comparing the two structures directly was the failure of the PRQT to scale to higher dimensions. As discussed in 3.1, the number of nodes in a KDT is dependent only on the number of points, and not the dimension or distribution. The number of nodes in a PRQT, on the other hand, is highly dependent on both the dimension of data and the distribution of points. For a graph of the average size of a PRQT with a given number of points was plotted against the dimension of data. As the dimension increases, the number of nodes in the tree increases exponentially. See figures 4.1 and Range Search For each range query performed, the number of points reported (A) was classified into one of 4 groups: A [0, (log n) 1 2 ), A [(log n) 1 2, log n), A [log n, (log n) 2 ), and A [(log n) 2, n]. The number of nodes visted for each of the searches in these categories was then averaged. Results for the first three groups were plotted against the dimension of data for n = 1000, 10000, , See figures 4.2, 4.2, 4.2, and

15 Figure 9: Average size of PRQT with 1000 and points in k dimensions. 14

16 Figure 10: Average size of PRQT with and points in k dimensions. 15

17 Figure 11: Average number of nodes visted during a range search for a PRQT and KDT with 1000 points in k dimensions. 16

18 Figure 12: Average number of nodes visted during a range search for a PRQT and KDT with points in k dimensions. 17

19 Figure 13: Average number of nodes visted during a range search for a PRQT and KDT with points in k dimensions. 18

20 Figure 14: Average number of nodes visted during a range search for a PRQT and KDT with points in k dimensions. 19

21 5 Conclusions It seems clear that the KDT outperforms the PRQT for range search. While the two are comparable at lower dimensions, the PRQT quickly becomes unweildy at dimensions 4. In fact, looking closely at the number of nodes visited by the PRQT for N = 1000, 10000, , at a certain value of k we visit more nodes than there are actually points. While actual performance comparison against a naïve search was not done, it seems clear that for sparse data naïve search should outperform the PRQT. The reason for this is that the PRQT contains huge numbers of wasted nodes that represent nothing but empty space but must be visited by the search algorithm nonetheless. The PRQT guarantees that every internal node has at least 2 non-empty children. For k = 2, this means that at least half of the child nodes of an internal node contains data. Another way to look at this is at most half of the children of internal nodes are wasted. However, as k grows the ratio of informative nodes to wasted ones shrinks exponentially. For example, with k = 8 the compression only guarantees that 1 = 1 of the nodes actually contain data However, for a fixed k it seems that given a large enough n the PRQT becomes more efficient in that it spends less time searching empty space. For example, with k = 8 and n = the average range query did not visit more than nodes, where with fewer points more nodes were visited than points in the structure. The overall number of nodes visited is still huge compared to the KDT. The other major factor to consider is storage. The huge number of nodes in the PRQT quickly made it an unfeasible data structure for high dimensional data. While results are not presented for k > 8, the KDT has been tested on individual cases of points of 20 dimensional data successfully. For points, k > 8 dimensional PRQTs were not possible to successfully construct on the test system. Since the branching factor of the PRQT is 2 k, an exponential (in terms of the dimension) number of nodes are added every time two points lie within the same quad. For small values of k (2, 3) this seems to be reasonable. For higher values of k the tree quickly becomes too large to handle. An illustrative metaphor may be to consider the leaf nodes of a PRQT like buckets in some sort of hashing system. When we insert a k-d point into the PRQT, if there is a collision (in our case, two points lying too close together), it costs us 2 k in storage. The total space then depends on the 20

22 number of these collisions among thousands of points, rather than directly on the number of points themselves. There are several different improvements/implementations of the basic PRQT, some of which are summarized in [1]. It is not clear to what extent the problems with the PRQT described here apply to these other structures. The most obvious improvement I would recommend for the PRQT is to simply not construct the white nodes, and access the 1 to 2 k children of an internal node via some other means (such as a list or a hash table). Accessing a particular child can no longer be considered a constant time operation, but it will likely save an exponential amount of space, as well as an exponential number of nodes visted in range queries. Even if the range search time is slower, the savings in space would at least allow the data structure to be feasible for higher dimensional data. In all respects it seems that the KDT outperforms the PRQT, especially with higher dimensional data. It may be interesting to note that analysing the KDT s performance in terms of nodes visited is not necessarily entirely accurate, as differing amounts of work is performed at different nodes. However it still seems to be a reasonable estimate of search performance. 21

23 References [1] Srinivas Aluru and Fatih E. Sevilgen. Dynamic compressed hyperoctrees with application to the n-body problem. In Proceedings of the 19th International Confrence on the Foundations of Software Technology and Theoretical Computer Science, pages 21 33, Chennai, India, [2] Kenneth Lee Clarkson. Algorithms for Closest-Point Problems. PhD thesis, Stanford University, [3] D. Eppstein, M. T. Goodrich, and J. Z. Sun. The skip quadtree: A simple dynamic data structure for multidimensional data. In Proceedings of the 21st ACM Symposium on Computational Geometry, pages , Pisa, Italy, [4] P. Flajolet and C. Puech. Partial match retrieval of multidimensional data. Journal of the Association for Computing Machinery, 33(2): , [5] J. A. Orenstein. Multidimensional tries used for associative searching. Information Processing Letters, 14(4): , [6] Hanan Samet. Design And Analysis Of Spatial Data Structures. Selfpublished, College Park, MD, USA, [7] Q. Shi and B. Nickerson. k-d range search with binary patricia tries. Technical report, University of New Brunswick, Fredericton, NB,

Organizing Spatial Data

Organizing Spatial Data Organizing Spatial Data Spatial data records include a sense of location as an attribute. Typically location is represented by coordinate data (in 2D or 3D). 1 If we are to search spatial data using the

More information

Friday Four Square! 4:15PM, Outside Gates

Friday Four Square! 4:15PM, Outside Gates Binary Search Trees Friday Four Square! 4:15PM, Outside Gates Implementing Set On Monday and Wednesday, we saw how to implement the Map and Lexicon, respectively. Let's now turn our attention to the Set.

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

Image Rotation Using Quad Tree

Image Rotation Using Quad Tree 80 Image Rotation Using Quad Tree Aashish Kumar, Lec. ECE Dept. Swami Vivekanand institute of Engneering & Technology, Ramnagar Banur ABSTRACT This paper presents a data structure based technique of rotating

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 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

Announcements. Written Assignment2 is out, due March 8 Graded Programming Assignment2 next Tuesday

Announcements. Written Assignment2 is out, due March 8 Graded Programming Assignment2 next Tuesday Announcements Written Assignment2 is out, due March 8 Graded Programming Assignment2 next Tuesday 1 Spatial Data Structures Hierarchical Bounding Volumes Grids Octrees BSP Trees 11/7/02 Speeding Up Computations

More information

Hash Tables. CS 311 Data Structures and Algorithms Lecture Slides. Wednesday, April 22, Glenn G. Chappell

Hash Tables. CS 311 Data Structures and Algorithms Lecture Slides. Wednesday, April 22, Glenn G. Chappell Hash Tables CS 311 Data Structures and Algorithms Lecture Slides Wednesday, April 22, 2009 Glenn G. Chappell Department of Computer Science University of Alaska Fairbanks CHAPPELLG@member.ams.org 2005

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

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

Chapter 11: Indexing and Hashing

Chapter 11: Indexing and Hashing Chapter 11: Indexing and Hashing Basic Concepts Ordered Indices B + -Tree Index Files B-Tree Index Files Static Hashing Dynamic Hashing Comparison of Ordered Indexing and Hashing Index Definition in SQL

More information

Lecture 5. Treaps Find, insert, delete, split, and join in treaps Randomized search trees Randomized search tree time costs

Lecture 5. Treaps Find, insert, delete, split, and join in treaps Randomized search trees Randomized search tree time costs Lecture 5 Treaps Find, insert, delete, split, and join in treaps Randomized search trees Randomized search tree time costs Reading: Randomized Search Trees by Aragon & Seidel, Algorithmica 1996, http://sims.berkeley.edu/~aragon/pubs/rst96.pdf;

More information

1. Meshes. D7013E Lecture 14

1. Meshes. D7013E Lecture 14 D7013E Lecture 14 Quadtrees Mesh Generation 1. Meshes Input: Components in the form of disjoint polygonal objects Integer coordinates, 0, 45, 90, or 135 angles Output: A triangular mesh Conforming: A triangle

More information

The Unified Segment Tree and its Application to the Rectangle Intersection Problem

The Unified Segment Tree and its Application to the Rectangle Intersection Problem CCCG 2013, Waterloo, Ontario, August 10, 2013 The Unified Segment Tree and its Application to the Rectangle Intersection Problem David P. Wagner Abstract In this paper we introduce a variation on the multidimensional

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

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

CS251-SE1. Midterm 2. Tuesday 11/1 8:00pm 9:00pm. There are 16 multiple-choice questions and 6 essay questions.

CS251-SE1. Midterm 2. Tuesday 11/1 8:00pm 9:00pm. There are 16 multiple-choice questions and 6 essay questions. CS251-SE1 Midterm 2 Tuesday 11/1 8:00pm 9:00pm There are 16 multiple-choice questions and 6 essay questions. Answer the multiple choice questions on your bubble sheet. Answer the essay questions in the

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

CIS265/ Trees Red-Black Trees. Some of the following material is from:

CIS265/ Trees Red-Black Trees. Some of the following material is from: CIS265/506 2-3-4 Trees Red-Black Trees Some of the following material is from: Data Structures for Java William H. Ford William R. Topp ISBN 0-13-047724-9 Chapter 27 Balanced Search Trees Bret Ford 2005,

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

CSIT5300: Advanced Database Systems

CSIT5300: Advanced Database Systems CSIT5300: Advanced Database Systems L08: B + -trees and Dynamic Hashing Dr. Kenneth LEUNG Department of Computer Science and Engineering The Hong Kong University of Science and Technology Hong Kong SAR,

More information

kd-trees Idea: Each level of the tree compares against 1 dimension. Let s us have only two children at each node (instead of 2 d )

kd-trees Idea: Each level of the tree compares against 1 dimension. Let s us have only two children at each node (instead of 2 d ) kd-trees Invented in 1970s by Jon Bentley Name originally meant 3d-trees, 4d-trees, etc where k was the # of dimensions Now, people say kd-tree of dimension d Idea: Each level of the tree compares against

More information

We assume uniform hashing (UH):

We assume uniform hashing (UH): We assume uniform hashing (UH): the probe sequence of each key is equally likely to be any of the! permutations of 0,1,, 1 UH generalizes the notion of SUH that produces not just a single number, but a

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

CMSC 425: Lecture 10 Geometric Data Structures for Games: Index Structures Tuesday, Feb 26, 2013

CMSC 425: Lecture 10 Geometric Data Structures for Games: Index Structures Tuesday, Feb 26, 2013 CMSC 2: Lecture 10 Geometric Data Structures for Games: Index Structures Tuesday, Feb 2, 201 Reading: Some of today s materials can be found in Foundations of Multidimensional and Metric Data Structures,

More information

Chapter 12: Indexing and Hashing. Basic Concepts

Chapter 12: Indexing and Hashing. Basic Concepts Chapter 12: Indexing and Hashing! Basic Concepts! Ordered Indices! B+-Tree Index Files! B-Tree Index Files! Static Hashing! Dynamic Hashing! Comparison of Ordered Indexing and Hashing! Index Definition

More information

Multi-way Search Trees. (Multi-way Search Trees) Data Structures and Programming Spring / 25

Multi-way Search Trees. (Multi-way Search Trees) Data Structures and Programming Spring / 25 Multi-way Search Trees (Multi-way Search Trees) Data Structures and Programming Spring 2017 1 / 25 Multi-way Search Trees Each internal node of a multi-way search tree T: has at least two children contains

More information

External-Memory Algorithms with Applications in GIS - (L. Arge) Enylton Machado Roberto Beauclair

External-Memory Algorithms with Applications in GIS - (L. Arge) Enylton Machado Roberto Beauclair External-Memory Algorithms with Applications in GIS - (L. Arge) Enylton Machado Roberto Beauclair {machado,tron}@visgraf.impa.br Theoretical Models Random Access Machine Memory: Infinite Array. Access

More information

Indexing. Week 14, Spring Edited by M. Naci Akkøk, , Contains slides from 8-9. April 2002 by Hector Garcia-Molina, Vera Goebel

Indexing. Week 14, Spring Edited by M. Naci Akkøk, , Contains slides from 8-9. April 2002 by Hector Garcia-Molina, Vera Goebel Indexing Week 14, Spring 2005 Edited by M. Naci Akkøk, 5.3.2004, 3.3.2005 Contains slides from 8-9. April 2002 by Hector Garcia-Molina, Vera Goebel Overview Conventional indexes B-trees Hashing schemes

More information

Range Tree Applications in Computational Geometry

Range Tree Applications in Computational Geometry Range Tree Applications in Computational Geometry ANTONIO-GABRIEL STURZU, COSTIN-ANTON BOIANGIU Computer Science Department Politehnica University of Bucharest Splaiul Independentei 313, Sector 6, Bucharest,

More information

Chapter 12: Indexing and Hashing

Chapter 12: Indexing and Hashing Chapter 12: Indexing and Hashing Basic Concepts Ordered Indices B+-Tree Index Files B-Tree Index Files Static Hashing Dynamic Hashing Comparison of Ordered Indexing and Hashing Index Definition in SQL

More information

Ray Tracing with Spatial Hierarchies. Jeff Mahovsky & Brian Wyvill CSC 305

Ray Tracing with Spatial Hierarchies. Jeff Mahovsky & Brian Wyvill CSC 305 Ray Tracing with Spatial Hierarchies Jeff Mahovsky & Brian Wyvill CSC 305 Ray Tracing Flexible, accurate, high-quality rendering Slow Simplest ray tracer: Test every ray against every object in the scene

More information

Module 2: Classical Algorithm Design Techniques

Module 2: Classical Algorithm Design Techniques Module 2: Classical Algorithm Design Techniques Dr. Natarajan Meghanathan Associate Professor of Computer Science Jackson State University Jackson, MS 39217 E-mail: natarajan.meghanathan@jsums.edu Module

More information

9/24/ Hash functions

9/24/ Hash functions 11.3 Hash functions A good hash function satis es (approximately) the assumption of SUH: each key is equally likely to hash to any of the slots, independently of the other keys We typically have no way

More information

The Adaptive Radix Tree

The Adaptive Radix Tree Department of Informatics, University of Zürich MSc Basismodul The Adaptive Radix Tree Rafael Kallis Matrikelnummer: -708-887 Email: rk@rafaelkallis.com September 8, 08 supervised by Prof. Dr. Michael

More information

Advances in Data Management Principles of Database Systems - 2 A.Poulovassilis

Advances in Data Management Principles of Database Systems - 2 A.Poulovassilis 1 Advances in Data Management Principles of Database Systems - 2 A.Poulovassilis 1 Storing data on disk The traditional storage hierarchy for DBMSs is: 1. main memory (primary storage) for data currently

More information

Database System Concepts, 6 th Ed. Silberschatz, Korth and Sudarshan See for conditions on re-use

Database System Concepts, 6 th Ed. Silberschatz, Korth and Sudarshan See  for conditions on re-use Chapter 11: Indexing and Hashing Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Chapter 12: Indexing and Hashing Basic Concepts Ordered Indices B + -Tree Index Files Static

More information

An improvement in the build algorithm for Kd-trees using mathematical mean

An improvement in the build algorithm for Kd-trees using mathematical mean An improvement in the build algorithm for Kd-trees using mathematical mean Priyank Trivedi, Abhinandan Patni, Zeon Trevor Fernando and Tejaswi Agarwal School of Computing Sciences and Engineering, VIT

More information

CSE100. Advanced Data Structures. Lecture 8. (Based on Paul Kube course materials)

CSE100. Advanced Data Structures. Lecture 8. (Based on Paul Kube course materials) CSE100 Advanced Data Structures Lecture 8 (Based on Paul Kube course materials) CSE 100 Treaps Find, insert, delete, split, and join in treaps Randomized search trees Randomized search tree time costs

More information

Lecture 25 of 41. Spatial Sorting: Binary Space Partitioning Quadtrees & Octrees

Lecture 25 of 41. Spatial Sorting: Binary Space Partitioning Quadtrees & Octrees Spatial Sorting: Binary Space Partitioning Quadtrees & Octrees William H. Hsu Department of Computing and Information Sciences, KSU KSOL course pages: http://bit.ly/hgvxlh / http://bit.ly/evizre Public

More information

Balanced Search Trees

Balanced Search Trees Balanced Search Trees Computer Science E-22 Harvard Extension School David G. Sullivan, Ph.D. Review: Balanced Trees A tree is balanced if, for each node, the node s subtrees have the same height or have

More information

R-Trees. Accessing Spatial Data

R-Trees. Accessing Spatial Data R-Trees Accessing Spatial Data In the beginning The B-Tree provided a foundation for R- Trees. But what s a B-Tree? A data structure for storing sorted data with amortized run times for insertion and deletion

More information

A Secondary storage Algorithms and Data Structures Supplementary Questions and Exercises

A Secondary storage Algorithms and Data Structures Supplementary Questions and Exercises 308-420A Secondary storage Algorithms and Data Structures Supplementary Questions and Exercises Section 1.2 4, Logarithmic Files Logarithmic Files 1. A B-tree of height 6 contains 170,000 nodes with an

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

R16 SET - 1 '' ''' '' ''' Code No: R

R16 SET - 1 '' ''' '' ''' Code No: R 1. a) Define Latency time and Transmission time? (2M) b) Define Hash table and Hash function? (2M) c) Explain the Binary Heap Structure Property? (3M) d) List the properties of Red-Black trees? (3M) e)

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

Search for Approximate Matches in Large Databases *

Search for Approximate Matches in Large Databases * Search for Approximate Matches in Large Databases * Eugene Fink Language Technologies Carnegie Mellon University Pittsburgh, PA 15213 e.fink@cs.cmu.edu Philip Hayes DYNAMiX Technologies 12330 Perry Highway

More information

In-Memory Searching. Linear Search. Binary Search. Binary Search Tree. k-d Tree. Hashing. Hash Collisions. Collision Strategies.

In-Memory Searching. Linear Search. Binary Search. Binary Search Tree. k-d Tree. Hashing. Hash Collisions. Collision Strategies. In-Memory Searching Linear Search Binary Search Binary Search Tree k-d Tree Hashing Hash Collisions Collision Strategies Chapter 4 Searching A second fundamental operation in Computer Science We review

More information

Lecture 17: Solid Modeling.... a cubit on the one side, and a cubit on the other side Exodus 26:13

Lecture 17: Solid Modeling.... a cubit on the one side, and a cubit on the other side Exodus 26:13 Lecture 17: Solid Modeling... a cubit on the one side, and a cubit on the other side Exodus 26:13 Who is on the LORD's side? Exodus 32:26 1. Solid Representations A solid is a 3-dimensional shape with

More information

CS350: Data Structures B-Trees

CS350: Data Structures B-Trees B-Trees James Moscola Department of Engineering & Computer Science York College of Pennsylvania James Moscola Introduction All of the data structures that we ve looked at thus far have been memory-based

More information

Radix Searching. The insert procedure for digital search trees also derives directly from the corresponding procedure for binary search trees:

Radix Searching. The insert procedure for digital search trees also derives directly from the corresponding procedure for binary search trees: Radix Searching The most simple radix search method is digital tree searching - the binary search tree with the branch in the tree according to the bits of keys: at the first level the leading bit is used,

More information

Research Collection. Cluster-Computing and Parallelization for the Multi-Dimensional PH-Index. Master Thesis. ETH Library

Research Collection. Cluster-Computing and Parallelization for the Multi-Dimensional PH-Index. Master Thesis. ETH Library Research Collection Master Thesis Cluster-Computing and Parallelization for the Multi-Dimensional PH-Index Author(s): Vancea, Bogdan Aure Publication Date: 2015 Permanent Link: https://doi.org/10.3929/ethz-a-010437712

More information

Balanced Binary Search Trees. Victor Gao

Balanced Binary Search Trees. Victor Gao Balanced Binary Search Trees Victor Gao OUTLINE Binary Heap Revisited BST Revisited Balanced Binary Search Trees Rotation Treap Splay Tree BINARY HEAP: REVIEW A binary heap is a complete binary tree such

More information

(2,4) Trees Goodrich, Tamassia (2,4) Trees 1

(2,4) Trees Goodrich, Tamassia (2,4) Trees 1 (2,4) Trees 9 2 5 7 10 14 2004 Goodrich, Tamassia (2,4) Trees 1 Multi-Way Search Tree A multi-way search tree is an ordered tree such that Each internal node has at least two children and stores d -1 key-element

More information

Chapter 12: Indexing and Hashing

Chapter 12: Indexing and Hashing Chapter 12: Indexing and Hashing Database System Concepts, 5th Ed. See www.db-book.com for conditions on re-use Chapter 12: Indexing and Hashing Basic Concepts Ordered Indices B + -Tree Index Files B-Tree

More information

Search trees, binary trie, patricia trie Marko Berezovský Radek Mařík PAL 2012

Search trees, binary trie, patricia trie Marko Berezovský Radek Mařík PAL 2012 Search trees, binary trie, patricia trie Marko Berezovský Radek Mařík PAL 212 p 2

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

Algorithms. Deleting from Red-Black Trees B-Trees

Algorithms. Deleting from Red-Black Trees B-Trees Algorithms Deleting from Red-Black Trees B-Trees Recall the rules for BST deletion 1. If vertex to be deleted is a leaf, just delete it. 2. If vertex to be deleted has just one child, replace it with that

More information

TREES. Trees - Introduction

TREES. Trees - Introduction TREES Chapter 6 Trees - Introduction All previous data organizations we've studied are linear each element can have only one predecessor and successor Accessing all elements in a linear sequence is O(n)

More information

CS 251, LE 2 Fall MIDTERM 2 Tuesday, November 1, 2016 Version 00 - KEY

CS 251, LE 2 Fall MIDTERM 2 Tuesday, November 1, 2016 Version 00 - KEY CS 251, LE 2 Fall 2016 MIDTERM 2 Tuesday, November 1, 2016 Version 00 - KEY W1.) (i) Show one possible valid 2-3 tree containing the nine elements: 1 3 4 5 6 8 9 10 12. (ii) Draw the final binary search

More information

Tree traversals and binary trees

Tree traversals and binary trees Tree traversals and binary trees Comp Sci 1575 Data Structures Valgrind Execute valgrind followed by any flags you might want, and then your typical way to launch at the command line in Linux. Assuming

More information

Stackless BVH Collision Detection for Physical Simulation

Stackless BVH Collision Detection for Physical Simulation Stackless BVH Collision Detection for Physical Simulation Jesper Damkjær Department of Computer Science, University of Copenhagen Universitetsparken 1, DK-2100, Copenhagen Ø, Denmark damkjaer@diku.dk February

More information

Intro to DB CHAPTER 12 INDEXING & HASHING

Intro to DB CHAPTER 12 INDEXING & HASHING Intro to DB CHAPTER 12 INDEXING & HASHING Chapter 12: Indexing and Hashing Basic Concepts Ordered Indices B+-Tree Index Files B-Tree Index Files Static Hashing Dynamic Hashing Comparison of Ordered Indexing

More information

8. Binary Search Tree

8. Binary Search Tree 8 Binary Search Tree Searching Basic Search Sequential Search : Unordered Lists Binary Search : Ordered Lists Tree Search Binary Search Tree Balanced Search Trees (Skipped) Sequential Search int Seq-Search

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

CSE 530A. B+ Trees. Washington University Fall 2013

CSE 530A. B+ Trees. Washington University Fall 2013 CSE 530A B+ Trees Washington University Fall 2013 B Trees A B tree is an ordered (non-binary) tree where the internal nodes can have a varying number of child nodes (within some range) B Trees When a key

More information

Search Trees. Computer Science S-111 Harvard University David G. Sullivan, Ph.D. Binary Search Trees

Search Trees. Computer Science S-111 Harvard University David G. Sullivan, Ph.D. Binary Search Trees Unit 9, Part 2 Search Trees Computer Science S-111 Harvard University David G. Sullivan, Ph.D. Binary Search Trees Search-tree property: for each node k: all nodes in k s left subtree are < k all nodes

More information

Chapter 12: Indexing and Hashing (Cnt(

Chapter 12: Indexing and Hashing (Cnt( Chapter 12: Indexing and Hashing (Cnt( Cnt.) Basic Concepts Ordered Indices B+-Tree Index Files B-Tree Index Files Static Hashing Dynamic Hashing Comparison of Ordered Indexing and Hashing Index Definition

More information

Question Bank Subject: Advanced Data Structures Class: SE Computer

Question Bank Subject: Advanced Data Structures Class: SE Computer Question Bank Subject: Advanced Data Structures Class: SE Computer Question1: Write a non recursive pseudo code for post order traversal of binary tree Answer: Pseudo Code: 1. Push root into Stack_One.

More information

CS535 Fall Department of Computer Science Purdue University

CS535 Fall Department of Computer Science Purdue University Spatial Data Structures and Hierarchies CS535 Fall 2010 Daniel G Aliaga Daniel G. Aliaga Department of Computer Science Purdue University Spatial Data Structures Store geometric information Organize geometric

More information

Indexing and Searching

Indexing and Searching Indexing and Searching Introduction How to retrieval information? A simple alternative is to search the whole text sequentially Another option is to build data structures over the text (called indices)

More information

Search trees, k-d tree Marko Berezovský Radek Mařík PAL 2012

Search trees, k-d tree Marko Berezovský Radek Mařík PAL 2012 Search trees, k-d tree Marko Berezovský Radek Mařík PAL 2012 p 2

More information

Chapter 11: Indexing and Hashing

Chapter 11: Indexing and Hashing Chapter 11: Indexing and Hashing Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Chapter 11: Indexing and Hashing Basic Concepts Ordered Indices B + -Tree Index Files B-Tree

More information

Chapter 11: Indexing and Hashing

Chapter 11: Indexing and Hashing Chapter 11: Indexing and Hashing Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Chapter 11: Indexing and Hashing Basic Concepts Ordered Indices B + -Tree Index Files B-Tree

More information

Notes on Project 1. version September 01, 2014

Notes on Project 1. version September 01, 2014 Notes on Project 1 version 1.44 September 01, 2014 1 Definitions Your program will keep a collection of rectangles which we refer to by C and a rectangle-quadtree which we refer to by T. The collection

More information

Data Structure. A way to store and organize data in order to support efficient insertions, queries, searches, updates, and deletions.

Data Structure. A way to store and organize data in order to support efficient insertions, queries, searches, updates, and deletions. DATA STRUCTURES COMP 321 McGill University These slides are mainly compiled from the following resources. - Professor Jaehyun Park slides CS 97SI - Top-coder tutorials. - Programming Challenges book. Data

More information

String Matching. Pedro Ribeiro 2016/2017 DCC/FCUP. Pedro Ribeiro (DCC/FCUP) String Matching 2016/ / 42

String Matching. Pedro Ribeiro 2016/2017 DCC/FCUP. Pedro Ribeiro (DCC/FCUP) String Matching 2016/ / 42 String Matching Pedro Ribeiro DCC/FCUP 2016/2017 Pedro Ribeiro (DCC/FCUP) String Matching 2016/2017 1 / 42 On this lecture The String Matching Problem Naive Algorithm Deterministic Finite Automata Knuth-Morris-Pratt

More information

Quadrant-Based MBR-Tree Indexing Technique for Range Query Over HBase

Quadrant-Based MBR-Tree Indexing Technique for Range Query Over HBase Quadrant-Based MBR-Tree Indexing Technique for Range Query Over HBase Bumjoon Jo and Sungwon Jung (&) Department of Computer Science and Engineering, Sogang University, 35 Baekbeom-ro, Mapo-gu, Seoul 04107,

More information

Spatial Data Structures

Spatial Data Structures CSCI 420 Computer Graphics Lecture 17 Spatial Data Structures Jernej Barbic University of Southern California Hierarchical Bounding Volumes Regular Grids Octrees BSP Trees [Angel Ch. 8] 1 Ray Tracing Acceleration

More information

Massive Data Algorithmics

Massive Data Algorithmics Database queries Range queries 1D range queries 2D range 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

More information

Binary Search Tree (2A) Young Won Lim 5/17/18

Binary Search Tree (2A) Young Won Lim 5/17/18 Binary Search Tree (2A) Copyright (c) 2015-2018 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or

More information

Spatial Data Structures

Spatial Data Structures 15-462 Computer Graphics I Lecture 17 Spatial Data Structures Hierarchical Bounding Volumes Regular Grids Octrees BSP Trees Constructive Solid Geometry (CSG) April 1, 2003 [Angel 9.10] Frank Pfenning Carnegie

More information

Spatial Data Structures

Spatial Data Structures CSCI 480 Computer Graphics Lecture 7 Spatial Data Structures Hierarchical Bounding Volumes Regular Grids BSP Trees [Ch. 0.] March 8, 0 Jernej Barbic University of Southern California http://www-bcf.usc.edu/~jbarbic/cs480-s/

More information

Data Structures and Algorithms

Data Structures and Algorithms Data Structures and Algorithms Data Structures static arrays if sorted, supports binary search (O(log n)) linked lists - dynamic size doubly-linked lists - easier deletion queues - FIFO stacks - LIFO dequeues

More information

Database index structures

Database index structures Database index structures From: Database System Concepts, 6th edijon Avi Silberschatz, Henry Korth, S. Sudarshan McGraw- Hill Architectures for Massive DM D&K / UPSay 2015-2016 Ioana Manolescu 1 Chapter

More information

Balanced Binary Search Trees

Balanced Binary Search Trees Balanced Binary Search Trees Pedro Ribeiro DCC/FCUP 2017/2018 Pedro Ribeiro (DCC/FCUP) Balanced Binary Search Trees 2017/2018 1 / 48 Motivation Let S be a set of comparable objects/items: Let a and b be

More information

CSE 100 Advanced Data Structures

CSE 100 Advanced Data Structures CSE 100 Advanced Data Structures Overview of course requirements Outline of CSE 100 topics Review of trees Helpful hints for team programming Information about computer accounts Page 1 of 25 CSE 100 web

More information

University of Illinois at Urbana-Champaign Department of Computer Science. Second Examination

University of Illinois at Urbana-Champaign Department of Computer Science. Second Examination University of Illinois at Urbana-Champaign Department of Computer Science Second Examination CS 225 Data Structures and Software Principles Spring 2014 7-10p, Tuesday, April 8 Name: NetID: Lab Section

More information

Multiple-choice (35 pt.)

Multiple-choice (35 pt.) CS 161 Practice Midterm I Summer 2018 Released: 7/21/18 Multiple-choice (35 pt.) 1. (2 pt.) Which of the following asymptotic bounds describe the function f(n) = n 3? The bounds do not necessarily need

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

Lecture 6: External Interval Tree (Part II) 3 Making the external interval tree dynamic. 3.1 Dynamizing an underflow structure

Lecture 6: External Interval Tree (Part II) 3 Making the external interval tree dynamic. 3.1 Dynamizing an underflow structure Lecture 6: External Interval Tree (Part II) Yufei Tao Division of Web Science and Technology Korea Advanced Institute of Science and Technology taoyf@cse.cuhk.edu.hk 3 Making the external interval tree

More information

CS 350 : Data Structures B-Trees

CS 350 : Data Structures B-Trees CS 350 : Data Structures B-Trees David Babcock (courtesy of James Moscola) Department of Physical Sciences York College of Pennsylvania James Moscola Introduction All of the data structures that we ve

More information

A HASHING TECHNIQUE USING SEPARATE BINARY TREE

A HASHING TECHNIQUE USING SEPARATE BINARY TREE Data Science Journal, Volume 5, 19 October 2006 143 A HASHING TECHNIQUE USING SEPARATE BINARY TREE Md. Mehedi Masud 1*, Gopal Chandra Das 3, Md. Anisur Rahman 2, and Arunashis Ghose 4 *1 School of Information

More information

Trees. A tree is a data structure consisting of data nodes connected to each other with pointers: Leaf. Vocabulary

Trees. A tree is a data structure consisting of data nodes connected to each other with pointers: Leaf. Vocabulary Trees A tree is a data structure consisting of data nodes connected to each other with pointers: Root Left child Right child Leaf Vocabulary A tree in which one vertex is distinguished from all the other

More information

Code Transformation of DF-Expression between Bintree and Quadtree

Code Transformation of DF-Expression between Bintree and Quadtree Code Transformation of DF-Expression between Bintree and Quadtree Chin-Chen Chang*, Chien-Fa Li*, and Yu-Chen Hu** *Department of Computer Science and Information Engineering, National Chung Cheng University

More information

(2,4) Trees. 2/22/2006 (2,4) Trees 1

(2,4) Trees. 2/22/2006 (2,4) Trees 1 (2,4) Trees 9 2 5 7 10 14 2/22/2006 (2,4) Trees 1 Outline and Reading Multi-way search tree ( 10.4.1) Definition Search (2,4) tree ( 10.4.2) Definition Search Insertion Deletion Comparison of dictionary

More information

Spatial Data Structures

Spatial Data Structures 15-462 Computer Graphics I Lecture 17 Spatial Data Structures Hierarchical Bounding Volumes Regular Grids Octrees BSP Trees Constructive Solid Geometry (CSG) March 28, 2002 [Angel 8.9] Frank Pfenning Carnegie

More information

CS 3114 Data Structures and Algorithms READ THIS NOW!

CS 3114 Data Structures and Algorithms READ THIS NOW! READ THIS NOW! Print your name in the space provided below. There are 7 short-answer questions, priced as marked. The maximum score is 100. This examination is closed book and closed notes, aside from

More information

University of Waterloo CS240R Fall 2017 Solutions to Review Problems

University of Waterloo CS240R Fall 2017 Solutions to Review Problems University of Waterloo CS240R Fall 2017 Solutions to Review Problems Reminder: Final on Tuesday, December 12 2017 Note: This is a sample of problems designed to help prepare for the final exam. These problems

More information

Database System Concepts, 5th Ed. Silberschatz, Korth and Sudarshan See for conditions on re-use

Database System Concepts, 5th Ed. Silberschatz, Korth and Sudarshan See   for conditions on re-use Chapter 12: Indexing and Hashing Database System Concepts, 5th Ed. See www.db-book.com for conditions on re-use Chapter 12: Indexing and Hashing Basic Concepts Ordered Indices B + -Tree Index Files B-Tree

More information