The Lattice We BuildEpisode 1 / Let a machine hunt for the ratios nobody has taken yet

In the sister series "That Clicks" we were the readers. From here we switch to the building side ── showing the work, not the conclusion

Let a machine hunt for the ratios nobody has taken yet Hand "what matters is the dimensionless ratio" to a machine and it becomes a linear-algebra problem: the integer kernel of the dimension matrix.
We enumerate all 162,931 dimensionless quantities you can build from the fundamental constants, pick out the ones whose value lands on 1,
and compare that against a randomized universe ── the result was indistinguishable from coincidence.

Tools needed: Gaussian elimination, log scales, mean and standard deviation The core of this episode: p = 0.67 (indistinguishable from coincidence)

The sister series "That Clicks" has been saying the same thing all along ── quantities with units are stage scenery; what matters is the dimensionless ratio. \(\beta=v/c\), \(S/\hbar\), \(E/k_BT\), \(T/T_c\). Every one of them is a "quantity whose units cancel when you divide," and physics lives nowhere else.
So the following thought is natural. If taking ratios is what physics does, why not just take every ratio there is? Somewhere among the combinations no human happened to think of, there might be an agreement nobody has noticed.
This episode actually does that. We write a program, enumerate 160,000-odd dimensionless quantities, and read the result. To say it up front: we did not find what we were looking for. But the not-finding itself turned into an answer with a definite shape. That is usually what making physics looks like.

01The machine we want to build

The specification fits in one sentence.

SPECIFICATION

A machine that, given a table of physical quantities, enumerates every combination whose units cancel when you multiply them together, and reports the ones whose value lands near \(1\).

We look for "value near 1" because that is the place that demands an explanation. There is no reason for the ratio of two utterly unrelated quantities to happen to sit around 1. That the cosmological constant and the matter density are about equal right now — people have been caught by that sort of "why are these lined up?" for a long time. So we let the machine look for the same thing.

The ingredients need care. We do not put dimensionless quantities (like \(\alpha\)) in ── they are the target, not the material. Nor the Planck length or Planck mass. Those are combinations of \(c,\hbar,G\) themselves, so including them would only mass-produce meaningless hits of the form "dividing the Planck length by \(c,\hbar,G\) gives 1."

02Dimensionless means: the kernel of a matrix

This is the most satisfying part of the episode. The physics sentence "look for combinations whose units cancel" turns, word for word, into a linear-algebra sentence.

Start small. Take the four quantities \(e,\ \varepsilon_0,\ \hbar,\ c\), multiply them together, and try to cancel the units. Write each one's dimensions vertically as exponents of kg · m · s · A.

TRY IT ── turn dimensions into a list of numbers

\(e=\) C \(=\) A·s, so \((\mathrm{kg},\mathrm{m},\mathrm{s},\mathrm{A})=(0,0,1,1)\). Likewise \(\varepsilon_0=(-1,-3,4,2)\), \(\hbar=(1,2,-1,0)\), \(c=(0,1,-1,0)\).
The dimensions of the product \(e^{a}\varepsilon_0^{b}\hbar^{d}c^{f}\) are these four vectors scaled by \(a,b,d,f\) and added.

So "be dimensionless" can be written like this

$$\begin{pmatrix}0&-1&1&0\\0&-3&2&1\\1&4&-1&-1\\1&2&0&0\end{pmatrix}\begin{pmatrix}a\\b\\d\\f\end{pmatrix}=\begin{pmatrix}0\\0\\0\\0\end{pmatrix}$$

(Rows are kg, m, s, A; columns are \(e,\varepsilon_0,\hbar,c\).) This is nothing but a system of linear equations. Eliminate and out comes \((a,b,d,f)=(2,-1,-1,-1)\).

The dimensionless quantity the machine spat out

$$\frac{e^2}{\varepsilon_0\hbar c}=0.0917$$

Does the number look familiar? \(0.0917=4\pi/137.036\) ── the fine-structure constant \(\alpha\) has come out wearing a \(4\pi\). The machine knows nothing about "electromagnetism" or "coupling constants." Just by eliminating a list of dimension numbers it landed on the most famous dimensionless quantity in physics. That \(4\pi\) will matter later (§08).

