-
From Jeff Erickson
Logistics Read the questions Pareto-optimal points Separating points with parallel lines Rooted subtree search Nesting boxes Escape wiring Elmo and Daisy play cards… -
From Jeff Erickson
Splay trees Amortized time via potential function Access Lemma ⇒ O(log n) amortized time per splay Generalized Access Lemma ⇒ static optimality What is a… -
From Jeff Erickson
What are online algorithms? Example: paging The lost cow problem Exponential search is 9-competitive Randomizing first step direction: expected competitive ratio 7 [Kao,… -
From Jeff Erickson
LP duality: swap roles of matrix constraints and variables Weak duality theorem: cx ≤ yAx ≤ yb Physical interpretation of optimal dual solution Vocabulary: basis,… -
From Jeff Erickson
Definition of linear programming Example: Maximum flows Geometry: Lowest point in a convex polyhedron Infeasible and unbounded LPs Canonical (standard inequality) form… -
From Jeff Erickson
Minimum-cost circulations Cycle cancelling Minimum-cost flows Feasible then balanced then locally optimal Successive shortest paths: feasible and locally optimal then… -
-
From Jeff Erickson
General strategy Scheduling final exams Tuple selection Disjoint path cover in dags Cycle cover in directed graphs -
From Jeff Erickson
hashing collisions leaves in treaps Thomas the Tank Engine gets COVID cyclic shifts of strings -
From Jeff Erickson
Edge-disjoint paths Undirected graphs Vertex capacities and vertex-disjoint paths Maximum bipartite matching The Jacobi-Berge alternating path algorithm (aka… -
From Jeff Erickson
Definition review Ford-Fulkerson Bad example with integer capacities Really bad example with irrational capacities Decomposing flows into paths and cycles Good… -
From Jeff Erickson
Definition of maximum flows Definition of minimum cuts The maxflow-mincut theorem Easy direction: follow the inequalities Harder direction: Residual graphs… -
From Jeff Erickson
Avoiding redundant comparisons The fail function and finite-state machine Knuth-Morris-Pratt: O(n) worst-case time Border of P = any proper prefix of P that is also a… -
From Jeff Erickson
The string matching problem Almost brute force -> O(mn) worst-case time but usually good in practice unless you are a potato Intuition: interpret strings as numbers… -
From Jeff Erickson
Open addressed hashing Fictional analysis: Strongly universal hashing Linear probing and binary probing Analysis of binary probing: full versus popular 2-uniformity and… -
From Jeff Erickson
Hash table definitions and standard fiction Deterministic hash functions are stupid. Families of hash functions Uniform (yawn), universal, and strongly universal… -
From Jeff Erickson
What are tail inequalities? Markov's inequality: Pr[ X > x ] ≤ E[X} / x Independent random variables Chebyshev: If X is sum of pairwise-independent 0/1… -
From Jeff Erickson
Binary search tree (ordered dictionary) operations Treaps: BST with respect to keys + min-heap with respect to priorities Insert, delete, split, and join algorithms;… -
From Jeff Erickson
Midterm 1 logistics Rawlins’ nuts and bolts problem Reductions to and from sorting nuts and/or bolts Randomized quicksort! Full-history recurrence Back of the… -
From Jeff Erickson
Reflections|Projections! Randomized algorithms: what and why? Discrete sample spaces, good old rock, events, probability, conditional probability Random variables:… -
From Jeff Erickson
Finding minimum elements in every row of an array No other information: Brute force O(mn) is optimal Monotone: Minima in higher rows are above/left of minima in later… -
From Jeff Erickson
Dynamic programming over directed acyclic graphs: longest path Saving space: Sliding windows Reconstructing structure by walking through memorized data Choudhury and… -
5. Even more dynamic programming
01:14:31duration 1 hour 14 minutes
5. Even more dynamic programming
From Jeff Erickson
Intuitive sketches of common recursion patterns Dynamic programming in trees: Maximum independent set Memoization is depth-first search; dynamic programming is postorder… -
-
From Jeff Erickson
Example 1: Text segmentation (Interpunctio verborum) A sequence of X's is either nothing or an X followed by a sequence of X's Where does the first word end?… -
From Jeff Erickson
Representing polynomials as coefficients, roots, or sample values Converting from coefficients to samples is a linear transformation Divide-and-conquer via collapsible… -
From Jeff Erickson
Technical difficulties Welcome, introduction, about this class, important course policies Recursion: Tower of Hanoi Recursion: Karatsuba multiplication