Preface |
|
vii | |
|
Analyzing Algorithms and Problems: Principles and Examples |
|
|
1 | (68) |
|
|
2 | (1) |
|
Java as an Algorithm Language |
|
|
3 | (8) |
|
|
11 | (19) |
|
Analyzing Algorithms and Problems |
|
|
30 | (13) |
|
Classifying Functions by Their Asymptotic Groth Rates |
|
|
43 | (10) |
|
Searching an Ordered Array |
|
|
53 | (16) |
|
|
61 | (6) |
|
|
67 | (2) |
|
Data Abstraction and Basic Data Structures |
|
|
69 | (32) |
|
|
70 | (1) |
|
ADT Specification and Design Techniques |
|
|
71 | (2) |
|
Elementary ADTs---Lists and Trees |
|
|
73 | (13) |
|
|
86 | (3) |
|
|
89 | (12) |
|
|
95 | (5) |
|
|
100 | (1) |
|
|
101 | (48) |
|
|
102 | (1) |
|
|
102 | (6) |
|
|
108 | (3) |
|
|
111 | (7) |
|
Proving Correctness of Procedures |
|
|
118 | (12) |
|
|
130 | (4) |
|
|
134 | (15) |
|
|
141 | (5) |
|
|
146 | (3) |
|
|
149 | (74) |
|
|
150 | (1) |
|
|
151 | (6) |
|
|
157 | (2) |
|
|
159 | (12) |
|
|
171 | (3) |
|
|
174 | (4) |
|
Lower Bounds for Sorting by Comparison of Keys |
|
|
178 | (4) |
|
|
182 | (15) |
|
Comparison of Four Sorting Algorithms |
|
|
197 | (1) |
|
|
197 | (4) |
|
|
201 | (22) |
|
|
206 | (15) |
|
|
221 | (1) |
|
|
221 | (2) |
|
Selection and Adversary Arguments |
|
|
223 | (26) |
|
|
224 | (2) |
|
|
226 | (3) |
|
Finding the Second-Largest Key |
|
|
229 | (4) |
|
|
233 | (5) |
|
A Lower Bound for Finding the Median |
|
|
238 | (2) |
|
Designing Against an Adversary |
|
|
240 | (9) |
|
|
242 | (4) |
|
|
246 | (3) |
|
Dynamic Sets and Searching |
|
|
249 | (64) |
|
|
250 | (1) |
|
|
250 | (1) |
|
|
251 | (2) |
|
|
253 | (22) |
|
|
275 | (8) |
|
Dynamic Equivalence Relations and Union-Find Programs |
|
|
283 | (12) |
|
Priority Queues with a Decrease Key Operation |
|
|
295 | (18) |
|
|
302 | (7) |
|
|
309 | (1) |
|
|
309 | (4) |
|
Graphs and Graph Traversals |
|
|
313 | (74) |
|
|
314 | (1) |
|
Definitions and Represantations |
|
|
314 | (14) |
|
|
328 | (8) |
|
Depth-First Search on Directed Graphs |
|
|
336 | (21) |
|
Strongly Connected Components of a Directed Graph |
|
|
357 | (7) |
|
Depth-First Search on Undirected Graphs |
|
|
364 | (2) |
|
Biconnected Components of an Undirected Graph |
|
|
366 | (21) |
|
|
375 | (9) |
|
|
384 | (1) |
|
|
385 | (2) |
|
Graph Optimization Problems and Greedy Algorithms |
|
|
387 | (38) |
|
|
388 | (1) |
|
Prim's Minimum Spanning Tree Algorithm |
|
|
388 | (15) |
|
Single-Source Shortest Paths |
|
|
403 | (9) |
|
Kruskal's Minimum Spanning Tree Algorithm |
|
|
412 | (13) |
|
|
416 | (5) |
|
|
421 | (1) |
|
|
422 | (3) |
|
Transitive Closure, All-Pairs Shortest Paths |
|
|
425 | (26) |
|
|
426 | (1) |
|
The Transitive Closure of a Binary Relation |
|
|
426 | (4) |
|
Warshall's Algorithm for Transitive Closure |
|
|
430 | (3) |
|
All-Pairs Shortest Paths in Graphs |
|
|
433 | (3) |
|
Computing Transitive Closure by Matrix Operations |
|
|
436 | (3) |
|
Multiplying Bit Matrices---Kronrod's Algorithm |
|
|
439 | (12) |
|
|
446 | (3) |
|
|
449 | (1) |
|
|
449 | (2) |
|
|
451 | (32) |
|
|
452 | (1) |
|
Subproblem Graphs and Their Traversal |
|
|
453 | (4) |
|
Multiplying a Sequence of Matrices |
|
|
457 | (9) |
|
Constructing Optimal Binary Search Trees |
|
|
466 | (5) |
|
Separating Sequences of Words into Lines |
|
|
471 | (3) |
|
Developing a Dynamic Programming Algorithm |
|
|
474 | (9) |
|
|
475 | (6) |
|
|
481 | (1) |
|
|
482 | (1) |
|
|
483 | (32) |
|
|
484 | (1) |
|
A Straightforward Solution |
|
|
485 | (2) |
|
The Knuth-Morris-Pratt Algorithm |
|
|
487 | (8) |
|
The Boyer-Moore Algorithm |
|
|
495 | (9) |
|
Approximate String Matching |
|
|
504 | (11) |
|
|
508 | (4) |
|
|
512 | (1) |
|
|
512 | (3) |
|
|
515 | (32) |
|
|
516 | (1) |
|
Evaluating Polynomial Functions |
|
|
516 | (6) |
|
Vector and Matrix Multiplication |
|
|
522 | (6) |
|
The Fast Fourier Transform and Convolution |
|
|
528 | (19) |
|
|
542 | (4) |
|
|
546 | (1) |
|
|
546 | (1) |
|
|
547 | (64) |
|
|
548 | (1) |
|
|
548 | (11) |
|
|
559 | (11) |
|
|
570 | (2) |
|
|
572 | (5) |
|
The Knapsack and Subset Sum Problems |
|
|
577 | (4) |
|
|
581 | (8) |
|
The Traveling Salesperson Problem |
|
|
589 | (3) |
|
|
592 | (19) |
|
|
600 | (8) |
|
|
608 | (3) |
|
|
611 | (38) |
|
|
612 | (1) |
|
Parallelism, the PRAM, and Other Models |
|
|
612 | (4) |
|
Some Simple PRAM Algorithms |
|
|
616 | (6) |
|
|
622 | (2) |
|
|
624 | (4) |
|
Finding Connected Components |
|
|
628 | (13) |
|
A Lower Bound for Adding n Integers |
|
|
641 | (8) |
|
|
643 | (4) |
|
|
647 | (2) |
A Java Examples and Techniques |
|
649 | (20) |
|
|
650 | (1) |
|
|
651 | (5) |
|
A.3 A Simple Input Library |
|
|
656 | (2) |
|
A.4 Documenting Java Classes |
|
|
658 | (1) |
|
A.5 Generic Order and the ``Comparable'' Interface |
|
|
659 | (4) |
|
A.6 Subclasses Extend the Capability of Their Superclass |
|
|
663 | (4) |
|
A.7 Copy via the ``Cloneable'' Interface |
|
|
667 | (2) |
Bibliography |
|
669 | (10) |
Index |
|
679 | |