TURNED AROUND ── why Planck units are uniquely determined Conversely, if you feed in only the three \(c,\hbar,G\), the kernel comes out empty. No dimensionless quantity can be built from those three ── they are completely independent dimensionally. And that is exactly why the combination making each of length, mass and time is fixed in precisely one way. Planck units are unique because the kernel is empty.

Let us generalize. Choose \(m\) quantities and their dimension exponents form a \(5\times m\) integer matrix \(D\) (SI has 5 base dimensions: kg, m, s, A, K). The condition for the product \(\prod q_i^{a_i}\) to be dimensionless is

$$D\,\mathbf{a}=\mathbf{0}$$

That is all. In other words ──

THE TOOL OF THIS EPISODE

The set of all dimensionless quantities = the kernel of the dimension matrix. And since we want integer exponents, we want the integer kernel.

In physics this has been called Buckingham's \(\pi\) theorem, but you do not need the name. It is solvable by Gaussian elimination — that is the whole of it. Reduce the matrix to echelon form over the rationals, pull out one kernel vector for each non-pivot column (free variable), clear denominators to make it integral, and divide by the greatest common divisor. It is the procedure taught in high school, and the machine spits out dimensionless quantities while knowing nothing whatsoever about what "dimensionless" means.

DESIGN DECISION ── discard kernel vectors containing a zero If any exponent is \(0\), that quantity is not actually used. Which means a smaller subset has already produced the same relation. So we accept only those whose components are all non-zero. That kills the duplicates, and every surviving line becomes "a relation whose ingredients cannot be reduced further."

03Turning it into a machine

After that, all we do is form every subset of the table of quantities and compute the kernel of each. The core runs on this alone.

kuuhaku.cpp ── the core
// Return the integer kernel of the (5 × m) dimension matrix of the subset idx (m quantities).
// A kernel vector v means "∏ q_i^{v_i} is dimensionless."
std::vector<std::vector<int>> integerKernel(const std::vector<int>& idx) {
  // (1) lay the dimension exponents out as a rational matrix
  // (2) row reduce (RREF) ── plain Gaussian elimination
  // (3) pull out a kernel vector for each free variable,
  //     clear denominators to make it integral → divide by gcd to make it primitive
}

The ingredients are 21 independent physical quantities ── the fundamental constants (\(c,\hbar,G,k_B,e,\varepsilon_0\)), 9 particle masses, the QCD and electroweak scales, and the cosmological quantities (\(H_0,\Lambda,T_{\rm cmb}\)). Up to 6 ingredients, exponents up to \(\pm4\). Run it.

OUTPUT
dimensionless combinations: 162931
of which |log10 V| < 0.050: 279

160,000-odd. Of those, 279 fell within \(\pm12\%\) of the value 1. We found as many as 279 agreements ── that is what one wants to say. This is the fork in the road.

◇ ◇ ◇

04The first trap ── a complicated formula hits anything

If large exponents are allowed, you can manufacture any number you like. Line up \(m_p^{4}m_e^{-3}m_\mu^{-1}\cdots\) and the value moves wherever you want. A hit from something that was bound to hit carries zero information.

So we add an axis of complexity: the sum of the absolute values of the exponents, \(\Sigma|a_i|\) ── Occam's razor turned into a number. Counting formulas band by band gives this.

complexity \(\Sigma|a|\)formulasmeaning
2–341essentially a simple ratio. a hit here would be an event
4–51,190still readable
6–714,998starting to look suspicious
8–943,444a hit is only to be expected
10+103,258not worth counting

The count grows exponentially. Which is why looking at the total number of hits means nothing. You have to look band by band and ask whether that band is hitting too often for its own size.

05Building a randomized universe

To measure "hitting too often" you need something to compare against. You could compute the expectation from theory, but there is a more naive and more trustworthy way.

THE CORE OF THIS EPISODE

Run the same procedure hundreds of times against a randomized universe.
If the real universe does not produce more hits, it is coincidence.

