
See where sets, functions and counting already run inside everyday code and AI, and how this course will teach them.
Count the outcomes of a multi-step choice with the product rule, and see why length beats character variety in passwords.
Build truth tables for not, and, or, exclusive or, implies and if and only if, and predict how many rows a table needs.
Simplify a condition with De Morgan's laws, prove the rewrite with a truth table, and tell an implication's converse, inverse and contrapositive apart.
Read and negate statements with for all and there exists, see why their order matters, and test an argument's validity on the rows where every premise is true.
Tell satisfiable from valid formulas, explain what a SAT solver answers and where SAT and SMT solvers run, and trace forward and backward chaining as repeated modus ponens.
Write a direct proof by assuming the hypothesis and unfolding definitions, and switch to the contrapositive when the direct route stalls.
Prove a statement by contradiction, and prove a statement by cases whose cases cover every possibility.
Find the faulty step in a flawed proof and name the bug pattern behind it, whether it assumes the conclusion, proves the converse, or misses a case.
Prove a statement for every natural number with a base case at zero and a step from n to n plus one, and find the broken step in a faulty induction proof.
Use strong induction when the step needs cases further back than n, and choose enough base cases to cover how far the step reaches.
Find a loop invariant, check that it holds on entry and is kept by the body, and use it with the stopped loop condition to prove a loop correct, separately from proving that it stops.
Combine sets with union, intersection and complement as or, and and not, count subsets with bit strings, and size a Cartesian product.
Classify a function as injective, surjective or bijective from its arrow diagram, tell codomain from range, compose functions, and know that only bijections have inverses.
Treat a relation as a set of pairs, test it for reflexive, symmetric and transitive, turn an equivalence relation into a partition, and draw a partial order as a Hasse diagram.
Compare the sizes of infinite sets with bijections, list the integers to show they're countable, and follow Cantor's diagonal argument that the reals are not.
Combine the sum rule (for disjoint cases) and the product rule (for stages with a fixed number of options) to count a set too big to list.
Decide whether order matters, count with permutations and n choose k, and explain Pascal's identity and the binomial theorem by counting.
Use the pigeonhole principle and its generalized form to prove that collisions must happen, and count overlapping sets of two and three with inclusion-exclusion.
Model a random experiment as a sample space, compute event and conditional probabilities by counting outcomes, and test two events for independence.
Flip a conditional probability with Bayes' rule, and combine several pieces of evidence the way a naive Bayes spam filter does.
Compute expected values with linearity of expectation and indicator variables, and use the birthday problem to estimate hash-collision odds.
Use divisibility, remainders and primes to compute a gcd with Euclid's algorithm, then run it backwards to write the gcd as a combination of the two numbers.
Work with congruences mod n, decide when an inverse exists and find it, and explain how a mod-10 check digit catches typing errors.
Trace a small RSA key generation, encryption and decryption by hand using Euclid, inverses and fast modular exponentiation, and explain why RSA is scheduled to be phased out.
Model a map as a graph, count degrees with the handshaking lemma, decide whether an Euler walk or tour exists, and test a graph for two-colorability.
Trace breadth-first search, depth-first search and Dijkstra's algorithm on a small graph, and say what each one finds and what it costs.
Build a minimum spanning tree with Kruskal's and Prim's algorithms, and order tasks with dependencies by a topological sort.
Turn a recursive process into a recurrence with initial conditions, then solve it, by guess-and-check for Hanoi and by characteristic roots for Fibonacci.
Prove a big O, big Omega or big Theta bound by finding c and n0, rank logs, polynomials and exponentials, and avoid the classic big O blunders.
Write divide-and-conquer recurrences, solve them with a recursion tree and the simplified Master Theorem, and explain why self-attention costs order n squared per layer.
This course contains the use of artificial intelligence.
Discrete math is the toolkit under every program you write and every model you train. A tokenizer is a set and a function. A hash is a pigeonhole argument. Encryption is modular arithmetic. Search is graph traversal. And the cost of attention is a Big-O question.
This course teaches that toolkit the way it sticks: you watch each idea build up on screen, you solve it yourself, then you practise.
How it works
Watch. Every concept is animated step by step: truth tables fill in row by row, proofs assemble line by line, graphs get searched in front of you, recursion trees unfold
Solve. Every lecture stops for a "your turn" problem. Pause, try it, then see the worked answer
Practise. Every section ends with a quiz and a downloadable practice set that ramps from warm-up to challenge, with every solution worked out in full
What makes it different
Proofs as a skill. You get a whole section on writing proofs (direct, contrapositive, contradiction, cases), including a lab where you find the bug in flawed proofs. Induction then reappears for code: loop invariants
Every topic tied to real CS and AI. For example: SAT solvers in package managers, naive Bayes spam filtering, birthday-bound hash collisions, RSA and the move to post-quantum standards, BFS/Dijkstra/topological sort, why attention is quadratic, and how byte pair encoding builds a tokenizer
Compact. About two hours of focused video in eleven sections. The practice sets are where you spend the extra time
Checked. Facts are sourced to primary references, and every number and answer in the course was verified by a script