Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
8 views

List of Algorithms

Uploaded by

Samra Nawabi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

List of Algorithms

Uploaded by

Samra Nawabi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

Index Page 1 of 25

Index
A

Note: Specific algorithms are in boldface.


Procedures are in italics.
Θ(n2) algorithm, 26-31
A(n). See Average-case time complexity analysis
Abductive inference, 255-264
Best-First Search with Branch-and-Bound Pruning, 263-264
definition of, 255-256
Abelian (commutative), 436
Abstract data type, 589
Acyclic graph
definition of, 97
singly connected, 406
Add Array Members
algorithm, 7
every-case time complexity, 19
input size, 17
Addition
in computing modular powers, 439
of large integers, 72
Address-space organization
message-passing architecture, 490
shared-address-space architecture, 490
Adel'son-Velskii, G.M., 338
Adjacency matrix, 98
Adjacent vertex, 98
Adversary argument, 348-353
Agrawal, A., 458, 474
Akl, S., 505
Aldous, D., 539
Algorithms. See also specific algorithms
analysis of, 17-23, 24
approximations. See Approximation algorithms
definition of, 2, 4
deterministic, 201
efficient, importance in developing, 9-17
exercises, 42-46
linear-time, 25
nondeterministic algorithm, 387-388
parallel. See Parallel algorithms
polynomial-time. See Polynomial-time algorithms
probabilistic, 200-201
pseudopolynomial-time, 382
quadratic-time sorting, 25

file://C:\Documents and Settings\Stranger\Local Settings\Temp\~hh1EDC.htm 3/22/2010


Index Page 2 of 25

sorting, decision trees for, 297-300


writing, drawbacks to, 4
Analysis of correctness, 24-25
Apostol, T.M., 470
Approximation algorithms
for Bin-Packing problem, 410-416
solutions from, 255
for Traveling Salesperson problem, 406-411
Arbitrary write protocol, 506
Arc (edge), 97
Arithmetic, with large integers
addition, 72
linear-time operations, 72
multiplication, 72-78
Arrays, 5
Assignment of records, 269
Asymptotic behavior, 28-29
Asymptotic lower bound, 31
Asymptotic upper bound, 29
Average, 22
Average-case time complexity analysis, 21-22
Binary Search Recursive, 325-330
Insertion Sort, 271-272
lower bounds, 303-308
Quicksort, 65-66
AVL trees, 338

Index
B

B(n) (best-case time complexity), 22-23


Backtracking, 187-188
definition of, 191
exercises, 227-231
n-Queens problem, 196-200
technique, 188-195
Backtracking
efficiency, estimating, 200-204
for the Hamiltonian Circuits Problem, 215-216
for 0-1 Knapsack problem, 217-227
for the m-Coloring Problem, 211-213
for n-Queens Problem, 197-200, 202-203
for Sum-of-Subsets Problem, 208
Baker, R.C., 470
Base, 523
Basic operation, 18. See also under specific algorithms

file://C:\Documents and Settings\Stranger\Local Settings\Temp\~hh1EDC.htm 3/22/2010


Index Page 3 of 25

Bayer, R., 338


Bayesian network, 262
definition of, 256
elements of, 406
for parallel computers, 486-488
Bentley, J.L., 579
Best-case time complexity (B(n)), 22-23
Best-First Search with Branch-and-Bound Pruning, 234, 241-246
for Abductive Inference, 263-264
for 0-1 Knapsack problem, 245-246
pruned state space tree, 256-262
Big O, 27-31
Binary code, 169
Binary Search, 9-11
average-case performance, 330
basic operation, 18
hashing and, 343
input size, 17
lower bounds, 321, 324-325
searching in trees, 333-334. See also Binary search trees
time complexity, 320
vs. Sequential Search, 9-11
Binary Search Recursive, 48-51
average-case time complexity analysis, 325-330
worst-case time complexity, 52
Binary search trees, 334-338
balanced, 116-117
definition of, 116
depth of node, 116, 118
depth of tree, 116
level of node, 116
nearly complete, 324
optimal, 117, 120
search key, 117
with three keys, 119-122
Binomial Coefficient, 92-93, 530
using divide-and-conquer, 93-95
using dynamic programming, 95-96
Binomial theorem, 530
Bin-Packing problem, approximation algorithm,411-416
Blum, M., 366
Bool, 6
Borodin, A.B., 78
Bottom node, 285-286
Bottom-up approach, 92
Bound, 218-225
Bounded-degree network, 492, 493
Branch, 174
Branch-and-bound pruning, 233-264
exercises, 264-266
0-1 Knapsack problem, 235-246

