Bite-Sized Mathematics for Computer Science

Notes on MIT's 6.042J

Eda Eren
Table of Contents

Introduction

Prerequisites & Resources

Unit 1: Proofs

00. Introduction to 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

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

Coloring & Connectivity

The graph coloring problem requires that we color the adjacent vertices with different colors, and use as few different colors as possible.

An example graph with 33-coloring:
An example graph with 3-coloring

A graph GG is said to be k-colorablek\text{-colorable} if it has a coloring that uses at most kk colors.
The minimum value of kk is the graph's chromatic number, denoted as χ(G)\chi(G).

It is a challenging problem, to say the least.

The chromatic number of a cycle that has even-numbered vertices is 22: χ(Ceven)=2\chi(C_{\text{even}}) = 2.
An odd-length cycle requires 33 colors: χ(Codd)=3\chi(C_{\text{odd}}) = 3.

A complete graph KnK_n will require nn colors because all the vertices are adjacent to each other: χ(Kn)=n\chi(K_n) = n.

A bipartite graph GG has a chromatic number of 22: χ(G)=2\chi(G) = 2.

A graph GG is kk-colorable iff χ(G)k\chi(G) \leq k.

A graph with maximum degree at most kk is (k+1)-colorable(k + 1)\text{-colorable}.

The maximum degree is the largest vertex degree in a graph. In our example, it is 4. So, our graph is 5-colorable.

That is, if every vertex has at most kk degrees, then χ(G)k+1\chi(G) \leq k + 1.


A graph is connected when every pair of its vertices are connected.

A subgraph is exactly what you might think it is; GG is a subgraph of HH iff V(G)V(H)V(G) \subseteq V(H) and E(G)E(H)E(G) \subseteq E(H).

A connected component of a graph is a subgraph that has some vertex and everything that is connected to it.

So, the connected component of vertex v={w  v and w are connected.}\text{the connected component of vertex } v = \{w \ | \ v \text{ and } w \text{ are connected.}\}

The connection strength is measured by the number of links that fail before connectedness fails.

What does it mean?

Vertices vv and ww are k-edge connectedk\text{-edge connected} if they remain connected whenever fewer than kk edges are removed. That is, when it takes at least kk failures to disconnect them, two vertices are k-edge connectedk\text{-edge connected}.

In other words, k1k - 1 is the amount of edges you can remove without breaking the connectivity between two vertices.
You can remove any amount of edges up to kk, and the vertices will stay connected.

Need more definitions? Here is another one:

Two vertices are k-edge connectedk\text{-edge connected} when it takes at least kk “edge-failures” to disconnect them.

For example, a complete graph, KnK_n, is (n1)-connected(n - 1)\text{-connected}.
Every cycle is 2-connected2\text{-connected}.


If two vertices are connected in a graph GG, but not connected when an edge ee is removed, then ee is called a cut edge of GG.