home
Discrete Math: Resources
Contents
- Useful definitions and properties
- Propositions, if-then statements, and straightforward proofs
- Sets
- Proof techniques
- Proof by contrapositive, contradiction, and smallest counterexample
- Proof by induction
- Pigeonhole principle
- Non-constructive existence proofs
- A few things to avoid
- Logic
- Binary relations and Functions
- Big-O notation
- Recurrence relations using big-O
- Graphs
- Intro
- Cliques, Independent sets, Ramsey numbers
- Connectivity and trees. Binary trees.
- Minimum spanning trees (MST)
- Planarity
- Vertex coloring
- Other graph topics
- Summations
- Combinatorics
- Probability
- Intro
- Conditional probability
- Random variables
- Indicator random variables
- More fun with probability
- Useful definitions and properties (This is reference material, not an actual lesson)
- Main classification of numbers (just the definitions)
- Common functions: pages 53-59 in CLRS.
- Factorial. (definition)
- Scheinerman 2(9), Rosen p.151.
- Floor and ceiling. (definition)
- Scheinerman 5(29), p.208, Rosen p.149
- Modular arithmetic. (definition and examples)
- Scheinerman 7(37), MCS 9.6, Rosen 4.1.
- Polynomials. (definition and arithmetic)
- Exponentiation
- Wiki.
Pay attention to "Integer exponents", especially "Identities and properties"
(3.1 to 3.4)
- Rosen, Appendix 2.
- Logarithm
- Wiki.
Pay attention to "Definition" (1.2), "Examples" (1.3), and identities (2.1, 2.2).
- Rosen, Appendix 2.
- Fibonacci numbers
- Series (and their sums)
- Geometric series.
- This is often crucial for the analysis of algorithms.
- See p.1147 in CLRS (appendix A). In MCS see beginning of 14, and 14.1.4. Rosen, p.164.
- Zeno's paradox
- xkcd 994 ... xkcd 1153
- Arithmetic series.
We prove the equality in several ways, in section 3. Also see p.1146 in CLRS (Appendix A).
- Harmonic series: see p.1147 in CLRS.
- Telescoping series (definition and first example). See p.1148 in CLRS. MCS 14.4.2. Rosen, p.321.
- Propositions, if-then statements, and straightforward proofs
- Prerequisite knowledge: basic exponent rules (see first page of notes)
- Class notes:
full slideshow and
condensed
- Video:
- Part 1 (propositions, conjectures, notation) [11.5 min]
- Part 2 (theorems, if-then, IFF, straightforward proofs) [29 min]
- Textbook chapters:
- MCS: 1.1 -- 1.7
- Scheinerman: 1(1-6)
- Rosen: First 10 pages.
- Sets
- Prerequisite knowledge: none
- Class notes:
full slideshow and
condensed
- Video:
- Textbook chapters:
- MCS: 4.1 and 4.2
- Scheinerman: 2(8,10,12)
- Rosen: 2.1 and 2.2. Some of 2.5
- CLRS: Appendix B.1
- Proof techniques
- Proof by contrapositive, contradiction, and smallest counterexample
- Prerequisite knowledge: section 2. A couple definitions about prime numbers are mentioned in one proof. See first page of the notes.
- Class notes:
full slideshow and
condensed
- Video:
- Part 1 (describing proof by contrapositive) [16 min]
- Part 2 (three proofs by contrapositive, three proofs by contradiction, including that
√2 is irrational) [25 min]
- Part 3 (proof by contradiction: infinite number of primes. Smallest counterexample: sum of odd numbers) [17.5 min]
- Part 4 (smallest counterexample: 2n > n2, and Fibonacci numbers grow exponentially) [13.5 min]
- Part 5 (smallest counterexample: empty pentagons) [14min]
- Textbook chapters:
- MCS: 1.5, 1.8, 2.2
- Scheinerman: 4(20,21)
- Rosen: chapter 1.7, p.83--88
- Proof by induction
- Prerequisite knowledge: section 2. [factorial of zero and sum or zero objects appear in a proof; see first page of notes]
- Class notes:
full slideshow and
condensed
- Video:
- Part 1 [11min]
(intro and a geometric series example)
- Part 2 [32.5min]
(six examples, including strong induction, and integers being products of primes)
- Part 3 [20min]
(three examples, including a lesson about failing and trying again)
- Part 4 [21min]
(two examples, focusing on recurrences)
- Textbook chapters:
- MCS: 5
- Scheinerman: 4(22)
- Rosen: 5
- CLRS: Appendix A.2
- Pigeonhole principle
- Prerequisite knowledge: number of subsets in a set, sum of powers. Section 4A. (only for some proofs; see first page of notes).
- Class notes:
full slideshow and
condensed
- Video:
- Textbook chapters:
- MCS: 15.8
- Scheinerman: 5(25)
- Rosen: chapter 6.2
- Non-constructive existence proofs
- Prerequisite knowledge: None
- A few things to avoid
- Logic
- Prerequisite knowledge: Just a couple definitions from section 2 (see first page of notes)
- Class notes:
full slideshow and
condensed
- Video:
- Textbook chapters:
- MCS: chapter 3
- Scheinerman: 1(7) and 2(11)
- Rosen: A lot of chapter 1 is related to this material. You could look at the beginning of chapter 12 as well.
- Binary relations and functions
- Prerequisite knowledge: definition of set.
- Class notes:
- Video:
- Textbook chapters:
- MCS: 4.3 and 4.4
- Scheinerman: Relations are covered in 3(14,15). Functions are covered in 5(24)
- Rosen: 2.3 for functions, 9.1 for relations.
- CLRS: Appendix B.2 (for Relations). Appendix B.3 (for Functions). See p.1152 for splitting summations.
- Big-O notation
- Prerequisite knowledge: it helps to be familiar with common functions
(e.g., polynomial vs exponential vs logarithmic).
- Class notes:
-
Video:
- Spring'19 algorithms lecture. This also includes a description of Insertion sort, as justification for using bigO. You can start at 15:45. You are not responsible for anything in the video that's not in the course notes. [Remaining time: 32min]
- part 2 of video. You can stop at 10:27. Also, I won't focus much (or at all?) on little-o or little-omega in this course.
- Exaggerate and Simplify [22min]
- Textbook chapters:
- MCS: 14.7
- Scheinerman: 5(29). Note that the definitions for big-O and big-Omega differ slightly from mine. I assume that functions are positive, which is quite standard for CS.
- Rosen: 3.2
- CLRS : 2, p.43-52. This textbook is consistent with how I define things.
- Recurrence relations using big-O
- Prerequisite knowledge: sections 4B and 7. Geometric series.
- Class notes:
full
slideshow
and
condensed. (This also covers Mergesort, which is a simple example of an algorithmic technique called "divide and conquer". Although this isn't a course on Algorithms, I think it's worth keeping this as part of our course material)
- Video
- Slideshow with audio (including slightly refreshed course notes)
- From a 2017 lecture in an algorithms class. (Older than the above slideshow)
- Textbook chapters:
- Graphs
- Intro (examples, representation, degree, regularity, isomorphism, subgraphs)
- Prerequisite knowledge: very little: e.g., arithmetic series, some notation for sets.
- Class notes:
full slideshow and
condensed
- Video
- Textbook chapters:
- MCS: 12.1 -- 12.4
- Scheinerman: 9(47 and the first 2 pages of 48).
- Rosen: 10.1 -- 10.3
- CLRS: Appendix B.4, B.5. Also, chapter 22, p.589-592.
- Links
- Graph isomorphism
- Graph enumeration
- Miscellaneous
- Cliques, independent sets, Ramsey numbers
- Prerequisite knowledge: section 9A
- Class notes:
full slideshow and
condensed.
- Video:
- Textbook chapters:
- Scheinerman: 9(48).
- Rosen: p.404-405
- Links
- Ramsey numbers (cliques vs independent sets)
- R(x,y) represents the smallest integer N such that in any graph of size at least N there is
either a clique of size x or an independent set of size y.
- Here is a
wiki about R(3,3).
- R(4,3)
Here is a link
showing R(4,3)=9, without resorting to a recurrence as in the previous link. (see 2 paragraphs before the 2nd figure).
- R(4,4): requires knowledge of R(4,3).
- R(5,5) is unknown!
- wiki on Ramsey's theorem.
Notice that there are also Ramsey numbers with
more than 2 parameters.
- Games
- "Sim" (wiki) is a game where 2 players take turns
coloring the edges of K6. One player uses red and the other uses blue. Whoever completes a
triangle of their own color loses. An extended version of the game asks two players to color
K18, while avoiding coloring a monochromatic K4. There is a 3-player
version as well. Ramsey theory tells us that these games cannot end in a draw.
- A variant of sim is Hajnal's triangle-free game, discussed
here.
Two players take turns adding edges, with the restriction that neither can complete a triangle. However, there are no
colors in this game. A player wins if the other player cannot add an edge.
The game can also be played using a score that
is just the total number of edges added. The goal of one player is to maximize the score, and the goal of the 2nd
player is to force a configuration where no edge can be added, as quickly as possible. Finally there is also a variant
with an additional constraint, where the graph must remain connected at all times.
- Connectivity and trees. Binary trees.
- Class notes:
- Video:
- Textbook chapters:
- MCS: 12.8, 12.9
- Scheinerman: 9(49,50).
- Rosen: 10.4, 11.1 -- 11.4.
- CLRS: parts of appendix B.4, B.5
- Links:
- Minimum spanning trees (MST)
- Class notes:
full slideshow
and condensed
- Video:
- Textbook chapters:
- MCS: 12.9.4 but I recommend a different source.
- Rosen: 11.5
- CLRS: chapter 23, p.624-629.
- Planarity
- Class notes: full slideshow
and
condensed
- Video:
- Textbook chapters:
- MCS: 13.1 -- 13.5
- Scheinerman: 9(53)
- Rosen: 10.7
- Links
- Euler's formula (for planar graphs)
- The wiki on planar graphs contains a
section on Euler's formula.
- 20 proofs of Euler's formula
- The formula V-E+F=2 is just a particular case of a far greater body of work. As mentioned in class,
if you were to draw a connected graph on a sphere, you'd get the same relation;
The Euler characteristic would be 2.
Similarly, count the vertices, edges and faces on any convex
polyhedron. Other surfaces
have
other characteristic numbers.
- The role of K5 and K3,3
- The wiki on planar graphs starts out by mentioning the theorems of Kuratowski and Wagner,
which essentially say that a graph G is non-planar if and only if the shape of a
K5 or of a K3,3 is present in G.
See here.
Look at the two figures, showing two (non-planar) graphs not directly containing a
K5 or a K3,3, but that implicitly contain those shapes.
The section that follows in the wiki discusses other planarity criteria. Theorem 1 in particular is quite simple, and easy to prove.
- (advanced) notes on Kuratowski's theorem.
The advanced part is proving that any graph not containing K5 or K3,3 as a subgraph -- or as a minor -- must be planar. In other words, non-planarity implies finding such a subgraph/minor.
In our class we only discuss the other direction: i.e., that containing one of those subgraphs implies non-planarity.
- Vertex coloring
- Class notes: full slideshow
and
condensed
- Video:
- Textbook chapters:
- MCS: 12.6 and 13.6
- Scheinerman: 9(52)
- Rosen: 10.8
- Links
- wiki: 4 color theorem
- wiki: Grotzsch's theorem
- Hadwiger-Nelson problem: This is an awesome vetex coloring problem, with an infinite number of vertices: all points in the plane. It is explained nicely in this
wiki.
- Edge coloring
- The idea here is to color edges of a graph, so that no vertex is incident to 2 edges of the same color.
Of course, you must minimize the number of colors used.
- wiki
(see the applications section).
- Other graph topics (if time permits)
- Eulerian paths (covered in Scheinerman chapter 9(51), Rosen 10.5)
- Hamiltonian paths (covered in Rosen 10.5)
- Binary trees.
- Summations
- Prerequisite knowledge: notation and some identities about summations
- Class notes: full slideshow
and
condensed
- Video:
- Textbook chapters:
- MCS: 14.1-14.6
- Scheinerman: N/A
- Rosen: 2.4, 6
- CLRS: Appendix A.1,A.2
- Combinatorics
- Prerequisite knowledge: none, but some previous results are mentioned, without affecting this topic
- Class notes:
- Video:
- Textbook chapters:
- MCS: 15, except 15.8
- Scheinerman: 2(8,9), 3(16,17,18,19)
- Rosen: 6 (except 6.2), 8.5-6
- CLRS: Appendix C.1
- Links:
- Probability
- Intro
- Class notes:
full slideshow and
condensed
- Video:
- Textbook chapters:
- MCS: 17
- Scheinerman: 6(30,31).
- Rosen: 7.1, 7.2
- CLRS: Appendix C.2
- Links
- wiki on poker probability.
- Conditional probability
- Class notes:
- Video:
- Textbook chapters:
- MCS: 17-18
- Scheinerman: 6(32)
- Rosen: 7.2, 7.3
- CLRS: Appendix C.2
- Links
- The birthday problem
- wiki.
- Other versions of this problem exist, e.g., how many people must be in a room for us to expect at least one birthday match? Or, if we ask people iteratively, at what point do we expect to find the first match? See the note in Section 13C, below.
- Another question is: how many people do we expect to ask before recording all possible birthdays?
This is known as the
Coupon Collector's Problem. Here, we have n "coupons". The answer is Theta(nlogn).
- Calculators: Wolfram,
bdayprob,
dcode
- Various numbers in the universe. Near the very bottom of the table, you'll find 1080, the estimated number of particles in the universe.
- Bayes' theorem
- Wiki intro and
examples.
- betterexplained.com "intuitive and short explanation". I would start reading at "Anatomy of a Test". This link includes a calculator for the disease problem.
- Monty Hall problem
- xkcd 1282 ... some people can win this game 100% of the time.
- BBC intro to the problem.
Includes an introductory video. Read the last 3 short paragraphs on diagnostic tests.
- Simulator. If you find a neater one, let me know.
- Another description, including video of a lecture, and an explanation of how the conditional probability formula can be misused.
- Blinky Monty.
A variation of the game, involving some prior knowledge.
- A research paper on an extension of the game:
many doors and many offers to switch.
- TED talk about coins,
diagnosing diseases, and statistics in court cases.
- Law of total probability
- Random variables
- Class notes
full slideshow and
condensed
- Video: Slideshow with audio [18min]
- Textbook chapters:
- MCS: chapter 19.1, 19.2, 19.5 (and some other small parts of chapter 19)
- Scheinerman: 6(33,34)
- Rosen: 7.2, 7.4
- CLRS: Appendix C.3
- Indicator random variables
- Class notes:
full slideshow and
condensed
- Video: Slideshow with audio [32min]
- Textbook chapters:
- MCS: chapter 19.1, 19.2, 19.5 (and some other small parts of chapter 19)
- CLRS: chapter 5.1, 5.2
- Links:
- The hat check problem.
- FYI -
Link 1 and
link 2 calculate the probability
of an outcome for this problem, without IRVs.
- The hiring problem.
- Link.
Note that the second problem in this link, involving birthdays, is mentioned below.
- Harmonic series (related to the hiring problem).
- Finding local maxima in permutations.
- Jump to the 30:00 mark in this youtube video,
which is part of Harvard's
Stat 110 course. This part of the lecture lasts 9 minutes.
After that is an explanation of the St. Petersburg paradox which is fun to think about.
Here's the wiki on that.
- Counting inversions in permutations. (involves IRVs with 2 subscripts)
- Various birthday problems.
- A problem with balls and bins.
- See the second example in this link.
Evaluation of the expected value of each IRV is a bit more complicated in this example than in previous ones.
Note that the first example in this link is equivalent to the hat check problem. It deals with fixed points in permutations.
In a permutation of the integers 1...n, a fixed point occurs when integer k is placed at position k.
- More fun with probability
- Useful textbooks:
I have made an attempt to point to the right chapters or pages in some of the following books, for each of the sections above. Each book introduces discrete math in its own way, emphasizing different concepts. So what appears on page 1 in one book might not appear until chapters later in another, and coverage of some topic can range from nothing up to several chapters. This makes it a bit difficult to be accurate with referencing. Even if I point to some reference, it might not focus on the same things that I have.
Feel free to point out omissions or errors.
- MCS -- Mathematics for Computer Science, by Eric Lehman, F. Thomson Leighton and Albert R. Meyer
- Used at MIT.
- Cost: zero for the pdf (see below). See copyright and terms on first page. Book for sale for under $40.
- Links:
- MIT also has OpenCourseWare videos that are associated with this document. They are easy to find online.
- Scheinerman -- Mathematics: A Discrete Introduction, by Edward A. Scheinerman
- Some of my notes are based on the 3rd edition of this book.
- Link: ams.jhu.edu
- Cost in 2025: under $90 (new)
- Rosen -- Discrete Mathematics and its Applications, by Kenneth H. Rosen
- This is probably the most popular textbook for discrete math.
- Wherever I mention chapters / page numbers, I am referring to the 7th edition.
- Cost in 2025: $90 to $190 (new), depending on the edition.
- CLRS -- Introduction to Algorithms, 3rd edition, by Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest and Clifford Stein.
- As the name suggests, this is a book on Algorithms, which is a topic that relies heavily on Discrete Math. It is not a discrete math book, but a few of the topics on this page are covered briefly in CLRS (some in the appendix, some in regular chapters). CLRS is the primary suggested textbook for my Algorithms course.
- Cost in 2025: $120 (new).
- Other textbooks:
- Fell and Aslam -- Discrete Structures
pdf
- Albertson and Hutchinson -- Discrete Mathematics with Algorithms
- Susanna Epp -- Discrete Mathematics with Applications
- zy-Books -- Discrete Mathematics, by Sandy Irani
- This is an interactive online way of learning. To proceed, one first answers questions that evaluate understanding.
- zybooks.com
- Cost: see website.