file://C:\Documents and Settings\Stranger\Local Settings\Temp\~hh1EDC.htm 3/22/2010


Index Page 4 of 25

Traveling Salesperson problem, 246-255


Brassard, G., 39, 71, 78
Bratley, P., 71
Breadth-First Search with Branch-and-Bound Pruning, 234-235
dequeue, 235
for 0-1 Knapsack problem, 239-241
B-trees, 338-339
Build Optimal Binary Search Tree, 123-125

Index
C

C++, 4, 6, 51
Calls(s,t), 430
Candidate solution, 98
Ceiling, 511
Central processing unit (CPU), 486
Chachian, L.G., 401
Chained Matrix Multiplication problem, 107-113, 377
Change of variables technique, for solving recurrences, 568-571
Change problem, greedy algorithm for, 138-141
Characteristic equation
definition of, 556
for homogenous linear recurrence, 556-562
solving recurrences using, 553-562
checknode, 191, 195, 207, 218
Chromatic number, 384
Ciphertext, 477
Clause, 391
Clemen, R.T., 344
Clique
definition of, 385
maximal, 385
Clique Decision problem, 385, 395-396
Clique Optimization problem, 385
Clique problem, 385
Closed binary operation, 434
CNF-Satisfaction problem, 391-392
CNF-Satisfiability, as NP-complete, 395-396
CNF-Satisfiability Decision problem, 391-392
coalesce, 311
Codeword, 169
Collision (hash clash), 341
Combinations, 530, 533
Common divisor, 421
Common logarithms, 522

file://C:\Documents and Settings\Stranger\Local Settings\Temp\~hh1EDC.htm 3/22/2010


Index Page 5 of 25

Common write protocol, 506


Commutative (abelian), 436
Complete binary tree, 285
Complete quadratic functions, 25-26
Completely connected network, 491, 492
Complexity analysis, 17-23
Complexity categories, 26-27, 34
Complexity function, 23
eventually nondecreasing, 575
nondecreasing, 573-579
smooth, 575-576
strictly increasing, 573
Composite numbers, 420-421
Composite Numbers problem, 400
Compressible sequences, 537, 540
Computational complexity, 268-270
analysis, 268-269
exercises, 312-313
Compute Modular Power, 454-456
Computer programs, for problem-solving, 2, 3-4
Concurrent-read
concurrent-write (CRCW), 496
exclusive-write (CREW), 496-501
Conditional probability, 256-262
Congruency modulo n, 436-442
Conjunctive normal form (CNF), 391
Constant coefficients
with homogeneous linear recurrences, 553-556
with nonhomogeneous linear recurrences, 562-567
Control instructions, 24
Cook, S.A., 392, 394
Cook's Theorem, 394-395
Cooper, G.F., 263-264
Coopersmith, D., 71
CPU (central processing unit), 486
CRCW (concurrent-read, concurrent-write), 496
CRCW PRAM algorithms, 505-508
CREW (concurrent-read, exclusive-write), 496-501
Criterion, 188
Crossbar switching network, 493-494
Cryptography, 420
Cycle, 97
Cyclic graph, 97

Index
D

file://C:\Documents and Settings\Stranger\Local Settings\Temp\~hh1EDC.htm 3/22/2010


Index Page 6 of 25

(d+1)-dimensional hypercube networks, 493


Data compression, 169
Data-parallel algorithms, 496
Data parallel programs, 489-490
Data types, 6
Decision tree
definition of, 298
pruned, 321
for sorting algorithms, 297-300
valid, 298, 321
Decryption, 477
Depth-first search, 188-189
Dequeue, 235
Deterministic algorithm, 201
Diaconis, P., 539
Diagraph, 97
Difference, 527
Dijkstra, E.W., 25, 156
Dijkstra's Algorithm, 156-159
Direct networks, 491
Disjoint set data, 589-591
structure I, 591-595
structure II, 595-597
structure III, 597-598
distribute, 311
Divide-and-conquer approach, 47-83
Binary Search, 48-52
exercises, 83-89
threshold determinations, 78-83
as top-down approach, 48
when not to use, 82-83
Divisibility, of integers, 420
Division algorithm, 422
Divisor (factor), 420
Domain, of function, 514
Domain transformations, 568-571
Dynamic interconnection networks, 493-494
Dynamic programming, 16, 91-92
algorithm development steps, 92, 105-106
binomial coefficient, 92-96
as bottom-up approach, 92
definition of, 92
exercises, 133-136
to 0-1 Knapsack problem, 177-178
optimization problems and, 105-116
PRAM model applications, 501-505
refinement, for 0-1 Knapsack problem, 178-181
vs. greedy approach, 175-181
Dynamic Programming
Mergesort 3, 279-281
for Traveling Salesperson Problem, 129-132

