1. Claims and Proofs A. Propositional Logic B. Quantifiers C. Proofs and Counterexamples 2. Induction A. Simple Induction B. Strong Induction C. Generalized Induction D. Proofs about Algorithms E. Divide-and-Conquer Algorithms F. Recurrences 3. Protocol Design and Analysis A. Stable Marriage B. Fair Cake-cutting 4. Number Theory A. Modular Arithmetic B. Inverses, GCD C. Algebraic Algorithms Most important: Proofs, Proof by induction, Number theory Proof strategies: - For a claim "P => Q" - Proof by enumeration - Assume P; then show Q - Prove the contrapositive - For a claim "\exists x . P(x)" - Proof by example - For a claim "\forall x . P(x)": - Try proving it for arbitrary x - Try induction over x - Or, induction over, e.g., length(x), etc. - Or, strengthen the proposition P - Look for invariants - Try well-ordering - In general, for a claim "P" - Proof by contradiction: prove "not(P) => false" - Proof by cases (closely related to proof by enumeration) Q: if between every pair of cities there is a one-way road in some direction, show that we can find a tour that starts at one city, ends at some other city, and visits each city exactly once A: pf by induction on # of cities Q: you have a row of n pennies. you're allowed to do exactly one kind of move: pick a penny (not the right-most one), and flip both it and the neighbor to its immediate right. question: for which n can you guarantee that from every initial configuration we can reach the all-heads configuration? A: find an invariant Recall defn of modular arithmetic - congruences as "LHS-RHS is a multiple of m" - congruences as "same remainder after division" - congruences as "equivalence classes" How to solve congruences; examples: - x + 5 = 12 (mod 17) (x = 7 (mod 17)) - 2x + 5 = 12 (mod 17) (x = 9*7 = 12 (mod 17)) Other exercises: n^2 = 1 (mod 2) <=> n = 1 (mod 2) <=: easy; follows from basic number theoretic rules =>: prove contrapositive, i.e., n = 0 (mod 2) => n^2 = 0 (mod 2)