Contents Page: v Preface Page: ix 1 What Are Algorithms and Why Should You Care? Page: 1 Correctness Page: 2 Resource usage Page: 4 Computer algorithms for non-computer people Page: 6 Computer algorithms for computer people Page: 6 Further reading Page: 8 2 How to Describe and Evaluate Computer Algorithms Page: 10 How to describe computer algorithms Page: 10 How to characterize running times Page: 17 Loop invariants Page: 21 Recursion Page: 22 Further reading Page: 24 3 Algorithms for Sorting and Searching Page: 25 Binary search Page: 28 Selection sort Page: 32 Insertion sort Page: 35 Merge sort Page: 40 Quicksort Page: 49 Recap Page: 57 Further reading Page: 59 4 A Lower Bound for Sorting and How to Beat It Page: 60 Rules for sorting Page: 60 The lower bound on comparison sorting Page: 61 Beating the lower bound with counting sort Page: 62 Radix sort Page: 68 Further reading Page: 70 5 Directed Acyclic Graphs Page: 71 Directed acyclic graphs Page: 74 Topological sorting Page: 75 How to represent a directed graph Page: 78 Running time of topological sorting Page: 80 Critical path in a PERT chart Page: 80 Shortest path in a directed acyclic graph Page: 85 Further reading Page: 89 6 Shortest Paths Page: 90 Dijkstra’s algorithm Page: 92 The Bellman-Ford algorithm Page: 101 The Floyd-Warshall algorithm Page: 106 Further reading Page: 114 7 Algorithms on Strings Page: 115 Longest common subsequence Page: 115 Transforming one string to another Page: 121 String matching Page: 129 Further reading Page: 136 8 Foundations of Cryptography Page: 138 Simple substitution ciphers Page: 139 Symmetric-key cryptography Page: 140 Public-key cryptography Page: 144 The RSA cryptosystem Page: 146 Hybrid cryptosystems Page: 155 Computing random numbers Page: 156 Further reading Page: 157 9 Data Compression Page: 158 Huffman codes Page: 160 Fax machines Page: 167 LZW compression Page: 168 Further reading Page: 178 10 Hard? Problems Page: 179 Brown trucks Page: 179 The classes P and NP and NP-completeness Page: 183 Decision problems and reductions Page: 185 A Mother Problem Page: 188 A sampler of NP-complete problems Page: 190 General strategies Page: 205 Perspective Page: 208 Undecidable problems Page: 210 Wrap-up Page: 211 Further reading Page: 212 Bibliography Page: 213 Index Page: 215
Description: