Propositional Logic and Truth Tables
An AI just generated a conditional with three negations and an unless. You read it. You think it's right. You ship it.
Discrete Mathematics covers: Core Topics, Core Topics (continued), Core Topics (continued). Year 1, Quarter 1. Includes 15 exercises and 3 projects.
An AI just generated a conditional with three negations and an unless. You read it. You think it's right. You ship it.
You wrote a function. You tested it on five inputs. They all worked. You shipped it.
You've written a recursive function. You believed it was correct. How did you know?
You write SELECT DISTINCT userid FROM events. The query returns a set. You write users.map { |u| u.email }. The function takes one set and produces another. You design a database …
Your function takes five boolean parameters. You wrote three tests and shipped. How many reachable states did you actually cover?
Every time you run git log, you traverse a graph. Every npm install solves a graph problem. Every database query that joins three tables walks a graph. Every microservice deployme…
Every HTTPS connection your browser makes uses RSA — the cryptosystem invented in 1977, still the backbone of public-key infrastructure on the internet half a century later. Your …
- Graph coloring and chromatic number - Planar graphs and Euler's formula - Basic number theory: modular arithmetic, GCD, primes, Euler's totient
- [ ] Write truth tables for p -> q, p <-> q, De Morgan's laws — Textbook — Verify with Ruby boolean expressions - [ ] Prove by induction: 1 + 2 + ... + n = n(n+1)/2 — MIT 6.042J …
- [ ] Prove by strong induction: every integer >= 2 has a prime factorization — MIT 6.042J PS2 - [ ] Solve the recurrence T(n) = 2T(n/2) + n using the Master theorem — Algorithm a…
- [ ] Prove Euler's formula V - E + F = 2 for connected planar graphs — MIT 6.042J PS5 - [ ] Solve: how many ways to tile a 2xN board with 1x2 dominoes? — Recurrence + proof by in…
- [ ] Build an RSA encryption demo in Ruby — implement modular exponentiation, Euler's totient, key generation, encrypt/decrypt a message
Implement modexp (modular exponentiation via repeated squaring), gcd (Euclidean algorithm), extendedgcd, modinverse, and eulertotient. Write RSpec tests with known values. This is…
Build a Ruby CLI that computes permutations, combinations, and solves counting problems. Accept input like "C(52,5)" or "P(10,3)". Include the Pigeonhole Principle checker: given …
- [ ] Milestone 1: Implement modexp, gcd, extendedgcd, modinverse in C with unit tests - [ ] Milestone 2: Implement Miller-Rabin primality testing and random prime generation in C…
- [ ] What is mathematical induction? Walk through the two steps (base case and inductive step) with an example. - [ ] Explain the difference between strong induction and weak ind…
16 lessons. Read in order; spiral back when you need to. By the end you'll have used the core ideas twice — once on the abstract, once on something you'll meet at work next week.