Home

🍎🍌🐈🐢🐘 Slava's Monoid Zoo 🐘🐢🐈🍌🍎

This page is still under construction.

Introduction

I became interested in finitely-presented monoids because the Swift compiler uses the Knuth-Bendix completion algorithm to implement same-type requirements. You can read about the Swift compiler's use of Knuth-Bendix in my book: There are multiple formulations of the Knuth-Bendix algorithm, but in Swift's case, we're using it to solve the word problem in a finitely-presented monoid. The word problem asks if two words over a finite alphabet are equivalent under the bidirectional string rewriting rules given by a finite monoid presentation. In the Swift compiler, the finitely-presented monoids correspond to generic signatures, and the rewriting rules are the same-type requirements, appearing in the user's input program.

Knuth-Bendix attempts to construct a finite complete rewriting system from the bidirectional equivalences that define the monoid. A finite complete rewriting system is essentially a data structure which allows us to reduce any word into a normal form in a finite number of steps. This allows us to solve the word problem for the original monoid: given any pair of words, we can first reduce both words to their normal form by applying the rewriting rules in our FCRS, and then we check if these normal forms are identical.

Knuth-Bendix completion will sometimes fail; the failure mode is that it runs forever, continuing to add new rules which never converge. The word problem for finitely-presented monoids is known to be undecidable in the general case, so at the very least, Knuth-Bendix must fail if the given input rules define a monoid with an undecidable word problem.

