The Curious Engineer

All blogs / Math

Math ∩ Programming

jeremykun.com

Recent content on Math ∩ Programming

MathSecurityAlgorithms / data structuresEngineering blogs

Posts
336 from 12 Jun 2011 to 21 Oct 2026
Posting
monthly (14 in the last year)
Kind
personal blog
Feed
https://www.jeremykun.com/index.xml

2026 13

  1. CKKS — Key Switching and Relinearization
  2. CKKS — Addition and Multiplication
  3. All articles by date
  4. Hotword detection in FHE on GPU in 350ms
  5. Shortform posts
  6. CKKS — Encryption and Decryption
  7. Updates on HEIR, the homomorphic encryption compiler project
  8. More whimsical OEIS sequences
  9. CKKS — Polynomials, the Canonical Embedding, and Encoding
  10. Unusual uses of OEIS sequences on GitHub
  11. The OEIS meta sequence and subway stations
  12. Deterministic Primality Testing for Limited Bit Width
  13. The Irrational Decision—A Book Review

2025 14

  1. Bicyclic Matrix-Matrix Multiplication in Fully Homomorphic Encryption
  2. Integer Set Library (ISL) - A Primer
  3. FHE@PDX 2025
  4. Frequently Asked Questions about FHE
  5. Leibniz's Dream and Dijkstra's nightmare
  6. My Graduate Career in Math
  7. HEIR talk at FHE.org
  8. Does Baby Have Hat
  9. My 4-year-old declares 36 the best number
  10. Anyone know of an approachable proof of the Caratheodory-Fejer theorem?
  11. Explainable Linear Programs
  12. I'll be at the JMM
  13. Epiphanies from Tape Measures
  14. Fully Homomorphic Encryption and the Public

2024 22

  1. The last few months in HEIR
  2. Attention spans for math and stories
  3. Carnival of Mathematics #233
  4. How This Blog Does IndieWeb
  5. LWE Attack Benchmarking Project
  6. Dynamic Programming Fail
  7. Packing Matrix-Vector Multiplication in Fully Homomorphic Encryption
  8. Shift Networks
  9. Webmentions and POSSE improvements
  10. MLIR — Defining Patterns with PDLL
  11. Polynomial dialect and mlir-opt tutorial upstreamed
  12. Fully Homomorphic Encryption in Production Systems
  13. Ben Recht on Meehl's Philosophical Psychology
  14. Detecting field names with C++ metaprogramming
  15. Barycentric Lagrange Interpolation
  16. Random life updates
  17. Math databases
  18. Experiments with POSSE
  19. Remez and function approximations
  20. A High-Level Technical Overview of Fully Homomorphic Encryption
  21. Unusual Tips for Parenting Toddlers
  22. Tabletop Games Based on Math Problems

2023 20

  1. MLIR — A Global Optimization and Dataflow Analysis
  2. MLIR — Lowering through LLVM
  3. MLIR — Dialect Conversion
  4. Socks, a matching game based on an additive combinatorics problem
  5. MLIR — Canonicalizers and Declarative Rewrite Patterns
  6. Encoding Schemes in FHE
  7. MLIR — Verifiers
  8. MLIR — Folders and Constant Propagation
  9. MLIR — Using Traits
  10. Computing Percentages Easier
  11. MLIR — Defining a New Dialect
  12. MLIR — Using Tablegen for Passes
  13. MLIR — Writing Our First Pass
  14. MLIR — Running and Testing a Lowering
  15. MLIR — Getting Started
  16. Google's Recent FHE work, and starting HEIR
  17. Two's Complement and Group Theory
  18. We're Knot Friends
  19. Sample Extraction from RLWE to LWE
  20. Google's Fully Homomorphic Encryption Compiler — A Primer

2022 10

  1. Estimating the Security of Ring Learning with Errors (RLWE)
  2. Negacyclic Polynomial Multiplication
  3. Polynomial Multiplication Using the FFT
  4. Carnival of Mathematics #209
  5. Key Switching in LWE
  6. Modulus Switching in LWE
  7. "Practical Math" Preview: Collect Sensitive Survey Responses Privately
  8. Cocktails
  9. Silent Duels—Constructing the Solution part 2
  10. My next book will be "Practical Math for Programmers"