file://C:\Documents and Settings\Stranger\Local Settings\Temp\~hh1EDC.htm 3/22/2010


Index Page 7 of 25

Dynamic searching, 333-334

Index
E

e, 524
Edge (arc), 97
Elementary event, 531
Elements, of sets, 527
Empty set, 528
Encryption, 477
Enqueue, 235
EPL (external path length), 303
Equivalence class modulo n containing m, 438
ERCW (exclusive-read, concurrent-write), 495
EREW (exclusive-read, exclusive-write), 495
Essentially complete binary tree, 285
Euclid's Algorithm, 428-430
extension to, 432-434
worst-case time complexity, 430-431
Euclid's Algorithm 2, 432-434
Euler's totient function, 441-442
Event, 531
Every-case time complexity analysis, 19, 25
Floyd's algorithm for shortest paths, 103
Minimum Multiplications, 113-114
Optimal Binary Search Tree, 123
Partition, 63
Prim's Algorithm, 148-150
Strassen, 70-71
Exchange Sort, 277, 380
algorithm, 7-8
analysis summary, 273
decision tree, 298-300
every-case time complexity, 19-20
as in-place sort, 273
input size, 17
as selection sort, 275
in threshold determination, 79-80
time complexity, 33
Exclusive-read
concurrent-write (ERCW), 495
exclusive-write (EREW), 495
Expected value, 367, 541
External path length (EPL), 303
External search, 338

file://C:\Documents and Settings\Stranger\Local Settings\Temp\~hh1EDC.htm 3/22/2010


Index Page 8 of 25

Extra space usage


Mergesort 4, 283
Quicksort, 284-285

Index
F

Factorial, 549-550
Feasibility check, for greedy algorithm, 138, 140
Feasible sequence, 163
Feasible set, 163
Fermat, 447-448
Fibonacci Sequence, 12
kth number in, 429
nth, 558-559
Finding largest key, in array, 498-501
Finding Largest Key, 345-346
Find Smallest and Largest Key, 346-347
Find Smallest and Largest Keys by Pairing Keys, 347-348
Fine, T.L., 536
Finite, 436
First-fit strategy, 411-412
Fischer, M.J., 383
Fixed-length binary code, 169
Floor, 511
Floyd, R.W., 102, 366
Floyd's Algorithm
for Shortest Paths, 102-103
for Shortest Paths 2, 103-104
Fractional Knapsack problem, greedy approach to, 175-177
Fredman, M.L., 115, 159
Functions, 6, 513-514. See also Complexity function
complete quadratic, 25-26
domain of, 514
Euler's totient, 441-442
Hash, 339
probability, 531
promising, 192
quadratic, 25-26
range of, 514
Fundamental theorem of arithmetic, 425
Fussenegger, F., 366

file://C:\Documents and Settings\Stranger\Local Settings\Temp\~hh1EDC.htm 3/22/2010


Index Page 9 of 25

Index
G

Gabow, H., 366


Garey, M.R., 386, 394, 398, 401, 406
Generator, 443
Geometric progression, 519
Gilbert, E.N., 125
Gilbert, J.P., 539
Godbole, S., 116
Graham, R.L., 156, 441
Grama, A., 494, 505, 508
Graph coloring, 209-213
Graph-Coloring problem, 384-385
Graph isomorphism problem, 399-400, 401
Graphs
acyclic, 97, 406
cyclic, 97
diagraph, 97
of functions, 513-514
planar, 210
undirected. See Undirected graphs
weighted, directed, 97, 107
Graph theory, 140-143
Greatest common divisor, 421-424, 427-434
Greedy algorithms
definition of, 137-138
exercises, 181-186
feasibility check, 138, 140
for giving change, 138-141
Huffman code, 169-175
minimum spanning trees, 140-156
selection procedure, 138, 140
solution check, 138, 140
vs. dynamic programming, 175-181
Gries, D., 25
Group, definition of, 434
Group theory, 434-436
Grzegorczyk, A., 383
Guessing (nondeterministic) stage, 388
Gupta, A., 494, 505, 508

Index

file://C:\Documents and Settings\Stranger\Local Settings\Temp\~hh1EDC.htm 3/22/2010


