Computer Science › Foundations of Computer Science

Discrete Mathematics & Logic

0 of 26
  1. Propositions, Connectives, and Truth Tables

    Formalizing true/false statements with logical connectives (¬, ∧, ∨, →, ↔) and the truth tables that pin down exactly what each one means.

    Read →6 sections14 min
  2. Logical Equivalence and Tautologies

    Two formulas that always agree in truth value, and the identities (De Morgan's laws among them) that let you rewrite one into the other.

    Read →6 sections12 min
  3. Predicates and Quantifiers

    Statements that depend on a variable (predicates), and the universal (∀) and existential (∃) quantifiers that turn them into full propositions.

    Read →6 sections12 min
  4. Sets, Subsets, and Set Operations

    Sets, subsets, and the operations — union, intersection, difference, complement — that combine them.

    Read →6 sections12 min
  5. Power Sets and Cartesian Products

    The power set (the set of all subsets) and the Cartesian product (the set of ordered pairs) — the two constructions that make relations and functions possible.

    Read →6 sections15 min
  6. Relations and Their Properties

    A relation as a subset of a Cartesian product, and the properties — reflexive, symmetric, transitive — that classify how its elements relate to one another.

    Read →6 sections15 min
  7. Graphs: Terminology and Representations

    Vertices and edges, directed and undirected graphs, and the two standard ways — adjacency matrix, adjacency list — to represent one in a program.

    Read →6 sections14 min
  8. Planar Graphs

    A graph that can be drawn on a plane with no edges crossing, and Euler's formula relating its vertices, edges, and faces.

    Read →6 sections14 min
  9. Trees

    A connected graph with no cycles — the structure behind hierarchies, and the properties (n vertices, n-1 edges) that make a tree a tree.

    Read →6 sections13 min
  10. Functions: Injective, Surjective, Bijective

    A function as a special kind of relation, and the three properties — injective, surjective, bijective — that describe how its inputs map to its outputs.

    Read →6 sections15 min
  11. Permutations and Combinations

    Counting the number of ways to arrange (permutations) or choose (combinations) elements from a set, with or without order mattering.

    Read →6 sections13 min
  12. The Inclusion-Exclusion Principle

    Counting the size of a union of overlapping sets by adding and subtracting the sizes of their intersections.

    Read →6 sections12 min
  13. The Pigeonhole Principle

    If more items are placed into containers than there are containers, some container must hold more than one — a simple idea with surprisingly powerful consequences.

    Read →6 sections13 min
  14. Partial Orders

    A relation that is reflexive, antisymmetric, and transitive — capturing "comes before" relationships that don't have to compare every pair of elements.

    Read →6 sections15 min
  15. Equivalence Relations and Partitions

    A relation that is reflexive, symmetric, and transitive splits its set into disjoint equivalence classes — one idea with two equivalent descriptions.

    Read →6 sections15 min
  16. Venn Diagrams and Set Identities

    Visualizing set operations with Venn diagrams, and proving set identities like De Morgan's laws for sets rigorously rather than just from the picture.

    Read →6 sections14 min
  17. Negating Quantified Statements

    The precise rule for negating a quantified statement — ∀ becomes ∃ (and vice versa) as the negation moves inward — and why getting this wrong is one of the most common proof-writing mistakes.

    Read →6 sections11 min
  18. The Well-Ordering Principle

    Every non-empty set of non-negative integers has a least element — the quiet assumption underneath induction and many number-theoretic proofs.

    Read →6 sections14 min
  19. Mathematical Induction

    Proving a statement holds for every natural number by proving a base case and a step that carries truth from n to n+1.

    Read →6 sections12 min
  20. Divisibility, Primes, and the Euclidean Algorithm

    Divisibility, prime numbers, and the Euclidean algorithm for computing the greatest common divisor without factoring.

    Read →6 sections13 min
  21. Modular Arithmetic

    Arithmetic that wraps around after reaching a modulus — the mathematics behind clocks, hashing, and cryptography.

    Read →6 sections13 min
  22. Strong Induction

    A variant of induction where the inductive step gets to assume the statement holds for every smaller case, not just the one immediately before it.

    Read →6 sections13 min
  23. Recursive Definitions and Structural Induction

    Defining an object in terms of smaller instances of itself, and proving properties about it by induction on that same structure — the same idea behind recursion in code.

    Read →6 sections15 min
  24. Direct Proof and Proof by Contraposition

    Proving "if P then Q" directly by assuming P and deriving Q, or equivalently by proving the contrapositive "if not Q then not P".

    Read →6 sections13 min
  25. Proof by Contradiction

    Assuming a statement is false and deriving an absurdity, which forces the original statement to be true.

    Read →6 sections13 min

Discrete Mathematics & Logic

Part of the Computer Science curriculum.

Sort
1

What Is a Mathematical Proof?

What separates a convincing argument from a rigorous mathematical proof, and why computer science leans on proof the same way it leans on code.

2

Propositions, Connectives, and Truth Tables

Formalizing true/false statements with logical connectives (¬, ∧, ∨, →, ↔) and the truth tables that pin down exactly what each one means.

3

Logical Equivalence and Tautologies

Two formulas that always agree in truth value, and the identities (De Morgan's laws among them) that let you rewrite one into the other.

4

Predicates and Quantifiers

Statements that depend on a variable (predicates), and the universal (∀) and existential (∃) quantifiers that turn them into full propositions.

5

Sets, Subsets, and Set Operations

Sets, subsets, and the operations — union, intersection, difference, complement — that combine them.

6

Power Sets and Cartesian Products

The power set (the set of all subsets) and the Cartesian product (the set of ordered pairs) — the two constructions that make relations and functions possible.

7

Relations and Their Properties

A relation as a subset of a Cartesian product, and the properties — reflexive, symmetric, transitive — that classify how its elements relate to one another.

8

Graphs: Terminology and Representations

Vertices and edges, directed and undirected graphs, and the two standard ways — adjacency matrix, adjacency list — to represent one in a program.

9

Planar Graphs

A graph that can be drawn on a plane with no edges crossing, and Euler's formula relating its vertices, edges, and faces.

10

Trees

A connected graph with no cycles — the structure behind hierarchies, and the properties (n vertices, n-1 edges) that make a tree a tree.

11

Functions: Injective, Surjective, Bijective

A function as a special kind of relation, and the three properties — injective, surjective, bijective — that describe how its inputs map to its outputs.

12

Permutations and Combinations

Counting the number of ways to arrange (permutations) or choose (combinations) elements from a set, with or without order mattering.

13

The Inclusion-Exclusion Principle

Counting the size of a union of overlapping sets by adding and subtracting the sizes of their intersections.

14

The Pigeonhole Principle

If more items are placed into containers than there are containers, some container must hold more than one — a simple idea with surprisingly powerful consequences.

15

Partial Orders

A relation that is reflexive, antisymmetric, and transitive — capturing "comes before" relationships that don't have to compare every pair of elements.

16

Equivalence Relations and Partitions

A relation that is reflexive, symmetric, and transitive splits its set into disjoint equivalence classes — one idea with two equivalent descriptions.

17

Venn Diagrams and Set Identities

Visualizing set operations with Venn diagrams, and proving set identities like De Morgan's laws for sets rigorously rather than just from the picture.

18

Negating Quantified Statements

The precise rule for negating a quantified statement — ∀ becomes ∃ (and vice versa) as the negation moves inward — and why getting this wrong is one of the most common proof-writing mistakes.

19

The Well-Ordering Principle

Every non-empty set of non-negative integers has a least element — the quiet assumption underneath induction and many number-theoretic proofs.

20

Mathematical Induction

Proving a statement holds for every natural number by proving a base case and a step that carries truth from n to n+1.

21

Divisibility, Primes, and the Euclidean Algorithm

Divisibility, prime numbers, and the Euclidean algorithm for computing the greatest common divisor without factoring.

22

Modular Arithmetic

Arithmetic that wraps around after reaching a modulus — the mathematics behind clocks, hashing, and cryptography.

23

Strong Induction

A variant of induction where the inductive step gets to assume the statement holds for every smaller case, not just the one immediately before it.

24

Recursive Definitions and Structural Induction

Defining an object in terms of smaller instances of itself, and proving properties about it by induction on that same structure — the same idea behind recursion in code.

25

Direct Proof and Proof by Contraposition

Proving "if P then Q" directly by assuming P and deriving Q, or equivalently by proving the contrapositive "if not Q then not P".

26

Proof by Contradiction

Assuming a statement is false and deriving an absurdity, which forces the original statement to be true.