Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Mathematics for Programmers

Chapters

TopicFile
Discrete MathematicsModular arithmetic, combinatorics, probability
Number TheoryPrimes, GCD, sieve, fast exponentiation

Why Math Matters for Programming

  • Algorithm analysis (complexity, correctness proofs)
  • Cryptography (modular arithmetic, primes, RSA)
  • Probability (randomized algorithms, hashing, load balancing)
  • Linear algebra (ML, graphics, optimization)
  • Graph theory (networks, scheduling, pathfinding)
  • Combinatorics (counting, DP state spaces)