Index Page 10 of 25

Haken, D., 579


Halting problem, 383
Hamiltonian, 216
Hamiltonian Circuit, 126
Hamiltonian Circuits problem, 214-217, 396-397
Hardy, G.H., 457
Harman, G., 470
Harmanis, J., 383
Hash clash (collision), 341
Hash function, 339
Hashing, 339-344
Heap, 286
Heap data structure, 290-291
Heap property, 285
Heapsort, 285-296
algorithm, 291-292
average-case time complexity, 296
compared with Mergesort and Quicksort, 296-297
exercises, 315-316
extra space usage, 296
high-level pseudocode, 287-288
implementation, 289-290
worst-case time complexity, 296
worst-case time complexity analysis of number of comparison keys, 292
Hell, P., 156
Homogeneous linear recurrences, 553-562
with constant coefficients, 553-556
solving, 579-582
Hopcroft, J.E., 383
Horowitz, E., 227, 396
Hu, T.C., 116
Huang, B.C., 283
Huffman code, 169-175
Huffman's Algorithm, 171-175
Hyafil, L., 366
Hypercube networks, 493

Index
I

Identity element, 439, 441


Implicitly, 194
Index

file://C:\Documents and Settings\Stranger\Local Settings\Temp\~hh1EDC.htm 3/22/2010


Index Page 11 of 25

as data type, 6
of processor, 496
Induction
using to solve recurrences, 549-553
vs. substitution, 571
Induction base, 515-520, 552
Induction hypothesis, 515-520, 552
Induction step, 515-520, 552
Infinity, 513
Initial condition, 550
In-order traversal, 334
In-place sort, 57, 270
Inputs, 5
Input size, 17-18. See also under specific algorithms
definition of, 378
intractability and, 378-382
Insertion Sort, 270-271, 275, 277
analysis of extra space usage, 272-273
analysis summary, 273
average-case time complexity analysis, 271-272
exercises, 312-313
vs. Selection Sort, 274
worst-case time complexity analysis, 271
Instance of problem, 3
Integers, 420
Interconnection networks, 491-494
Internal node, 285
Internal search, 338
Interpolation Search, 320, 330-333
algorithm, 331
robust, 332-333
Intersection, 527
Intractability, 376-378
categories, 378
input size and, 378-382
problems, 382-384
Inversion, 276
Isomorphic, 399
Iverson, G.R., 539

Index
J

Jacobson, N., 443


Jarn k, V., 156
Johnson, D.B., 155

file://C:\Documents and Settings\Stranger\Local Settings\Temp\~hh1EDC.htm 3/22/2010


Index Page 12 of 25

Johnson, D.S., 386, 394, 398, 401, 406


0-1 Knapsack problem
Backtracking Algorithm, 217-227
backtracking and, 177-188
Best-First Search with Branch-and-Bound Pruning, 245-246
Breadth-First Search with Branch-and-Bound Pruning, 239-241
Decision problem, 384
dynamic programming approach to, 177-178
greedy approach to, 175-177
as NP-complete problem, 390-391
Optimization problem, 384, 385
state space tree, 256
time complexity, 381

Index
K

Karypis, G., 494, 505, 508


Kayal, N., 458
Keynes, J.M., 536
Keys
in binary search tree, 116
definition of, 4, 269
Keytype, 4, 5
Kingston, J.H., 25
Knapsack problem, fractional, 175-177, 218
Knuth, D.E., 39, 66, 441, 463
Kolmogorov, Andrei, 537-538
Kruse, R.L., 334, 338, 343
Kruskal, J.B. Jr., 156
Kruskal's Algorithm, 150-155
algorithm, 151-152
disjoint subsets, 589
vs. Prim's Algorithm, 155-156
worst-case time complexity analysis, 152-154
Kumar, V., 494, 505, 508

Index
L

file://C:\Documents and Settings\Stranger\Local Settings\Temp\~hh1EDC.htm 3/22/2010


Index Page 13 of 25

Lagrange, 443
Lambalgen, M. van, 540
Landis, E.M., 338
Langston, M.A., 283
Large-integer, 72
Large Integer Multiplication, 74-76
Large Integer Multiplication 2, 76-78
Leaf, 190
Least common multiple, 427
Left subtree, 116
Lemmas, 522
Length, path, 97
Linear recurrences
homogeneous, 553-562
nonhomogeneous, 562-567
Linear-time algorithms, 25
LISP, 51
List, definition of, 2-3
Literal, 391
In x, 524
Logarithms
common, 522
definition of, 522-523
natural, 524-526
properties of, 523-524
Logical (Boolean) variable, 391
Longcor, W.H., 539
Loser, 345
Lower bounds
for algorithms that remove most one inversion per comparison, 275-277
for average-case behavior, 303-308
definition of, 268
exercises, 313, 316
for searching only by comparison keys, 320-330
for average-case behavior, 324-330
for worst-case behavior, 322-324
for sorting only by comparison keys, 297-300
for worst-case behavior, 300-302

