I Proofs
II StructuresIII CountingIV ProbabilityV Recurrences
I Proofs
Introduction0.1 References1 What is a Proof?
1.1 Propositions
1.2 Predicates1.3 The Axiomatic Method1.4 Our Axioms1.5 Proving an Implication1.6 Proving an “If and Only If”1.7 Proof by Cases1.8 Proof by Contradiction1.9 Good Proofs in Practice1.10 References2 The Well Ordering Principle
2.1 Well Ordering Proofs
2.2 Template for Well Ordering Proofs2.3 Factoring into Primes2.4 Well Ordered Sets3 Logical Formulas
3.1 Propositions from Propositions
3.2 Propositional Logic in Computer Programs3.3 Equivalence and Validity3.4 The Algebra of Propositions3.5 The SAT Problem3.6 Predicate Formulas3.7 References4 Mathematical Data Types
4.1 Sets
4.2 Sequences4.3 Functions4.4 Binary Relations4.5 Finite Cardinality5 Induction
5.1 Ordinary Induction
5.2 Strong Induction5.3 Strong Induction vs. Induction vs. Well Ordering6 State Machines
6.1 States and Transitions
6.2 The Invariant Principle6.3 Partial Correctness & Termination6.4 The Stable Marriage Problem7 Recursive Data Types
7.1 Recursive Definitions and Structural Induction
7.2 Strings of Matched Brackets7.3 Recursive Functions on Nonnegative Integers7.4 Arithmetic Expressions7.5 Induction in Computer Science8 Infinite Sets
8.1 Infinite Cardinality
8.2 The Halting Problem8.3 The Logic of Sets8.4 Does All This Really Work?II StructuresIntroduction9 Number Theory
9.1 Divisibility
9.2 The Greatest Common Divisor9.3 Prime Mysteries9.4 The Fundamental Theorem of Arithmetic9.5 Alan Turing9.6 Modular Arithmetic9.7 Remainder Arithmetic9.8 Turing’s Code (Version 2.0)9.9 Multiplicative Inverses and Cancelling9.10 Euler’s Theorem9.11 RSA Public Key Encryption9.12 What has SAT got to do with it?9.13 References10 Directed graphs & Partial Orders
10.1 Vertex Degrees
10.2 Walks and Paths10.3 Adjacency Matrices10.4 Walk Relations10.5 Directed Acyclic Graphs & Scheduling10.6 Partial Orders10.7 Representing Partial Orders by Set Containment10.8 Linear Orders10.9 Product Orders10.10 Equivalence Relations10.11 Summary of Relational Properties11 Communication Networks
11.1 Routing
11.2 Routing Measures11.3 Network Designs12 Simple Graphs
12.1 Vertex Adjacency and Degrees
12.2 Sexual Demographics in America12.3 Some Common Graphs12.4 Isomorphism12.5 Bipartite Graphs & Matchings12.6 Coloring12.7 Simple Walks12.8 Connectivity12.9 Forests & Trees12.10 References13 Planar Graphs
13.1 Drawing Graphs in the Plane
13.2 Definitions of Planar Graphs13.3 Euler’s Formula13.4 Bounding the Number of Edges in a Planar Graph13.5 Returning to K5 and K3;313.6 Coloring Planar Graphs13.7 Classifying Polyhedra13.8 Another Characterization for Planar GraphsIII CountingIntroduction14 Sums and Asymptotics
14.1 The Value of an Annuity
14.2 Sums of Powers14.3 Approximating Sums14.4 Hanging Out Over the Edge14.5 Products14.6 Double Trouble14.7 Asymptotic Notation15 Cardinality Rules
15.1 Counting One Thing by Counting Another
15.2 Counting Sequences15.3 The Generalized Product Rule15.4 The Division Rule15.5 Counting Subsets15.6 Sequences with Repetitions15.7 Counting Practice: Poker Hands15.8 The Pigeonhole Principle15.9 Inclusion-Exclusion15.10 Combinatorial Proofs15.11 References16 Generating Functions
16.1 Infinite Series
16.2 Counting with Generating Functions16.3 Partial Fractions16.4 Solving Linear Recurrences16.5 Formal Power Series16.6 ReferencesIV ProbabilityIntroduction17 Events and Probability Spaces
17.1 Let’s Make a Deal
17.2 The Four Step Method17.3 Strange Dice17.4 The Birthday Principle17.5 Set Theory and Probability17.6 References18 Conditional Probability
18.1 Monty Hall Confusion
18.2 Definition and Notation18.3 The Four-Step Method for Conditional Probability18.4 Why Tree Diagrams Work18.5 The Law of Total Probability18.6 Simpson’s Paradox18.7 Independence18.8 Mutual Independence18.9 Probability versus Confidence19 Random Variables
19.1 Random Variable Examples
19.2 Independence19.3 Distribution Functions19.4 Great Expectations19.5 Linearity of Expectation20 Deviation from the Mean
20.1 Markov’s Theorem
20.2 Chebyshev’s Theorem20.3 Properties of Variance20.4 Estimation by Random Sampling20.5 Confidence in an Estimation20.6 Sums of Random Variables20.7 Really Great Expectations21 Random Walks
21.1 Gambler’s Ruin
21.2 Random Walks on GraphsV RecurrencesIntroduction22 Recurrences
22.1 The Towers of Hanoi
22.2 Merge Sort22.3 Linear Recurrences22.4 Divide-and-Conquer Recurrences22.5 A Feel for Recurrences