Master discrete mathematics through hands-on Python. Covers sets, functions, logic, Boolean algebra, induction, recursion, graphs, trees, relations, and combinatorics — every concept paired with runnable code and interactive simulations. Build Dijkstra's algorithm from scratch, wire up logic gate circuits, step through recursive call stacks, and drag elements across Venn diagrams. 20 lessons, 7 interactive visualizers, and graded exercises that test both mathematical reasoning and implementation skill.
Sets: The Building Blocks of Mathematics
Set Operations: Combining and Comparing Collections
Interactive: Set Operations Explorer
What is the **power set** of a set S, and if |S| = 4, how many elements does P(S...
Given A = {1, 2, 3, 4} and B = {3, 4, 5, 6}, what is A △ B (symmetric difference...
Functions: Mapping Inputs to Outputs
Composition, Bijections, and Special Functions
A function is injective (one-to-one) if no two different inputs produce the same...
Propositional Logic: The Mathematics of True and False
Logical Equivalence, Implication, and the Laws of Logic
The implication p → q is false in exactly one case. Which one?
Predicate Logic: Adding Variables to Logic
Rules of Inference: The Valid Moves of Logical Reasoning
The negation of "for all x, P(x)" is there exists an x such that not P(x). This ...
Logic Debugging Lab
Boolean Algebra: The Mathematics Behind Every Digital Circuit
Logic Gates and Circuits: From Boolean Expressions to Hardware
Interactive: Logic Circuit Simulator
What makes the NAND gate "universal"? How would you build a NOT gate using only ...
Mathematical Induction: The Domino Principle
Recursion: Functions That Call Themselves
Interactive: Recursion Call Stack Visualizer
Naive recursive Fibonacci has exponential time complexity O(2ⁿ). When we add mem...
Graphs: Modeling Connections and Relationships
Graph Algorithms: Isomorphism, Bipartiteness, and Shortest Paths
Interactive: Dijkstra's Shortest Path Visualizer
Run Dijkstra by Hand
Tutor: Run Dijkstra by Hand
What distinguishes BFS from DFS when searching an unweighted graph?
Trees and Minimum Spanning Trees
Build the MST with Kruskal
Tutor: Build the MST with Kruskal
Binary Search Trees: Sorted Data in a Tree
Interactive: Binary Search Tree Visualizer
Insert into a BST by Hand
Tutor: Insert into a BST by Hand
What is the key property that makes a Binary Search Tree efficient for searching...
Network Design Lab
Relations: How Elements Relate to Each Other
Interactive: Relation Property Explorer
Equivalence Relations, Partial Orders, and Topological Sort
Topological Sort by Hand
Tutor: Topological Sort by Hand
An equivalence relation must be reflexive, symmetric, and transitive. It partiti...
Combinatorics: The Art of Counting
Pascal's Triangle and the Binomial Theorem
Interactive: Pascal's Triangle Explorer
Which of the following statements about counting are correct? (Select all that a...
Discrete Math in the Wild
Showing course outline. Copy to your collection to start learning.