Index
M

Magnitude, 381
makecheap, 292-294
Marbe, K., 539
masterlist, 311

file://C:\Documents and Settings\Stranger\Local Settings\Temp\~hh1EDC.htm 3/22/2010


Index Page 14 of 25

Matching, 409
Mathematical induction, 514-520
Mathematics, review of, 511-542
exercises, 542-547
functions, 513-514
lemmas, 522
logarithms, 522-526
mathematical induction, 514-520
notation, 511-513
Mathematics, review of (continued)
permutations, 528-529
probability, 531-542
sets, 526-528
theorems, 521-522
Matrix Multiplication, 8-9, 67, 268
every-case time complexity, 20
input size, 17
McCreight, E.M., 338
m-Coloring problem, 209
Median
definition of, 361-362
Selection Using the Median, 362-364
Members, of sets, 527
Memory complexity, 23
Merge, 55
in-place sort, 57
worst-case time complexity, 55-56
Merge 2, 58-59
Mergesort, 53-59
average-case time complexity, 278
compared with Heapsort and Quicksort, 296-297
every-case time complexity, 278
exercises, 313-314, 316
improvements of, 279
removal of more than one inversion after comparison, 277-278
worst-case time complexity, 56-57, 79, 278
Mergesort 2, 58
extra space usage analysis, 279
optimal threshold, 80-81
Mergesort 3, 279-281, 503
Mergesort 4 (Linked Version), 281-283
Message-passing architecture, 480, 492
Miller-Rabin Randomized Primality Test, 480
MIMD (multiple instruction stream, multiple data stream), 495
minapprox, 409, 410-411
mindlist, 409, 410-411
minEPL(m), 303-307
Minimal weight matching, 409-410
Minimum Multiplications, 113
every-case time complexity, 113-114
optimal order, 114-115

file://C:\Documents and Settings\Stranger\Local Settings\Temp\~hh1EDC.htm 3/22/2010


Index Page 15 of 25

Minimum spanning tree, 140-156, 407-408


definition of, 143
determining. See Prim's Algorithm
optimal tour, 408
Minimum Spanning Trees problem, Kruskal's algorithm, 150-155
minTND(n), 328-329
Mises, Richard von, 536-537, 539, 540
Modular arithmetic review
congruency modulo n, 436-442
group theory, 434-436
subgroups, 442-448
Modular linear equations, solving, 448-453
Modular powers, computing, 454-456
Monet, S., 78
Monte Carlo Estimate, 202
for Backtracking Algorithm for n-Queens Problem, 203
to estimate efficiency of backtracking algorithm, 200-204
Monte Carlo technique, 195, 406
Moore, E.F., 125
Mosteller, F., 539
Multiple instruction stream, multiple data stream (MIMD), 489
Multiples, 420
Multiplication
in computing modular powers, 440
of large integers, 72-74
Munro, J.I., 78

Index
N

Natural logarithms, 524-526


Neapolitan, R.E., 256, 264, 406, 540
Neumann, John von, 486
Node, 210
Nondeterministic algorithm, 387-388
Nonhomogeneous linear recurrence, with constant coefficients, 562-567
Nonincreasing first fit, 412
Nonnegative integer, 12
Nonpromising node, 191, 234
Nonuniform memory access (NUMA), 480, 481
Notation, 511-513
NP
definition of, 389-390
exercises, 416-418
sets of, 386-390
NP-complete, 376, 394-395

file://C:\Documents and Settings\Stranger\Local Settings\Temp\~hh1EDC.htm 3/22/2010


Index Page 16 of 25

complementary problems, 400-401


