CHRIS HAY

IDEAS · SYSTEMS · OBJECTS / LONDON · 2026

A Q-system can hold a trillion strings, but never sees two become one.

Colmerauer’s Q-systems, rebuilt from his report of 1970, measured. One graph holds 2⁴⁰ strings in 80 arrows, and a rule can work on all of them at once. A result that comes out the same along many paths is made once for each path.

ABOUT THIS NOTE +

A second note on the Q-systems, Alain Colmerauer’s rule language of 1969 for the TAUM translation project, reconstructed with a coding agent from his report of 1970. The first note checked the reconstruction against every result the report prints. This one measures the machine on graphs built to test it. Forty independent choices give 1,099,511,627,776 strings in 80 arrows, and a rule that looks at one or two words at a time works on all of them in 80 applications or fewer. So does a rule that fans one word out into two, which is how the report’s grammar writes 9,565,938 French sentences in 2,760 arrows. But a result carried along a string is made once for every path that reaches it. The parity of twelve choices has two possible values and costs 8,190 applications, exactly what writing each of the 4,096 strings out as a tree costs. The report adds a brand-new path for every application and says nothing of merging, so read literally two equal arrows are kept; and no rule can merge them, because a rule matches one path and two alternatives are never on one path. A variant of the machine that merges them, kept apart from the historical one, does parity in 46 applications and can still count every derivation, but it changes what some rules mean. The second phase, which removes every arrow a rule used, removes strings no rule touched; purifying by strings instead keeps them, but breaks the report’s own analysis and its recipe for deleting a string. Whether or not Colmerauer saw that loss, his systems depend on it: it is what makes an analysis return only complete analyses.

N-Q-SYSTEMS-POSSIBILITIESOPENRECORDED 2026-11-26PUBLISHED · V1.0CITE ↓FOLLOW ↓

01 / A TRILLION STRINGS IN 80 ARROWS

Colmerauer made the Q-systems to hold every partial grouping of a sentence at once, economically, in one graph: each path from its entry to its exit carries one string, and paths that share words share arrows. The first note rebuilt the machine from his report of 1970 and checked it against every result the report prints. This note asks what the machine can do with the economy. Take n independent choices between A and B: n + 1 vertices with two arrows between each pair, carrying 2ⁿ strings. Forty choices carry 1,099,511,627,776 strings in 80 arrows. The rules A == X. and B == Y. rewrite every one of them in 80 applications, and the graph after has 80 arrows and 2⁴⁰ strings. A rule matches paths, and here there are only 80 paths of one arrow. A rule that reads two words, A + B == C., applies 39 times. Fanning out costs as little: A == X. and A == Y. on one string of forty As give 2⁴⁰ strings in 80 arrows. This is how the report’s grammar works. Synthesising a sentence with fourteen embedded clauses, three levels deep on both sides, writes its 9,565,938 paraphrases into 2,760 arrows in 3,108 applications. Every sentence tried, 500 walks through that graph, analysed back to its one tree.

QSYS-E08 and E10, docs/research.md ↗Colmerauer 1970, p. 4: the economy of the graph; p. 35: the grammar ↗

02 / TWO RESULTS, 8,190 APPLICATIONS

Now carry something along the string. Put an arrow S before twelve choices, and six rules that keep the parity of the number of As: S + A == O., E + A == O., O + A == E., and so on. There are two possible results, and the phase makes 8,190 arrows to reach them, one for every prefix of every string: 2¹³ − 2. Of those, 8,166 repeat an arrow already made, with the same two ends and the same tree. The graph after holds 4,096 arrows, each O or E, from the entry to the exit. Packing each whole string into one tree, P(A,B,B,…), whose 4,096 results really are all different, costs exactly the same, 8,190. The cost is set by the number of derivations, not by the number of results. That is the report’s definition read literally. Each application adds “le tout nouveau chemin”, a brand-new path, and the report says nothing of merging one with an equal arrow already there, so equal arrows are kept. And no rule can merge them. A rule’s left side matches one path, and two alternatives never lie on one path: a rule never sees both. Composing a relation along seven facts in a row, R(A*,B*) + R(B*,C*) == R(A*,C*)., makes the one fact R(A,H) 132 times, once for each way of bracketing the chain. The graph shares what is the same before a rule. It cannot share what becomes the same after one. None of the report’s own examples ever makes two equal arrows, so its printed results cannot say whether the lost program merged them.

