# Lecture Notes

1. Probability Theory (PDF)

1.1. Sample spaces and events

1.2. Conditional probability and Independence

1.3. Bayes' rule

1.4. The Inclusion-Exclusion Formula

1.5. Expectation

1.6. Variance

1.7. Chebyshev's inequality

1.8. Weak law of large numbers

2. Pigeonhole Principle (PDF)
3. Probabilistic Method - Van der Waerden's Theorem (PDF)
4. Chernoff Bounds (PDF)

4.1. Preliminaries

4.2. Deviation of a sum on independent random variables

4.3. Chernoff Bound

4.4. Other versions of Chernoff Bound

5. Sequential Choice (PDF)

5.1. A game

5.2. Introduction

5.3. Seeking the very best out of n possibilities

5.4. Calculating probabilities for choosing the very best on a spread-sheet

5.5. Seeking one of the top two (or top L) choices

5.6. Seeking the Best Expected Rank

6. Counting, Coding, Sampling (PDF)

6.1. Some Catalan families

6.2. Coding

6.3. Random sampling

7. Generating Functions (PDF)

7.1. What is a generating function?

7.2. Operations on classes and generating functions

7.3. Number of ways of giving change

7.4. Dots and Dashes

7.5. Generalized Recurrence Equations

7.6. Chord diagrams

7.7. Diagonals in Pascal's triangle

7.8. Exponential generating functions

8. Linear Programming (PDF)

8.1. Basics

8.2. The Simplex Method

8.3. Linear Programming in Matrix Form

8.4. Duality

8.5. Zero-Sum Matrix Games

9. Network Flows (PDF)

9.1. The maximum flow problem

9.2. Expressing as a linear program

9.3. Augmenting path algorithm

9.4. Dual

10. Sorting (PDF)

10.1. The task of sorting

10.2. Some sorting algorithms

11. Median Finding (PDF)

11.1. The problem of finding the median

11.2. A good strategy?

11.3. Showing the Procedure is Linear

11.4. Improving the procedure

12. Median Finding and QUICKSORT (PDF)

12.1. Randomized Median Finding

12.2. QUICKSORT

13. Sorting Networks (PDF)

13.1. Batcher's Algorithm

14. Modular Arithmetic and Elementary Algebra (PDF)

14.1. Euclid's Algorithm

14.2. Modular Arithmetic

14.3. Groups

14.4. Subgroups and cosets

14.5. The Chinese Remainder Theorem

14.6. Fields and algebraic equations

15. Cryptography (PDF)

15.1. Public Key Cryptosystems

15.2. The RSA code

15.3. Raising a Number to a High Power

15.4. Primality Testing

16. Factoring (PDF)
17. FFT (Fast Fourier Transform) (PDF)

17.1. Motivation: Fourier Series

17.2. The Discrete Fourier Transform

17.3. Computing the discrete Fourier transform

17.4. Computing convolutions of sequences using Fast Fourier Transform

17.5. Fourier transforms modulo p and fast integer multiplication

18. Shannon's Noiseless Coding Theorem (PDF)

18.1. Some History

18.2. Random data and compression

18.3. Shannon's entropy Theorem

19. Huffman Codes (PDF)
20. Lempel-Ziv Codes (PDF)

20.1. The LZ78 Algorithm

20.2. Worst-Case Analysis

20.3. Average-Case Analysis

21. Shannon's Noisy Coding Theorem (PDF)

21.1. Channel Coding

21.2. Binary symmetric channels

22. Linear Codes (PDF)

22.1. Linear Error Correcting Codes

22.2. Hamming Code

22.3. Perfect Codes