Cook's Theorem, 394
definition of, 394
graph isomorphism problem, 399-400
problems, handling of, 390-401
state of, 398
NP-easy, 404
NP-equivalent, 405
NP-hard, 402-404
problems, handling of, 406-416
NP theory, 384-386
n-Queens problem, 196-200
nth Fibonacci Term Iterative, 92
input size, 17-18
vs. Algorithm 1.6, 15-17
nth Fibonacci Term Recursive, 12
input size, 17-18
vs. Algorithm 1.7, 16
NUMA (nonuniform memory access), 480, 481
Number, 6
Number-theoretic algorithms
Compute Modular Power, 454-456
definition of, 419
Euclid's Algorithm, 428-434
exercises, 480-483
Polynomial Determine Prime, 464-474
Solve Modular Linear Equation, 453
Number theory
composite numbers, 420-421
definition of, 419
greatest common divisor, 421-424, 427-434
least common multiple, 427
prime factorization, 424-426
prime numbers, 420-421
numdigits, 311-312

Index
O

Omega (Ωf(n)), 32-33


Open hashing (addressing), 341
Optimal Binary Search Tree Algorithm, 122-123
Optimal binary search trees, 116-125
Optimality, principle of, 106
Optimal sequence, 163
Optimal set of jobs, 163

file://C:\Documents and Settings\Stranger\Local Settings\Temp\~hh1EDC.htm 3/22/2010


Index Page 17 of 25

Optimal threshold value, 78


Optimal tour, 126, 128
Optimization problem, 98
Order, 425
big O, 27-31
complexity function f(n), 27
definition of, 33
determining, using limit for, 39-41
of group element, 444
properties of, 37
Outputs, 5
Overhead instructions, 24

Index
P

P, sets of, 386-390


Papadimitriou, C.H., 406
Parallel algorithms, 42. See also specific parallel algorithms
Parallel architectures, 488-494
address-space organization, 490
control mechanism, 488-490
exercises, 508-509
interconnection networks, 491-494
Parallel Binomial Coefficient, 501-503
Parallel computer, 485-486
Parallel computers, 488. See also Parallel architectures
Parallel CRCW Find Largest Key, 506-507
Parallel Find Largest Key, 499-501
Parallel Mergesort, 503-505
algorithm, 503-504
worst-case time complexity, 505
Parallel random access machine (PRAM), 495. See also PRAM model
Parallel sorting, 503-505
Parameters, 3
Partition, 284, 358
Partition, 62-63
Pascal's triangle, 94-95, 111, 501-502
Patashnik, O., 441
Paterson, M., 366
Path, 97
Path compression, 598
Pearl, J., 256, 406, 487
Permutations, 275-276, 533
Pippenger, N., 366
Pivotitem, 65

file://C:\Documents and Settings\Stranger\Local Settings\Temp\~hh1EDC.htm 3/22/2010


Index Page 18 of 25

Pivotpoint, 64, 65, 358


Planar graph, 210
Polynomial Determine Prime, 464-474
Polynomial-time algorithms, 376, 382, 386
Polynomial-time many-one reducible, 393
Polynomial-time nondeterministic algorithms, 389
Polynomial-time reducibility, 392
Polynomial-time Turing reducible, 402, 405
Population
probability and, 531
at random from, 539
PRAM (parallel random access machine), 495
PRAM Model, 488, 495
CRCW algorithms, 505-508
CREW (concurrent-read, exclusive write), 496-501
dynamic programming applications, 501-505
Pratt, V., 366
Prefix codes, 170
Preorder, 188
Presburger Arithmetic, 383, 398
Prim, R.C., 156
Prime-checking algorithm, 381
Prime distribution function (π(n)), 457
Prime factorization, 424-426
Prime numbers
definition of, 420-421
large, finding, 456-476
Prime number theorem, 457
Primes problem, 400, 401
Prim's Algorithm, 144-148
every-case time complexity, 148-150
theorem, 149-150
vs. Kruskal's Algorithm, 155-156
Principle of Indifference, 532-534, 540
Principle of Optimality, 106
Print Optimal Order, 115
Print Shortest Path, 104-105
Priority cue, 172-174
Priority write protocol, 506
Probabilistic algorithms, 200-201
Probabilistic Selection
algorithm, 368
expected-value time complexity, 369-370
Probability, 256, 531-542
conditional, 256
expected value, 540-542
Principle of Indifference and, 532-534
randomness and, 536-540
relative frequency appraoch, 533-534
subjectivistic approach, 534-535
Probability function, 531

file://C:\Documents and Settings\Stranger\Local Settings\Temp\~hh1EDC.htm 3/22/2010


Index Page 19 of 25

Probability space, definition of, 532