2021 9

  1. The Gadget Decomposition in FHE
  2. Group Actions and Hashing Unordered Multisets
  3. Carnival of Mathematics #197
  4. Searching for RH Counterexamples — Exploring Data
  5. Regression and Linear Combinations
  6. Searching for RH Counterexamples — Productionizing
  7. Searching for RH Counterexamples — Scaling Up
  8. Searching for RH Counterexamples — Performance Profiling
  9. Searching for RH Counterexamples — Deploying with Docker

2020 10

  1. Optimization Models for Subset Cover
  2. Searching for RH Counterexamples — Unbounded Integers
  3. Searching for RH Counterexamples — Search Strategies
  4. Searching for RH Counterexamples — Adding a Database
  5. Searching for RH Counterexamples — Setting up Pytest
  6. Taylor Series and Accelerometers
  7. Contextual Symbols in Math
  8. Musings on A New Interface for Mathematics
  9. Second Edition of A Programmer's Introduction to Mathematics
  10. The Communicative Value of Using Git Well

2019 5

  1. A Good Year for "A Programmer's Introduction to Mathematics"
  2. Silent Duels—Constructing the Solution part 1
  3. Math Versus Dirty Data
  4. A Working Mathematician's Guide to Parsing
  5. Silent Duels—Parsing the Construction

2018 7

  1. Silent Duels and an Old Paper of Restrepo
  2. A Programmer's Introduction to Mathematics
  3. Hanabi: a card game for logicians
  4. Visualizing an Assassin Puzzle
  5. For mathematicians, = does not mean equality
  6. A parlor trick for SET
  7. Earthmover Distance

2017 12

  1. NP-hard does not mean hard
  2. Binary Search on Graphs
  3. Linear Programming and Healthy Diets — Part 2
  4. Notes on Math and Gerrymandering
  5. Boolean Logic in Polynomials
  6. Mathematical Genealogy
  7. Duality for the SVM
  8. Formulating the Support Vector Machine Optimization Problem
  9. The Inner Product as a Decision Rule
  10. Testing Polynomial Equality
  11. Bayesian Ranking for Rated Items
  12. The Reasonable Effectiveness of the Multiplicative Weights Update Algorithm

2016 13

  1. A Spectral Analysis of Moore Graphs
  2. Voltage, Temperature, and Harmonic Functions
  3. Guest post, "What's up with graph Laplacians?"
  4. Zero-Knowledge: Definitions and Theory
  5. Zero Knowledge Proofs for NP
  6. The Blum-Blum-Shub Pseudorandom Generator
  7. Zero Knowledge Proofs — A Primer
  8. Singular Value Decomposition Part 2: Theorem, Proof, Algorithm
  9. Singular Value Decomposition Part 1: Perspectives on Linear Algebra
  10. Tensorphobia and the Outer Product
  11. Big Dimensions, and What You Can Do About It
  12. Concrete Examples of Quantum Gates
  13. Hashing to Estimate the Size of a Stream

2015 20

  1. Load Balancing and the Power of Hashing
  2. The Inequality
  3. A Quasipolynomial Time Algorithm for Graph Isomorphism: The Details
  4. Serial Dictatorships and House Allocation
  5. One definition of algorithmic fairness: statistical parity
  6. The Boosting Margin, or Why Boosting Doesn't Overfit
  7. The Welch-Berlekamp Algorithm for Correcting Errors in Data
  8. The Čech Complex and the Vietoris-Rips Complex
  9. What does it mean for an algorithm to be fair?
  10. Methods of Proof — Diagonalization
  11. Weak Learning, Boosting, and the AdaBoost algorithm
  12. The Many Faces of Set Cover
  13. Markov Chain Monte Carlo Without all the Bullshit
  14. The Codes of Solomon, Reed, and Muller
  15. Finding the majority element of a stream
  16. Hamming's Code
  17. A Proofless Introduction to Information Theory
  18. Zero-One Laws for Random Graphs
  19. The Giant Component and Explosive Percolation
  20. Multiple Qubits and the Quantum Circuit