Colmerauer 1970, p. 22: “on ajoute donc au graphe le tout nouveau chemin” ↗QSYS-E08, E11 and E15, docs/research.md ↗

03 / A MACHINE THAT MERGES

What would merging buy? A second machine, kept apart from the historical one in the repository, reuses an equal arrow, or an equal path the phase has already made, instead of adding another. With its merging turned off, it gives the historical machine’s graphs and application counts on every example of the report whose phases stop, and a test checks that. Merged, parity takes 46 applications instead of 8,190, and leaves two arrows, O and E. Composing the seven facts takes 56 instead of 294, and leaves R(A,H) once. Packing does not change, because its results really are all different. A third setting merges in the same way but records every application that made each arrow. From those records the number of derivations can still be counted, 4,096 for parity and 132 for the facts, without the copies. The count is what is kept, not everything: the order the copies would have been made in, the separate arrows and vertices each would have had, and the 8,190 applications a -DET- listing would show are gone. It is the same idea as the shared forests of later chart parsers. On every one of those examples the merged machine prints exactly what the historical one prints; that is a result about those examples, not about every Q-system that stops. But merging is not harmless. Under the report’s definition A == A. never stops: the arrow it adds is a new path it applies to. Merged, its one application adds nothing, finds the data’s own arrow, and the second phase removes that arrow as rewritten, leaving an empty graph. Others behave the same, A + B == A + B. and A == X. X == A. among them: each gives back an arrow equal to one it read, never stops under the report’s definition, and leaves an empty graph when merged. In every change found, the report’s result was undefined to begin with.

QSYS-E11 and E12, docs/research.md; src/experimental.rs ↗

04 / A RULE TAKES ITS NEIGHBOURS

The second phase removes every arrow of every path a rule was applied to, and then every arrow left leading nowhere. The first note found that the report’s recipe for deleting one string deletes its neighbours too. Measured on the choices, the effect is complete. A + B == C. on ten choices leaves two strings, of 1,024. Eleven of the 1,024 have no A + B in them, so the rule applied to none of them, and none of the eleven survives. Every arrow except the first B and the last A is on some path the rule was applied to. On three choices, A + A + A has no A + B, but its first arrow is also the first arrow of A + B + A, so it goes; from three choices on, no untouched string survives. Add a copy of every word to a new label, A == X. and B == Y., and every one of the original strings comes through, relabelled, beside every string with C in it: 5, 12, 29, 169, 985 and 5,741 strings for 2, 3, 4, 6, 8 and 10 choices, the Pell numbers. The copy has to go to a new label. A == A. never stops.

QSYS-E09, docs/research.md ↗Colmerauer 1970, pp. 22 and 30–31 ↗

05 / THE LOSS IS THE POINT

So the second phase could keep strings instead: keep every string from entry to exit that does not run through a path some rule was applied to. The second machine does this too. To keep one string and drop another that shares an arrow with it, the graph has to be unshared, each vertex split by the arrows just crossed to reach it. On the ten choices, nothing is lost. All 1,024 strings come through, each A + B rewritten as C, in 69 arrows where the report’s phase keeps 11. On the report’s own systems it breaks them. The analysis of the French sentence keeps 72 strings, the tree and every partial analysis no rule took further, where the report keeps one. The example of section 8 keeps eight, S(1,1,1) and seven partial analyses, where the report keeps one. And the recipe for deleting a string no longer empties the graph: the string goes, but the dead ends it builds, /CUL + /DESAC and /CULDE + /SAC, survive, because the recipe works by having the second phase remove their arrows. Nothing in the report says the loss of neighbours was known or wanted; its recipe is offered for deleting every path carrying one given string, and it deletes more. But whether or not Colmerauer saw the loss, his systems depend on what causes it. A second phase that kept the neighbours would return partial analyses and keep the dead ends.

QSYS-E13, docs/research.md ↗Colmerauer 1970, pp. 30–31: the cul-de-sac ↗

06 / WHAT -INV- CAN UNDO