Problems. See also specific problems
definition of, 2
example of, 2
Problem-solving techniques, 1-2, See also Algorithms; specific algorithms
Procedure, 6
Process, 24
Processor, 486
Profit, 218-225
Promising function, 192
Promising node, 191, 234
Promising subset, 148-149
Proof of contradiction, 34
Proper subset, 527
Pruned state space tree, 191
Pruning, 191
Pseudocode, 4, 6
Pseudopolynomial-time algorithm, 382
Public key, 476
Public-key cryptosystems
definition of, 476-477
RSA public-key cryptosystem, 478-480
Pure quadratic functions, 25-26

Index
Q

Quadratic functions
complete, 25-26
pure, 25-26
Quadratic-time algorithm (Θ(n2) algorithm), 26-31
Quadratic-time sorting algorithm, 25. See also Exchange Sort
Quicksort, 61, 283-284
average-case analysis, 337
average-case time complexity, 65-66, 284
compared with Heapsort and Mergesort, 296-297
exercises, 313-315, 316
extra space usage, 284-285
improved, 284-285
recursive calls, 284-285
worst-case time complexity analysis, 63-65, 285, 359
Quicksort (partition exchange sort), 60-66
Quotient, 421

file://C:\Documents and Settings\Stranger\Local Settings\Temp\~hh1EDC.htm 3/22/2010


Index Page 20 of 25

Index
R

Rabin, M.O., 383


Radix Sort, 308-312
algorithm, 310-311
every-case time complexity, 311
extra space usage, 312
Randomness, probability and, 536-540
Random process, 536, 538
Random sample, 539
Random sequence, 537-538, 540
Random variable, 541
Range, of function, 514
Read from shared memory, 496
Recurrence equations, 550
exercises, 582-587
solving
change of variables technique for, 568-571
by substitution, 571-572
using inducation, 549-553
using the characteristic equation, 553-562
Recursion tree, 12-14
Reference parameters, 6
Reflexivity, 438
Relative frequency approach, to probability, 533
Relatively prime, 424-425
Remainder, 421-422
removekeys, 294-296
Repeating squaring method, 454-456
Right subtree, 116
Rivest, R.L., 366
Robust Interpolation Search, 332-333
Rooted tree, 143
Root of multiplicity, 560
RSA cryptosystem, 436-437, 477-480
RSA public-key cryptosystem, 478-480

Index
S

file://C:\Documents and Settings\Stranger\Local Settings\Temp\~hh1EDC.htm 3/22/2010


Index Page 21 of 25

Sahni, S., 227, 396, 579


Sample space, 531
Sampling with replacement, 537
Saxe, J.B., 579
Saxena, N., 458
Schedule, impossible, 162-163
Scheduling
with deadlines. See Scheduling with Deadlines
minimizing total time in system, 160-162
time in system, 159
Scheduling with Deadlines, 159, 162-168
algorithm, 165-166
optimal solution, theorem, 167-168
worst-case time complexity, 167
Schonhage, A., 366
Search Binary Tree, 118
Searching, 319-320
best-first. See Best-first search
Binary Search. See Binary Search
binary search trees. See Binary search trees
breadth-first search with branch-and-bound pruning, 234-239
dynamic, 333-334
internal, 338
Interpolation. See Interpolation Search
for largest key. See Selection problem
for lower bounds. See Lower bounds
for second largest key. See Selection problem
Sequential Search. See Sequential Search
static, 333
for trees, 333-339
binary search trees, 334-338
B-trees, 338-339
Search time, 118
Secret key, 476
Selection
algorithm, 358-359
average-case time complexity, 359-361
Selection problem, 344-370
adversary argument, 348-353
definition of, 344
exercises, 370-374
Finding Largest Key, 345-346
finding the kth-smallest key, 358-366
finding the second-largest key, 353-358
Find Smallest and Largest Key, 346-347
Find Smallest and Largest Keys by Pairing Keys, 347-348
probabilistic algorithm, 366-370
Selection procedure, for greedy algorithm, 138, 140
Selection Sort, 273
Selection Using the Median, 362-364
worst-case time complexity, 364-366

file://C:\Documents and Settings\Stranger\Local Settings\Temp\~hh1EDC.htm 3/22/2010


Index Page 22 of 25

