12.07.2015 Views

A Practical Introduction to Data Structures and Algorithm Analysis

A Practical Introduction to Data Structures and Algorithm Analysis

A Practical Introduction to Data Structures and Algorithm Analysis

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Sec. 13.4 Further Reading 473Spatial data structures can also be used <strong>to</strong> s<strong>to</strong>re line object, rectangle object,or objects of arbitrary shape (such as polygons in two dimensions or polyhedra inthree dimensions). A simple, yet effective, data structure for s<strong>to</strong>ring rectangles orarbitrary polygonal shapes can be derived from the PR quadtree. Pick a thresholdvalue c, <strong>and</strong> subdivide any region in<strong>to</strong> four quadrants if it contains more than cobjects. A special case must be dealt with when more than c object intersect.Some of the most interesting developments in spatial data structures have <strong>to</strong>do with adapting them for disk-based applications. However, all such disk-basedimplementations boil down <strong>to</strong> s<strong>to</strong>ring the spatial data structure within some varian<strong>to</strong>n either B-trees or hashing.13.4 Further ReadingPATRICIA tries <strong>and</strong> other trie implementations are discussed in Information Retrieval:<strong>Data</strong> <strong>Structures</strong> & <strong>Algorithm</strong>s, Frakes <strong>and</strong> Baeza-Yates, eds. [FBY92].See Knuth [Knu97] for a discussion of the AVL tree. For further reading onsplay trees, see “Self-adjusting Binary Search” by Slea<strong>to</strong>r <strong>and</strong> Tarjan [ST85].The world of spatial data structures is rich <strong>and</strong> rapidly evolving. For a goodintroduction, see Foundations of Multidimensional <strong>and</strong> Metric <strong>Data</strong> <strong>Structures</strong> byHanan Samet [Sam06]. This is also the best reference for more information onthe PR quadtree. The k-d tree was invented by John Louis Bentley. For furtherinformation on the k-d tree, in addition <strong>to</strong> [Sam06], see [Ben75]. For informationon using a quadtree <strong>to</strong> s<strong>to</strong>re arbitrary polygonal objects, see [SH92].For a discussion on the relative space requirements for two-way versus multiwaybranching, see “A Generalized Comparison of Quadtree <strong>and</strong> Bintree S<strong>to</strong>rageRequirements” by Shaffer, Juvvadi, <strong>and</strong> Heath [SJH93].Closely related <strong>to</strong> spatial data structures are data structures for s<strong>to</strong>ring multidimensionaldata (which might not necessarily be spatial in nature). A populardata structure for s<strong>to</strong>ring such data is the R-tree, which was originally proposed byGuttman [Gut84].13.5 Exercises13.1 Show the binary trie (as illustrated by Figure 13.1) for the following collectionof values: 42, 12, 100, 10, 50, 31, 7, 11, 99.13.2 Show the PAT trie (as illustrated by Figure 13.3) for the following collectionof values: 42, 12, 100, 10, 50, 31, 7, 11, 99.13.3 Write the insertion routine for a binary trie as shown in Figure 13.1.13.4 Write the deletion routine for a binary trie as shown in Figure 13.1.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!