2014 37

  1. The Quantum Bit
  2. A Motivation for Quantum Computing
  3. Linear Programming and the Simplex Algorithm
  4. Learning a single-variable polynomial, or the power of adaptive queries
  5. The Complexity of Communication
  6. On the Computational Complexity of MapReduce
  7. Making Hybrid Images
  8. Occam's Razor and PAC-learning
  9. A Rook Game
  10. When Greedy Algorithms are Perfect: the Matroid
  11. Parameterizing the Vertex Cover Problem
  12. An Update on "Coloring Resilient Graphs"
  13. When Greedy Algorithms are Good Enough: Submodularity and the (1—1/e)-Approximation
  14. The Mathematics of Secret Sharing
  15. Linear Programming and Healthy Diets — Part 1
  16. Learning to Love Complex Numbers
  17. Community Detection in Graphs — a Casual Tour
  18. A problem that is not (properly) PAC-learnable
  19. Sending and Authenticating Messages with Elliptic Curves
  20. Stable Marriages and Designing Markets
  21. Elliptic Curve Diffie-Hellman
  22. Connecting Elliptic Curves with Finite Fields
  23. Want to make a great puzzle game? Get inspired by theoretical computer science.
  24. Programming with Finite Fields
  25. Martingales and the Optional Stopping Theorem
  26. (Finite) Fields — A Primer
  27. Elliptic Curves as Python Objects
  28. On Coloring Resilient Graphs
  29. Elliptic Curves as Algebraic Structures
  30. Simulating a Biased Coin with a Fair Coin
  31. Elliptic Curves as Elementary Equations
  32. Simulating a Fair Coin with a Biased Coin
  33. Introducing Elliptic Curves
  34. Fixing Bugs in "Computing Homology"
  35. RealityMining, a Case Study in the Woes of Data Processing
  36. How to Conquer Tensorphobia
  37. Probably Approximately Correct — a Formal Theory of Learning

2013 39

  1. The Two-Dimensional Fourier Transform and Digital Watermarking
  2. Bandits and Stocks
  3. Lagrangians for the Amnesiac
  4. Adversarial Bandits and the Exp3 Algorithm
  5. Optimism in the Face of Uncertainty: the UCB1 Algorithm
  6. The Universal Properties of Map, Fold, and Filter
  7. Anti-Coordination Games and Stable Graph Colorings
  8. The Erdős-Rényi Random Graph
  9. Linear Regression
  10. Cauchy-Schwarz Inequality (and Amplification)
  11. Functoriality
  12. Reservoir Sampling
  13. Guest Post: Torus-Knotted Baklava
  14. Miller-Rabin Primality Test
  15. Why Theoretical Computer Scientists Aren't Worried About Privacy
  16. Conferences, Summer Work, and an Advisor
  17. Rings — A Second Primer
  18. Universal Properties
  19. Properties of Morphisms
  20. Bezier Curves and Picasso
  21. Categories as Types
  22. Rings — A Primer
  23. Introducing Categories
  24. Categories, What's the Point?
  25. Probabilistic Bounds — A Primer
  26. Computing Homology
  27. A Sample of Standard ML, the TreeSort Algorithm, and Monoids
  28. Homology Theory — A Primer
  29. Conditional (Partitioned) Probability — A Primer
  30. Methods of Proof — Induction
  31. Seam Carving for Content-Aware Image Scaling
  32. Methods of Proof — Contradiction
  33. Methods of Proof — Contrapositive
  34. Methods of Proof — Direct Implication
  35. Why there is no Hitchhiker's Guide to Mathematics for Programmers
  36. k-Means Clustering and Birth Rates
  37. Depth- and Breadth-First Search
  38. The Fundamental Group — A Primer
  39. Probability Theory — A Primer