The implementation is almost anticlimactically simple. Keep the 160,000 enumerated formulas exactly as they are and randomly shift only the values of each physical quantity, log-uniformly over a range from \(10^{-1.5}\) to \(10^{+1.5}\) times. The dimensions, the structure of the combinations, the number of formulas — all identical. It is a universe where only the numbers differ. Make 200 of them and count the hits in each.

This is how one deals with what particle physics calls the look-elsewhere effect. "A 3σ bump appeared somewhere" is bound to happen if you searched in enough places. The caution from diagnosing the Koide formula in the sister series "Mass That Clicks," bonus ③ ── build enough dimensionless combinations and some of them will inevitably land near a simple value ── is what we now go and measure.

06First, demonstrate the detection power

There is something to do before quoting a p value. Can this machine actually find a genuine relation if one is there? "I found nothing" from a machine that could not have found anything carries no information at all.

So we take a positive control. Feed in only quantities known to be tied to each other by definition ── the atomic-physics set \(\hbar, c, e, \varepsilon_0, m_e\) plus the quantities defined from them: \(a_0\) (the Bohr radius), \(E_h\) (the Hartree energy), \(\sigma_T\) (the Thomson cross section). Here a genuine relation certainly exists.

POSITIVE CONTROL
band   formulas  real  if chance   excess
6-7        10      1  0.0±0.2  4.9 σ

[Σ|a|=6] hbar^2 m_e^-1 a0^-2 E_h^-1  = 1.0000

Struck it. \(E_h=\hbar^2/(m_e a_0^2)\) ── the definition of the Hartree energy itself. The machine knows nothing about "the Bohr radius" or "energy." From a list of dimension numbers and the values alone, it found this. The detection power is there.

THE HONEST LINE ── seen as a whole, this gets buried The overall p value of the same computation is 0.26. Not significant at all. The 4.9σ appears only once you restrict to "the complexity 6–7 band." Without splitting into bands, even a genuine relation is swallowed by coincidence. That is a live demonstration of the claim in §04.
One more thing ── this 4.9σ is inflated by the division, because the spread on the chance side is essentially zero (\(0.0\pm0.2\)). Read the p value, not the σ.

07The result

Preparations done. The real run.

THE REAL RUN ── 21 independent physical quantities, up to 6 ingredients, exponents up to ±4
dimensionless combinations: 162931
of which |log10 V| < 0.050: 279

  hits by chance : mean 294.5 ± 31.7
  the real universe: 279
  empirical p value: 0.6667

band   formulas   real   if chance   excess
2-3        41       1   0.4±0.6    1.0 σ
4-5      1190       1   4.5±2.3   -1.5 σ
6-7     14998      32  35.3±6.4   -0.5 σ
8-9     43444      85  97.4±12.5  -1.0 σ
10+    103258     160 156.9±20.7   0.1 σ

No band shows any excess. If anything the real universe sits slightly below the expectation from the randomized universes. 279 against 294.5. The p value is 0.67 ── the exact opposite of "this would rarely happen by chance," and instead chance itself.

Varying the threshold (how close to 1 counts as "near") and the shift width (how random the randomness is) does not move the conclusion. Nine settings tried; p ran from 0.23 to 0.64.

Figure: run it yourself ── enumerate dimensionless combinations of 21 quantities and compare against 200 randomized universes (your browser is computing this right now, on the spot)
distribution of hit counts in randomized universes the real universe
computing…

You should be able to see the red line (the real universe) stuck right about in the middle of the grey hill (the randomized universes). Change the strictness, change the randomness — the red line never leaves the hill. That is the result of this episode.

◇ ◇ ◇

08The wall ── dimensional analysis cannot produce coefficients

Here let us make clear what lies out of this machine's reach. Several of the famous "agreements" are in fact not picked up by this search. There is a reason they are not.

Let us write the famous story that the cosmological constant and the matter density are about equal right now (the coincidence problem) in the machine's language.

TRY IT ── why it cannot be picked up

The most straightforward dimensionless quantity that dimensional analysis can write:

