Algorithms and Data Structures: With Applications to Graphics and Geometry

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Based on the authors' extensive teaching of algorithms and data structures, this text aims to show a sample of the intellectual demands required by a computer science curriculum, and to present issues and results of lasting value, ideas that will outlive the current generation of computers. Sample exercises, many with solutions, are included throughout the book.

Author(s): Jurg Nievergelt, Klaus H. Hinrichs
Series: BCS Practitioner
Publisher: Prentice Hall
Year: 1992

Language: English
Pages: 368

Cover......Page 1
Title Page......Page 2
Copyright Page......Page 3
Dedication......Page 4
Contents......Page 6
PREFACE......Page 14
Part I Programming environments for motion, graphics, and geometry......Page 18
1.1 A robot car, its capabilities, and the task to be performed......Page 20
1.2 Wall-following algorithm described informally......Page 22
1.4 Algorithm programmed in the robot's language......Page 23
1.5 The robot's program optimized......Page 24
2.1 Turtle graphics: A basic environment......Page 26
2.2 QuickDraw: A graphics toolbox......Page 29
2.3 A graphics frame program......Page 32
2.4 Example of a graphics routine: Polyline input......Page 35
3.1 Computer-driven visualization: Characteristics and techniques......Page 37
3.2 Example: The convex hull of points in the plane......Page 39
3.3 A gallery of algorithm snapshots......Page 41
Part II Programming concepts: Beyond notation......Page 48
4.1 Programming in the large versus programming in the small......Page 49
4.2 Documentation versus literature: Is it meant to be read?......Page 50
4.3 Pascal and its dialects: Lingua franca of computer science......Page 56
5.1 An algorithmic principle......Page 61
5.2 Divide-and-conquer expressed as a diagram: Merge sort......Page 62
5.3 Recursively defined trees......Page 63
5.4 Recursive tree traversal......Page 65
5.5 Recursion versus iteration: The Tower of Hanoi......Page 66
5.6 The flag of Alfanumerica: An algorithmic novel on iteration and recursion......Page 69
6.1 Syntax and semantics......Page 71
6.2 Grammars and their representation: Syntax diagrams and EBNF......Page 72
6.3 Example: Syntax of simple expressions......Page 74
6.4 An overly simple syntax for simple expressions......Page 76
6.5 Parenthesis-free notation for arithmetic expressions......Page 77
7.1 The role of syntax analysis......Page 80
7.2 Syntax analysis of parenthesis-free expressions by counting......Page 81
7.4 Turning syntax diagrams into a parser......Page 83
Part III Objects, algorithms, programs......Page 86
8.1 Bits and boolean functions......Page 88
8.2 Swapping and crossovers: The versatile exclusive-or......Page 89
8.3 The bit sum or "population count"......Page 90
9 ORDERED SETS......Page 98
9.1 Sequential search......Page 99
9.2 Binary search......Page 100
9.3 In-place permutation......Page 103
10.1 Recognizing a pattern consisting of a single string......Page 110
10.2 Recognizing a set of strings: A finite-state-machine interpreter......Page 111
11.1 Paths in a graph......Page 116
11.2 Boolean matrix multiplication......Page 117
11.3 Warshall's algorithm......Page 119
11.4 Minimum spanning tree in a graph......Page 121
12.1 Operations on integers......Page 124
12.2 The Euclidean algorithm......Page 127
12.3 The prime number sieve of Eratosthenes......Page 128
12.4 Large integers......Page 129
12.5 Modular number systems: The poor man's large integers......Page 130
12.6 Random numbers......Page 133
13.1 Floating point numbers......Page 136
13.2 Some dangers......Page 138
13.3 Homer's method......Page 140
13.4 Bisection......Page 141
13.5 Newton's method for computing the square root......Page 142
14.1 Intersection......Page 146
14.2 Clipping......Page 149
14.3 Drawing digitized lines......Page 151
14.4 The riddle of the braiding straight lines......Page 154
14.5 Digitized circles......Page 159
Part IV Complexity of problems and algorithms......Page 164
15.1 Models of computation: The ultimate RISC......Page 165
15.2 Almost nothing is computable......Page 169
15.3 The halting problem is undecidable......Page 170
15.4 Computable, yet unknown......Page 171
15.5 Multiplication of complex numbers......Page 173
15.6 Complexity of matrix multiplication......Page 174
16.1 Growth rates and orders of magnitude......Page 178
16.2 Asymptotics......Page 180
16.3 Summation formulas......Page 181
16.4 Recurrence relations......Page 183
16.5 Asymptotic performance of divide-and-conquer algorithms......Page 186
16.6 Permutations......Page 187
16.7 Trees......Page 188
17.1 What is sorting? How difficult is it?......Page 191
17.2 Types of sorting algorithms......Page 194
17.3 Simple sorting algorithms that work in time 0(n2)......Page 197
17.4 A lower bound Sl(n log n)......Page 198
17.5 Quicksort......Page 200
17.6 Analysis for three cases: best, "typical," and worst......Page 203
17.7 Merging and merge sorts......Page 205
17.8 Is it possible to sort in linear time?......Page 208
17.9 Sorting networks......Page 209
Part V Data structures......Page 214
18.1 Data structures old and new......Page 216
18.2 The range of data structures studied......Page 218
18.3 Performance criteria and measures......Page 219
19.1 Concepts: What and why?......Page 221
19.2 Stack......Page 223
19.3 First-in-first-out queue......Page 227
19.4 Priority queue......Page 229
19.5 Dictionary......Page 230
20.1 What is an implicit data structure?......Page 235
20.2 Array storage......Page 236
20.3 Implementation of the fixed-length fifo queue as a circular buffer......Page 241
20.4 Implementation of the fixed-length priority queue as a heap......Page 244
20.5 Heapsort......Page 249
21.1 Lists, memory management, pointer variables......Page 251
21.2 The fifo queue implemented as a one-way list......Page 254
21.3 Tree traversal......Page 255
21.4 Binary search trees......Page 265
21.5 Balanced trees: General definition......Page 269
21.6 Height-balanced trees......Page 271
21.7 Multiway trees......Page 277
22.1 Concepts and terminology......Page 284
22.3 The special case of perfect hashing: Table contents known a priori......Page 286
22.4 Conventional hash tables: Collision resolution......Page 288
22.5 Choice of hash function: Randomization......Page 293
22.6 Performance analysis......Page 295
22.7 Extendible hashing......Page 296
22.8 A virtual radix tree: Order-preserving extendible hashing......Page 298
23.1 Organizing the embedding space versus organizing its contents......Page 301
23.2 Radix trees, tries......Page 302
23.3 Quadtrees and octtrees......Page 303
23.4 Spatial data structures: Objectives and constraints......Page 305
23.5 The grid file......Page 307
23.6 Simple geometric objects and their parameter spaces......Page 311
23.7 Region queries of arbitrary shape......Page 313
23.9 Interaction between query processing and data access......Page 315
Part VI Interaction between algorithms and data structures: Case studies in geometric computation......Page 320
24.1 Geometry and geometric computation......Page 322
24.2 Convex hull: A multitude of algorithms......Page 324
24.3 The uses of convexity: Basic operations on polygons......Page 328
24.4 Visibility in the plane: A simple algorithm whose analysis is not......Page 331
25.1 The line segment intersection test......Page 338
25.2 The skeleton: Turning a space dimension into a time dimension......Page 340
25.3 Data structures......Page 341
25.5 Sweeping across intersections......Page 342
25.6 Degenerate configurations, numerical errors, robustness......Page 343
26.1 The problem......Page 346
26.2 Plane-sweep applied to the closest pair problem......Page 347
26.3 Implementation......Page 349
26.4 Analysis......Page 351
26.5 Sweeping in three or more dimensions......Page 352
REFERENCES......Page 355
INDEX......Page 360