2012 46

  1. Groups — A Second Primer
  2. Neural Networks and the Backpropagation Algorithm
  3. Groups — A Primer
  4. Information Distance — A Primer
  5. Ramsey Number Lower Bound
  6. Constructing Topological Spaces — A Primer
  7. There are Infinitely Many Primes (Erdős)
  8. Topological Spaces — A Primer
  9. Decision Trees and Political Party Classification
  10. Complete Sequences and Magic Tricks
  11. Infinitely Many Primes (Using Topology)
  12. Trees—A Primer
  13. K-Nearest-Neighbors and Handwritten Digit Classification
  14. Metric Spaces — A Primer
  15. Machine Learning — Introduction
  16. The Cellular Automaton Method for Cave Generation
  17. Dynamic Time Warping for Sequence Comparison
  18. The Fast Fourier Transform
  19. Principal Component Analysis
  20. The Discrete Fourier Transform — A Primer
  21. Streaming Median
  22. Thoughts after a Year of Math ∩ Programming
  23. Generalized Functions — A Primer
  24. The Fourier Transform — A Primer
  25. Double Angle Trigonometric Formulas
  26. False Proof – 2 = 4, As the Limit of an Infinite Power Tower
  27. The Fourier Series—A Primer
  28. Kolmogorov Complexity—A Primer
  29. Optimally Stacking the Deck—Texas Hold 'Em
  30. Classic Nintendo Games are NP-Hard
  31. Caching (and Memoization)
  32. In Place Uniform Shuffle
  33. Learning Programming — Finger-Painting and Killing Zombies
  34. Other Complexity Classes
  35. P vs. NP, A Primer (And a Proof Written in Racket)
  36. Busy Beavers, and the Quest for Big Numbers
  37. Fundamental Theorem of Algebra (With Picard's Little Theorem)
  38. Cryptanalysis with N-Grams
  39. The Fundamental Theorem of Algebra (with Galois Theory)
  40. Handshake Lemma
  41. The Fundamental Theorem of Algebra (with the Fundamental Group)
  42. The Fundamental Theorem of Algebra (with Liouville)
  43. Word Segmentation, or Makingsenseofthis
  44. A Spoonful of Python (and Dynamic Programming)
  45. Numerical Integration
  46. Random (Psychedelic) Art

2011 53

  1. Row Reduction Over A Field
  2. Metrics on Words
  3. Holidays and Homicide
  4. Tiling a Chessboard with Dominoes (Opposite Colors Removed)
  5. Z[√2] has Infinitely Many Units
  6. Conway's Game of Life in Conway's Game of Life
  7. False Proof: 1 = 2 (with Calculus)
  8. The Smallest Non-Cyclic Simple Group has Order 60
  9. A Taste of Racket
  10. N Choose 2 is the Sum of the First N-1 Integers
  11. n-Colorability is Equivalent to Finite n-Colorability (A Formal Logic Proof)
  12. Graduate Studies
  13. The Square Root of 2 is Irrational (Geometric Proof)
  14. The Perceptron, and All the Things it Can't Perceive
  15. A Dash of Python
  16. Programming Primers—An Introduction
  17. Number Theory—A Primer
  18. Encryption & RSA
  19. False Proof—All Numbers are Describable in at Most Twenty Words
  20. Eigenfaces, for Facial Recognition
  21. Inner Product Spaces—A Primer
  22. Möbius Transformations are Isometries of a Sphere
  23. Hunting Serial Killers
  24. False Proof—The Reals are Countable
  25. False Proof—All Horses are the Same Color
  26. Graph Coloring, or Proof by Crayon
  27. Three Circles and Collinear Centers of Dilation
  28. Optimally Stacking the Deck—Kicsi Poker
  29. Set Theory—A Primer
  30. False Proof—31.5 = 32.5
  31. False Proof—There are Finitely Many Primes
  32. False Proof—1 = 2
  33. Geometric Series with Geometric Proofs
  34. Turing Machines—A Primer
  35. Determinism and Finite Automata—A Primer
  36. Sums of k Powers
  37. Turing Machines and Conway's Dreams
  38. The Wild World of Cellular Automata
  39. Tiling a Chessboard
  40. Teaching Mathematics—Graph Theory
  41. Area of a Triangle
  42. Sums of the first n numbers, squares
  43. The Party Problem
  44. Number of Games in a Tournament
  45. Google's Page Rank—Why it Doesn't Work Anymore
  46. Google's Page Rank—The Final Product
  47. Featured Posts
  48. Linear Algebra—A Primer
  49. Google's PageRank—A First Attempt
  50. Big-O Notation—A Primer
  51. Well Orderings and Search
  52. Prime Design
  53. Google's PageRank—Introduction

Undated 6

  1. Main Content
  2. Primers
  3. Program Gallery
  4. Proof Gallery
  5. Research
  6. What I'm Reading