$$\frac{\Lambda c^2}{G\rho_c}=17.3$$

Quite far from 1

But the correct definition on the physics side is \(\rho_\Lambda=\Lambda c^2/(8\pi G)\). There is an \(8\pi=25.1\) in there. Divide by it and \(\rho_\Lambda/\rho_c=0.69\) ── that is what "about equal" really is.

So the agreement was hiding inside the \(8\pi\). And dimensional analysis cannot produce \(8\pi\). It can produce the form of the expression and no further; the \(O(1)\) number out front is undetermined in principle. \(2\pi\), \(1/4\), \(3/5\) — all of them are on the far side of this wall.

The very first formula the machine spat out in §02 hit the same wall. \(e^2/(\varepsilon_0\hbar c)=0.0917\) ── the famous \(1/137\) does not appear directly here. Only after peeling off the \(4\pi\) does it become \(\alpha=1/137.036\). The machine found \(\alpha\), yet did not show us \(\alpha\).

This is not a regrettable limitation but the most important finding of the episode. Much of "what humans have not solved" in fact lies on the far side of this \(O(1)\) wall. For black-hole entropy: dimensions get you as far as \(S\propto A\), and only the \(1/4\) refuses to come. Filling that in requires the thing being counted itself ── states, a mechanism, a symmetry. Because the machine stopped short of the wall, we could measure where the wall stands.

09The scariest thing of all

The experiment had one more, unplanned yield. It came from the first run, where quantities fixed by definition (\(a_0, E_h, \rho_c, \sigma_T\)) were mixed in. Among the top hits, formulas like these lined up.

TOP HITS (with quantities fixed by definition included)
[Σ|a|= 6] hbar^2 m_e^-1 a0^-2 E_h^-1      = 1.0000
[Σ|a|= 6] G^1 m_mu^-1 m_p^1 H0^-2 rho_c^1 = 1.0601

The top one is genuine ── the definition of the Hartree energy. And the bottom one? Decomposed, it reads as follows.

TRY IT ── untangle the bottom formula $$\underbrace{\frac{G\rho_c}{H_0^2}}_{=\,3/8\pi\,=\,0.1194}\times\underbrace{\frac{m_p}{m_\mu}}_{=\,8.88}=1.0601$$

The left factor is the definition of the critical density, \(\rho_c=3H_0^2/(8\pi G)\). The right factor is a completely unrelated mass ratio. Multiply them and it happened to come close to 1.

It is a cosmological definition with a particle-physics mass ratio hung on it as decoration. There is no physical content. But in the appearance of the output it is utterly indistinguishable from the genuine one above. Both are "6 ingredients, exponent sum 6, value nearly 1."

THE HONEST LINE ── this is an intrinsic weakness of automated search "A genuine relation" and "a genuine relation multiplied by meaningless decoration" cannot be separated by value and complexity alone. Separating them requires understanding what the formula is saying ── which is to say, stepping outside the machine.
The sister series "Mass That Clicks," bonus ③, wrote of the Koide formula that "beauty is the entrance to a hypothesis, not evidence for it." That same trap has now shown up, in exactly that shape, inside the output of a program I wrote myself.

10What can and cannot be claimed

Let us split the result into what can and cannot be claimed. Mix these and you slide straight into crackpottery.

Can be claimedCannot be claimed
Searching mechanically for formulas that come out \(O(1)\) from combinations of the fundamental constants yields nothing beyond chance (p = 0.67). "No agreements exist." All this procedure can see is the \(O(1)\) value; it has not looked past the \(4\pi\).
The "beautiful agreements" that brute force turns up are entirely explained by counting. Why numerology never runs out has been turned into a number. "This table of quantities is the right one." Change the ingredients and the result could change. The table is chosen by a human.
The machine did in fact strike a genuine relation (a definition). Detection power confirmed. "Everything the machine finds is meaningful." Formulas that are just a definition times decoration line up wearing the same face.

A negative result. But a negative result with a definite shape. The expectation that "somewhere between the fundamental constants lies a simple numerical agreement nobody has noticed" is, within this range, refuted. The blank is not left over because we have not taken enough ratios.