Sequence, 188
Sequential Search, 4-5, 19, 321
average-case time complexity, 21-22
basic operation, 18
input size, 17
vs. binary search, 9-11
worst-case time complexity, 20-21
Serial computer, traditional, 486
Sets, 526-528
Shared-address-space architecture, 490
Sherwood Algorithm, 366-370
Shing, M.R., 116
Siblings, 174
Siftdown, 287-289, 292, 293
Sigma, 512-513
Simple path, 97
Single instruction stream
multiple data stream, 488-489
single data stream (SISD), 486
Single-source shortest paths, Dijkstra's Algorithm. See Dijkstra's Algorithm
SISD (single instruction stream, single data stream), 486
Skewed tree, 335
Small o, 34
Smooth, 575-576
Solution, problem, 4, 550
Solution check, for greedy algorithm, 138, 140
Solution to instance, 3
Solve Modular Linear Equation, 453
Sorting, by distribution, 308-312
Sorting algorithms, 7-8
decision trees for, 297-300
Exchange Sort. See Exchange Sort
Heapsort. See Heapsort
Insertion sort. See Insertion Sort
Mergesort. See Mergesort
Mergesort 2. See Mergesort 2
Mergesort 4 (Linked Version), 281-283
Parallel Mergesort, 503-505
Quicksort. See Quicksort
Sorting task, 269
Sort only by comparisons of keys, 269
Spanning tree, 143
Star-connected network, 492
State space tree, 234
definition of, 190
purning, using best-first search, 256-262
Static interconnection network, 491
Static searching, 333
Stearns, R.E., 383
Step, 380
Storage, 2

file://C:\Documents and Settings\Stranger\Local Settings\Temp\~hh1EDC.htm 3/22/2010


Index Page 23 of 25

Strassen, V., 67, 71


Strassen's Matrix Multiplication, 67-71
Subgroups, 442-448
closed, 442
definition of, 442
generated by a, 443
proper, 442
Subjectivistic approach, to probability, 534-535
Subsets, 527
Substitution
for solving recurrences, 571-572
vs. induction, 571
Sum-of-Subsets problem, 204-209
Sum write protocol, 506
Symmetry, 438

Index
T

2-tree, 303
3-2 tree, 338
Tail-recursion, 51
Tarjan, R.E., 115, 156, 159, 366
Theorems
definition of, 521-522
proof of, 579-582
Theory of algorithm analysis, application of, 24
Thresholds, determining, 78-83
Time, 2
Time complexity analysis, 18-20. See specific time complexity analyses
Time in the system, 159
Top-down approach, 48
Totweight, 218-225
Tour, 126, 384
Tournament method, 354-358
Transformation, 392-393
Transitivity, 438
Transposition, of permutation, 276
Traveling Salesperson problem, 375-376
branch-and-bound pruning, 246-255, 411
Complementary Decision problem, 401
Decision problem, 384, 397-398
description of, 125-129
Dynamic Programming, 129-132
Extension Decision problem, 404-405
NP theory and, 384

file://C:\Documents and Settings\Stranger\Local Settings\Temp\~hh1EDC.htm 3/22/2010


Index Page 24 of 25

Optimization problem, 384


approximation algorithm, 406-411
as NP-hard, 402-403
with triangular inequality, 406-411
Triangular inequality, 406-407
Turing reductions, 402, 405
Two-way merging, 53
Typical path, 201

Index
U

Ullman, J.D., 383


UMA (uniform memory access), 480, 481, 495
Undecidable problems, 383
Undirected graphs, 141
acyclic, 142
connected, 141
definition of, 143
path in, 141
rooted tree, 143
simple cycle, 142
spanning tree, 143
tree, 142-143
weighted, 408
Uniform memory access (UMA), 480, 481, 495
Union, 527
Unique factorization theorem, 425
Universal set, 528

Index
V

Variable-length binary code, 169


Variables, 3
Verification (deterministic) stage, 388
Vertex, 210, 247
Vertices, 97

file://C:\Documents and Settings\Stranger\Local Settings\Temp\~hh1EDC.htm 3/22/2010


Index Page 25 of 25

Index
W-X

W (n). See Worst-case time complexity analysis


W (s). See Worst-case time complexity analysis
Weight, 205, 218-225
Weighted graphs, 97, 107
Weights, 97
While loop, 11, 18
Winner, 345
Winograd, S., 71
Worst-case behavior, lower bounds, 300-302
Worst-case time complexity analysis, 20-21, 380
Binary Search Recursive, 52
insertion sort algorithm, 271
Merge, 55-56
Mergesort, 56-57
Quicksort, 63-65
Scheduling with Deadlines, 167
Selection Using the Median, 364-366
Wright, E.M., 457

Index
Y

Yao, A.C., 156


Yao, F., 116, 125
Youtz, C., 539

Index
Z

Zuffelatto, D., 78

file://C:\Documents and Settings\Stranger\Local Settings\Temp\~hh1EDC.htm 3/22/2010

You might also like