IV - Discrete Mathematics & Algorithms

The Mathematics of Logic and Finite Structures

Discrete Mathematics and Algorithms are the mathematics of things that can be counted and steps that can be carried out one at a time. This matters more than it first appears. However continuous the mathematics of the other sections may be, the moment any of it runs on a machine it becomes finite. Real numbers become finitely many bits, smooth motion becomes a sequence of steps, and every computation is a finite process on a finite machine. Discrete mathematics is what stays exact under that translation. Taken far enough, it turns back on computation itself and asks a harder question: not how fast a problem can be solved, but whether it can be solved at all.

Within the Compass, this section is the counterpart to the continuous mathematics of Section II (Calculus to Optimization & Analysis). Where that section asks in what space an algorithm converges, this one asks what can be computed in the first place. It inherits the algebra of Section I (Linear Algebra to Algebraic Foundations), where the arithmetic of finite groups and fields supports the tools of secure communication. And it hands its counting arguments to Section III (Probability & Statistics), where listing the possibilities is the first step in measuring how likely they are.

Graph theory, taken far enough, becomes topology done with finite pieces: complexes built from points, edges, and triangles, whose holes can be counted with linear algebra. Beyond it, three long arcs grow from this section. Category theory names the single pattern behind every structure-preserving map met so far, describing structures, up to isomorphism, by how their maps compose. It arrives at the point where functions themselves become objects, which is also where logic and the theory of types meet. Cryptography follows both sides of a turning point: the quantum algorithm that would break the most widely used public-key systems on a large enough quantum computer, and the lattice-based schemes built to replace them. And formal methods treat a proof as a program that a computer can check, step by step.

This is the section where verification itself becomes mathematics. Some limits are absolute. No program can decide, for every program and input, whether it will halt, so deciding what an arbitrary program does cannot be fully automatic. Checking a proof someone hands us can be. Checking is often far easier than finding, and a proof that took years to find may take far less time to check. A proof assistant checks each step against a small trusted core, so a proof can be accepted without trusting whoever, or whatever, produced it. What remains to trust is that core, the axioms it assumes, and whether the formal statement says what we meant. Cryptography adds stranger forms of checking: a signature that anyone can verify but only the holder of the secret key can feasibly produce, and a proof that convinces you a claim is true while revealing nothing else. Most of its security, in turn, rests on problems believed to be hard, not proved to be hard, and the pages say so each time. How machine-learned search and machine-checked proof work together is moving quickly, and the Compass treats it as an open direction.