EXERCISES
  1. Choose \(m\) quantities with 5 base dimensions. How many dimensions' worth of dimensionless combinations are there? Answer in terms of the rank \(r\) of the matrix \(D\). And when \(m=6,\ r=5\), how many relations are essentially intrinsic to that subset?
    show the answer
    The kernel has dimension \(m-r\). With \(m=6,\ r=5\) that is \(1\) ── so, up to a constant power, exactly one. That is why every choice of six quantities automatically fixes one relation. It is also why the program is fast.
  2. The hit condition was written \(|\log_{10}V|<0.05\). What range of \(V\) is that? And why measure with the logarithm rather than \(V\) itself?
    show the answer
    \(10^{-0.05}<V<10^{0.05}\), i.e. \(0.89<V<1.12\) (about \(\pm12\%\)). We use the logarithm because \(V\) and \(1/V\) are the same relation. To avoid double-counting a formula that is merely the sign-flip of the exponents, the distance from \(1\) has to be measured symmetrically, which the logarithm does.
  3. When building the "randomized universe" we fixed the set of formulas and shifted only the values. Why not randomize the formulas as well?
    show the answer
    What we want to know is whether this universe's numbers are special, not whether this enumeration algorithm is special. Fixing the set of formulas makes the mesh of the search, the number of formulas, and the distribution of complexity all identical, narrowing the only difference to the values. Holding everything but the thing under comparison fixed is the discipline of a controlled experiment.
  4. The positive control gave \(4.9\sigma\), yet the overall p value of the same computation was \(0.26\). Why is that not a contradiction?
    show the answer
    The genuine relation is a single line in the "complexity 6–7" band. Seen as a whole, it is diluted away by chance hits in the other bands. If you know where the signal is, looking only there is stronger ── but "deciding where to look afterwards" is precisely look-elsewhere. The positive control is legitimate because the band was chosen before seeing the result.

What we built in this episode

The machine. From a table of physical quantities it enumerates every combination whose units cancel. The principle is "dimensionless = the integer kernel of the dimension matrix"; the implementation is Gaussian elimination. Pure C++, no dependencies, 2.6 seconds to enumerate 160,000-odd formulas.

The scoring method. Holding the enumerated formulas fixed, build several hundred universes with randomized values and compare hit counts. It measures the look-elsewhere effect rather than arguing about it.

The result. Searching 162,931 formulas, agreements beyond chance: zero (p = 0.67). No excess in any complexity band. Unmoved by varying the threshold and the randomness.

And the position of the wall. The reason the famous agreements were not picked up is that they hide inside \(O(1)\) coefficients like \(8\pi\) and \(1/4\). Dimensional analysis produces only the form. Much of what humans have not solved lies on the far side of this wall ── and because the machine stopped short of it, we could measure where the wall is.

This document is Episode 1 of the "Lattice We Build" series, a reading piece for high-school and university students who love physics. Where the sister series "That Clicks" explains known physics, this series shows the work itself ── build a tool, run it, and read the result as it comes out (even when it is a negative result).

The numbers in the text are the actual output of the search program. That the set of dimensionless quantities forms the kernel of the dimension matrix (Buckingham's \(\pi\) theorem), and the look-elsewhere effect, are both established material. The "table of quantities," on the other hand, was chosen by the author, and the conclusion could change with a different choice of ingredients ── this search has not proved "there is no simple numerical agreement among the fundamental constants"; it only states that under this table, this range of complexity, and this definition of agreement, no excess beyond chance was detected. Also, \(\sigma\) values look inflated when the variance on the chance side is small, so read the p value. The figure re-runs the same procedure in miniature in your browser; it does not match the text exactly because of the random numbers and the narrower search range (up to 5 ingredients).

Search program (pure C++, no dependencies): kuuhaku_cpp / sister series: the "That Clicks" collection ── to print, use your browser's "Print" → "Save as PDF" (in the print version the sliders and answers are frozen or hidden).

Print / PDF: ⌘+P (Ctrl+P on Windows). With the slider in the figure you can move the "hill of coincidence" with your own hand.