Bite-Sized Mathematics for Computer Science

Notes on MIT's 6.042J

Eda Eren
Table of Contents

Introduction

Prerequisites & Resources

Unit 1: Proofs

01. (Two) Proof Methods

02. The Well Ordering Principle

03. Logic & Propositions

04. Quantifiers and Predicate Logic

05. Sets

06. Binary Relations

07. Induction

08. State Machines — Invariants

09. Recursive Definitions

10. Infinite Sets

Unit 2: Structures

11. GCDs

12. Congruences

13. Euler's Theorem

14. RSA Encryption

15. Digraphs: Walks and Paths

16. Directed Acyclic Graphs

17. Partial Orders and Equivalence

18. Degrees & Isomorphism

19. Coloring & Connectivity

20. Trees

21. Stable Matching

Unit 3: Counting

22. Sums & Products

23. Asymptotics

24. Counting with Bijections

25. Repetitions & Binomial Theorem

26. Pigeonhole Principle, Inclusion-Exclusion

Unit 4: Probability

27. Intro to Discrete Probability

28. Conditional Probability

29. Independence & Causality

30. Random Variables, Density Functions

31. Expectation

32. Deviation: Markov & Chebyshev Bounds

33. Sampling & Confidence

34. Random Walks & PageRank

Introduction to Proofs

Propositions

So, what is a proposition?

A proposition is a statement that is either true or false.

Both of these are propositions:

3+5=83 + 5 = 8
2+2=52 + 2 = 5

While the first one is true, the second is false. But, both of them are propositions.

However, it is not always easy to decide whether a proposition is true or false. For example, a statement like "It is five o'clock" has a truth value that varies depending on the circumstance.

Now, here is another proposition:
The value of n2+n+41n^2 + n + 41 is prime for every nonnegative integer nn.

Starting with 00, we can check as many values for nn as we wish. Eventually though, we will find that plugging 4040 for nn gives a number that is not a prime. So, we have found that this proposition is, in fact, false.

But, we had to try only 40 different values to find that out. Now, imagine if things were not so easy. Here is the thing:

You can’t check a claim about an infinite set by checking a finite set of its elements.

A beautiful example of this is Goldbach's conjecture, which states that every even integer greater than 2 is the sum of two primes. We know that's true for numbers up to 4×10184 \times 10^{18}, but we don't know if the proposition itself is true.

Predicates

A predicate is a proposition with a variable — which means that we don't know its truth value until we are given a value for the variable.

If P(n)P(n) is the predicate "nn is a perfect square", then P(4)P(4) would be true, but P(5)P(5) would be false.

Axioms

Propositions that are accepted to be true are called axioms.

A sequence of logical deductions from axioms that concludes with the proposition in question is called a proof.

When it comes to proofs, there are some more terminology we need to be aware of:

theorems: important true propositions.
lemma: a preliminary proposition useful for proving later propositions.
corollary: a proposition that follows in few logical steps from a theorem.

This axiom-and-proof strategy was invented by Euclid, and is called the axiomatic method.