The report’s grammar runs both ways: inverted with -INV-, the rules that wrote eighteen paraphrases analyse each back to its tree, and so do all 131,424 sentences with at most one level of embedding. That is a property of the grammar, not of -INV-. Three systems were run on all 64 strings of six choices, then inverted and run on the result. A == X. and B == Y. give back each string exactly. A == X. and B == X. give back all 64 strings for every input: each one does give X + … + X, and nothing records which was there. Parity’s inverse never stops, because E + B == E., inverted, is E == E + B., which applies to its own result. Phases in sequence lose in another way. The report’s last two phases pack each sentence into one tree and unpack it, “pour sortir les résultats en clair”, to print the results plainly. They give back exactly the eighteen sentences, and 282 arrows where the synthesis had 139: the identity on strings, and the undoing of the sharing. And phases do not commute: on A + B, A == B. and A + B == D. give D in one phase, B + B as two phases in that order, and D in the other.

QSYS-E09 and E14, docs/research.md ↗Colmerauer 1970, p. 33: -INV- ↗

07 / OTHER COMPUTATIONS

Written in the report’s language and run by the historical machine, lists make data easy. Unary addition is N(U*) + PLUS + N(V*) == N(U*,V*)., and a parameter used twice tests equality: N(U*) + EGAL + N(U*) == VRAI. Multiplication, adding one in binary with a carry that moves right, reversing a list, and one step of the cellular automaton rule 110 all work, in one to nine rules. Each repeated step is a scan from left to right with an accumulator, because a rule reads its whole left side and replaces it: it cannot read a neighbour as context and leave it, so the overlapping windows of the automaton cannot all be rewritten at once. Facts are joined only when they are next to each other. R(B,C) + R(A,B) is never composed. A rule that lets facts change places joins them, but never stops, and two facts held side by side as alternatives are never joined at all, since no path runs through both. That is the same limit again.

QSYS-E15, docs/research.md; research/e15-*.q ↗

WHAT THIS DOES NOT SHOW

  • This is the machine as the report describes it, rebuilt; no program text of the Q-systems is known to us. The lost ALGOL program, its FORTRAN translation, the machine-code version Colmerauer and Roussel mention, and the later Q-systems of METEO may have merged equal arrows. None of the report’s examples could show it.
  • Two arrows are called equal here when they have the same two ends and the same tree. Merging is about that, not about strings or meanings that are equivalent in some wider sense.
  • The merging and string-purifying machines are experiments of our own, not Colmerauer’s. They were run on the systems named here and on the report’s examples, nothing more. That merging left every one of those examples unchanged does not show it leaves every Q-system that stops unchanged, and keeping the count of derivations is not keeping every property of the derivations. The only changes merging was found to make were in systems like A == A., which never stop under the report’s definition; others may exist.
  • Beyond one level of embedding the grammar was sampled, not exhausted: of 9,565,938 sentences of one tree, 500 tried. That no sentence tried was ambiguous is not a proof that none is.
  • The graphs of choices were built to test the machine, not taken from any use of it. Everything was built and measured by one coding agent and checked by no person. No literature search was made, and merging equal results is the familiar idea of tabulation and chart parsing, so nothing here is claimed as new.

A rebuilt machine can be measured where its designer never ran it, so long as what was measured is kept apart from what was changed.

OPEN

Did any later Q-system merge equal arrows?

The report defines a phase by adding a whole new path for every application, and none of its examples meets the case where that matters. The FORTRAN translation of the ALGOL program, the machine-code version Colmerauer and Roussel mention, and the Q-systems METEO was written in may have done otherwise. A manual or listing of any of them would say whether the cost of fanning in measured here was ever paid in practice.

PUBLICATION HISTORY

Each version preserves its manuscript, claims and source references. Research status is recorded separately from publication.

  1. V1.0 · 2026-11-26 ↗

    First publication, after an independent fact-check against the repository and the report's page scans OPEN

    MANUSCRIPT JSON ↗ · BIBTEX ↗ · CSL JSON ↗

  2. V1.1 · 2026-11-27 ↗

    Removed the statements about how the work was done; nothing about the results changed OPEN

    MANUSCRIPT JSON ↗ · BIBTEX ↗ · CSL JSON ↗

MACHINE-READABLE HISTORY ↗

SOURCES & PROVENANCE

AUTHOR / Chris Hay · VERSION / 1.0

PUBLISHED 26 NOV 2026 · VERSION 1.0

CITE

CITE THIS

Research note · 1.0

Hay, C. (2026). A Q-system can hold a trillion strings, but never sees two become one. (Version 1.0). Chris Hay. https://chrishayuk.com/records/N-Q-SYSTEMS-POSSIBILITIES/1.0