Algorithms by Jeff Erickson
Subject: Algorithms and Data Structures
Author or source: Jeff Erickson
Updated:
Jeff Erickson’s complete textbook covers recursion, dynamic programming, greedy algorithms, graph traversal, shortest paths, flows and NP-hardness.
Jeff Erickson. Algorithms by Jeff Erickson. First edition, June 2019. CC BY 4.0. Original author PDF reproduced without modification. LawSphereX overview and cover are separate; no endorsement is implied.
Publication sources
Overview of the complete resource
Source page 1–472
This is the complete first edition of Jeff Erickson’s algorithms textbook. The early chapters develop proofs and running-time analysis for recursion, backtracking, dynamic programming and greedy algorithms. Graph chapters cover traversal, minimum spanning trees, shortest paths and flows. The final chapter uses reductions to reason about NP-hardness. A useful exercise is to take one proposed algorithm and write its invariant or recurrence before analysing its cost. For a reduction, state which instance is being transformed and trace both directions of correctness. The accompanying Illinois course and past final exam are related practice from the author’s teaching. Match the topics to your own course before using an exam as a study plan.
Author preface
Source page 6
PREFACE course in data structures and algorithms. In particular, I assume at least passing familiarity with the following specific topics: • Discrete mathematics: High-school algebra, logarithm identities, naive set theory, Boolean algebra, first-order predicate logic, sets, functions, equivalences, partial orders, modular arithmetic, recursive definitions, trees (as abstract objects, not data structures), graphs (vertices and edges, not function plots). • Proof techniques: direct, indirect, contradiction, exhaustive case analysis, and induction (especially “strong” and “structural” induction). Chapter 0 uses induction, and whenever Chapter n−1 uses induction, so does Chapter n. • Iterative programming concepts: variables, conditionals, loops, records, indirection (addresses/pointers/references), subroutines, recursion. I do not assume fluency in any particular programming language, but I do assume experience with at least one language that supports both indirection and recursion. • Fundamental abstract data types: scalars, sequences, vectors, sets, stacks, queues, maps/dictionaries, ordered maps/dictionaries, priority queues. • Fundamental data structures: arrays, linked lists (single and double, linear and circular), binary search trees, at least one form of balanced binary search tree (such as AVL trees, red-black trees, treaps, skip lists, or splay trees), hash tables, binary heaps, and most importantly, the difference between this list and the previous list. • Fundamental computational problems: elementary arithmetic, sorting, searching, enumeration, tree traversal (preorder, inorder, postorder, levelorder, and so on). • Fundamental algorithms: elementary algorism, sequential search, binary search, sorting (selection, insertion, merge, heap, quick, radix, and so on), breadth- and depth-first search in (at least binary) trees, and most importantly, the difference between this list and the previous list. • Elementary algorithm analysis: Asymptotic notation (o, O, Θ, Ω, ω), translating loops into sums and recursive calls into recurrences, evaluating simple sums and recurrences. • Mathematical maturity: facility with abstraction, formal (especially recursive) definitions, and (especially inductive) proofs; writing and following mathematical arguments; recognizing and avoiding syntactic, semantic, and/or logical nonsense. The book briefly covers some of this prerequisite material when it arises in context, but more as a reminder than a good introduction. For a more thorough overview, I strongly recommend the following freely available references: ii