A classic example of a monoid with an undecidable word problem appears in the paper An associative calculus with an insoluble problem of equivalence (for an English translation with commentary, see G. S. Tseytin's seven-relation semigroup with undecidable word problem):

⟨a, b, c, d, e | ac=ca, ad=da, bc=cb, bd=db, eca=ce, edb=de, cca=ccae⟩

Decidable but not FCRS

Undecidable instances aside, one might then ask: if our monoid has a decidable word problem, can we still solve the word problem with a finite complete rewriting system? This was answered in the negative by Craig C. Squier in the late 1980's. In a paper titled A finiteness condition for rewriting systems, Squier shows that the monoid S1, with five generators and five relations, does not have finite derivation type, which is a necessary condition for the existence of a finite complete rewriting system presenting the same monoid:
S1 := ⟨a, b, t, x, y | ab=1, xa=atx, xt=tx, xb=bx, xy=1⟩
Thus, Knuth-Bendix completion will fail with any presentation of this monoid, not just the one given above, no matter what generating set or reduction order we choose. Despite that, S1 happens to have a decidable word problem. An even shorter example, with three generators and three relations, appears in a paper titled On finite complete rewriting systems, finite derivation type, and automaticity for homogeneous monoids:
⟨a, b, c | ac=ca, bc=cb, cab=cbb⟩
This all leads to my investigation:
Goal: To find, in some subjective sense, the "smallest" or "shortest" presentation that defines a monoid whose word problem cannot be solved by Knuth-Bendix completion.
Besides solving the word problem, a finite complete rewriting system can also answer if the presented monoid is finite, or if it is a group. A minor side quest here is to collect and analyze this data about all short presentations.

Two relation monoids

I've made the most progress in answering this question in the case of two generators and two relations.

I can find a finite complete rewriting system for every two-generated two-relation monoid with sum of sides ≀ 11, with 24 exceptions.

Explore my data set:

⟨a, b | aaa=a, abba=bb⟩

This is the unique two generator, two relation monoid with length 10 (except for the isomorphic presentation where we swap a and b) that cannot be presented by a finite complete rewriting system over any alphabet ("not FCRS"). In fact, it does not have finite derivation type, just like Squier's S1.

Read the proof:

Note that the article describes an earlier enumeration of two-relation monoids up to length 10; at the time, this monoid was one of three "hard" instances. Since then, I've found an FCRS for the other two:

⟨a, b | aba=aa, baa=aab⟩

An earlier result that one of the length 11 hard instances is not FCRS. The main proof is (relatively speaking) quite straightforward, relying only on the pumping lemma for regular languages; it fits in two pages. I would be very happy if this appeared as an example in someone's textbook on string rewriting or Knuth-Bendix completion!

Read the proof:

An interesting question (I do not know the answer) is if this monoid also fails to have finite derivation type.

Minor results

The two relation enumeration includes some short presentations of classical groups. These might not be widely known:

One relation monoids

I've also investigated monoids with one defining relation.

I can find a finite complete rewriting system for every two-generated one-relation monoid with sum of sides ≀ 10, with five exceptions. It is not known if every one-relation monoid can be presented by a finite complete rewriting system; perhaps one of these could be a counterexample, but I have no formal results in this area.

Explore my data set:

Minor results

(1) The below monoid, due to Victor Maltcev, appears as Exercise 4.10:8 (ii) in An invitation to General Algebra and Universal Constructions by George M. Bergman:
(ii) (Victor Maltcev) Does there exist a normal form or other useful description for the monoid presented by generators a, b and the relation abbab = baabb ? (I do not know the answer.)
The monoid ⟨a, b | abbab=baabb⟩ is anti-isomorphic to ⟨a, b | abaab=aabba⟩, which admits a finite complete rewriting system.

(2) The next example appears in the fantastic survey of The Word Problem for One-Relation Monoids by C.F. Brodda, where he writes:

We note in passing that the smallest monadic one-relation monoid to which no result in the literature appears to be available to solve the word problem for is ⟨a, b | bababbbabba=a⟩. The author has not found a finite complete rewriting system for this monoid, but has solved the word problem for this monoid by other means.
This presentation does not appear in my enumeration, for it has length 12. It has the following finite complete rewriting system, once we add a letter c=bba:
  1. ca β‡’ ac
  2. b2a β‡’ c
  3. cbac β‡’ abc2
  4. cbabc2 β‡’ ba
  5. ba2 β‡’ (ab)2c3
  6. (ba)2c β‡’ aba(bc2)2
  7. b(ab)2c2 β‡’ a
  8. c(ba)2 β‡’ abcba
  9. cbabcba β‡’ a
  10. (ba)3 β‡’ (ab)2c(cb)2a
  11. b(ab)2cba β‡’ (ab)2c2
(3) The next example is from a talk titled Off with the head! Termination provers and the word problem for 1-relation monoids by Reinis Cirpons:
The 1-relation Thue systems for which the decidability of the word problem is unknown to us: {baabbbaba ↔ a} {baaabaaa ↔ aba}.
The first one is anti-isomorphic to ⟨a, b | ababbbaab=a⟩, which admits a finite complete rewriting system. The second one has length 11 so it does not appear in my enumeration, but it can also be solved by FCRS if we add c=aaaba and d=abaaa:
  1. bc3 β‡’ dbd
  2. bc2ad β‡’ dba
  3. abd β‡’ bcad
  4. ac β‡’ cad
  5. abc β‡’ dba
  6. dbcadc β‡’ adbd
  7. cbcadc β‡’ ad2bd
  8. adbc β‡’ cba
  9. ab2cd2 β‡’ bcdbad2
  10. ab2c2 β‡’ bcdbcad
  11. ab2cdc β‡’ bcdbadc
  12. ab2cdbc β‡’ bcdbcba
  13. aba β‡’ bca2
  14. a2d β‡’ ca2
  15. dbc(ad)2 β‡’ adba
  16. cbc(ad)2 β‡’ ad2ba
  17. ab2cad β‡’ bcdbca2
  18. ab2cdad β‡’ bcdb(ad)2
  19. adbad2 β‡’ cbda2
  20. ab2cdbad2 β‡’ bcdbcbda2
  21. adbadc β‡’ cbd(ad)2
  22. ab2cdbadc β‡’ bcdbcbd(ad)2
  23. ab2ca2 β‡’ bcdba3
  24. adb(ad)2 β‡’ cbdada2
  25. ab2cdb(ad)2 β‡’ bcdbcbdada2
  26. bca4 β‡’ d
  27. adba3 β‡’ c
  28. ab2cdba3 β‡’ bcdbc
  29. dba5 β‡’ ad
  30. cba5 β‡’ ad2