NapkinCalc

Discrete Mathematics — Logic & Number Theory

Logic (and/or), set counting by inclusion–exclusion, modular arithmetic & GCD, and proof by patterns (induction).

Discrete math is the mathematics of distinct, countable things — true/false, whole numbers, sets, graphs. It is the native language of computer science: logic gates, algorithms, cryptography, and databases all live here.

  1. 01 Logic — true, false & combining them ELI5: statements are either true or false, and we combine them with and (both must hold) and or (at least one). The engine evaluates these directly — a green…
  2. 02 Counting sets — inclusion–exclusion ELI5: to count how many things are in A or B, add the two sizes — but you double-counted the overlap, so subtract it back: |A ∪ B| = |A| + |B| − |A ∩ B|. In a…
  3. 03 Modular arithmetic & GCD ELI5: modular arithmetic is clock math — after 12 it wraps to 1. "17 mod 5" is the remainder, 2. The greatest common divisor gcd(a, b) is the largest…
  4. 04 Proof by pattern — induction ELI5: induction is the domino effect: show the first domino falls, and show each domino knocks over the next, and all of them fall. A classic result it proves:…

next course: Multivariable Calculus — Vectors & Gradients →