⨠Slava's | Monoid Zoo â©
|
Look up a monoid with two generators, and one or two defining relations:
|
|
|
|
|
Details:
- Spaces are ignored.
- The empty word is denoted by "1".
- Lowercase letters stand for generators.
- The two sides of a defining relation are separated by "=".
- The sides must be distinct, and at least one must have length greater than one.
- The relations are separated by "," in the case there are two.
- Maximum sum of sides is 10 (one relation) or 11 (two relations).
|
|
Jump directly to an enumeration:
|
Contents
The goal of this investigation
Two generators, two relations
Two generators, one relation
Background
My interest in finitely-presented monoids stems from the Swift compiler's use of the Knuth-Bendix completion algorithm to implement same-type requirements. There are multiple possible 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.
In the Swift compiler, the finitely-presented monoids are the generic signatures of function and type declarations, and the relations in each monoid correspond to the generic requirements imposed upon that declaration. This is all documented in Chapters 16--18 of Compiling Swift Generics, if you're curious.
The word problem
The word problem asks the yes/no question of whether two words over a finite alphabet are equivalent under a given set of bidirectional string rewriting rules, or "relations". Here is an example. Suppose you're given these two relations:
- ððð = ððð
- ððð = ðð
Can you see a way to transform a string of 8 apples "ðððððððð" into a string of 10 apples "ðððððððððð"?
It is not at all obvious that this can be done, and in fact it takes a minimum of 15 steps. (You can discover the solution for yourself by playing this simple game.) This is a concrete instance of the word problem: we have two words a8 and a10, and the monoid presentation â¨a, b | bab=aaa, bbb=bbâ©, and we want to know if the two words are equivalent with respect to those two rules.
Even though the above presentation is very short, the word problem here is already quite difficult. A classic result is that the word problem for finitely-presented monoids is undecidable in the general case. A very short 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â©
Finite complete rewriting systems
Knuth-Bendix attempts to construct a finite complete rewriting system from the bidirectional equivalences that define the monoid. A finite complete rewriting system is a set of directed reduction rules which allows us to reduce any word into a normal form in a finite number of steps. This completely solves 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 reduction rules in our FCRS, and then we check if we get identical normal forms.
Knuth-Bendix completion will sometimes fail; the failure mode is that it runs forever, continuing to add new rules which never converge. At the very least, Knuth-Bendix must fail if the given input rules define a monoid with an undecidable word problem. Undecidable instances aside, one might then ask: if our monoid has a decidable word problem, can we still solve the word problem with an FCRS? 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 considered the monoid S1, with five generators and five relations:
S1 := â¨a, b, t, x, y | ab=1, xa=atx, xt=tx, xb=bx, xy=1â©
Squier shows that this monoid does not have finite derivation type, which is a necessary condition for the existence of an FCRS presenting the same monoid. 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â©
The above monoid again has a decidable word problem (the relations preserve the length of the word, so we can decide if two words are equivalent by first comparing their lengths, followed by an exhaustive enumeration if both words have equal length); just not by Knuth-Bendix completion.
The goal of this investigation
The above examples serve as motivation for my investigation, which can be summarized as follows:
Goal: To find, in some subjective sense, the "smallest" or "shortest" monoid presentation(s) whose whose word problem cannot be solved by a finite complete rewriting system.
I got the idea from Bogdan Grechuk's wonderful book, Polynomial Diophantine Equations: A Systematic Approach. Much like the word problem, no general approach exists that can solve all Diophantine equations, because the general case is undecidable. Grechuk defines an ordering of all such equations, and then proceeds to work through the list, applying various techniques to solve as many instances as possible in order of increasing size.
Similarly, you can imagine enumerating all monoid presentations in a certain order, and trying to find a finite complete rewriting system for each one. To construct an FCRS, I first attempt a variation of the technique described in Morphocompletion for one-relation monoids, which adds new new generators to the presentation before performing Knuth-Bendix completion algorithm with a variety of reduction orders simultaneously:
- Shortlex for all permutations of the alphabet
- Recursive path for all permutations of the alphabet together with all possible distinct degree assignments
Since Knuth-Bendix completion can struggle to produce a rewriting system for very large finite monoids due to an explosion in the number of intermediate rules, for a couple of instances I used Todd-Coxeter congruence enumeration instead of Knuth-Bendix completion. Congruence enumeration terminates iff the presented monoid is finite; the "standardization" algorithm described in Computation with Finitely Presented Groups by Charles C. Sims can then very quickly produce a finite complete rewriting system.
Besides solving the word problem, various properties of the presented monoid can be decided from an FCRS:
- Whether the monoid is finite, in which case it is possible to enumerate the elements, and construct a Cayley table and Cayley graph for the monoid (or when performing congruence enumeration, you get the Cayley graph first, and then the FCRS from that).
- Whether the monoid is a group, in which case the inverses of the generators can be determined as well.
- Whether the monoid is commutative, and if so, whether it is cancellative.
My side quest has been to collect and analyze this data, to better understand the "easy" cases as well. If you click through the links to the monoids below, you'll these properties summarized for each monoid, together with Cayley tables for finite monoids up to size 24, and Cayley graphs for finite monoids up to size 1083.
To answer the one final question you may have:
Why? Because it's an interesting problem.
Two generators, two relations
It is straightforward to generate an exhaustive list of all monoid presentations with two generators, two relations, and sum-of-sides ⤠11:
â¨a, b | u1=v1, u2=v2â©, where |u1| + |v1| + |u2| + |v2| ⤠11
You can significantly cut down on the work by realizing that a large number of monoid presentations in this list are isomorphic or anti-isomorphic to each other, by some combination of the following:
- Swapping the two sides of a defining relation, so u=v becomes v=u.
- Swapping the two defining relations, so â¨a, b | u1=v1, u2=v2â© becomes â¨a, b | u2=v2, u1=v1â©.
- Replacing a with b, and vice versa, within all defining relations.
- Reversing both sides of each defining relation.
If one instance in such an equivalence class has a finite complete presentation, they all do, so it suffices to only keep one instance from each such equivalence class.
I also skip instances where a defining relation is the tautology u=u, or of the form u=v with both |u| ⤠1 and |v| ⤠1. (Note that this discards some "legitimate" instances, namely the two-generator one-relation monoids with sum-of-sides N, which can be presented with two relations and with sum-of-sides N+1: â¨a, b | u=v, a=aâ©. However, I enumerate one-relation monoids up to length 10 below, which are exactly the missing presentations here.)
The enumeration
After this filtering has taken place, 28,551 instances remain. I can find a finite complete rewriting system for all but 19 of these, which are listed as "hard instances" on the page below:
â¨a, b | aaa=a, abba=bbâ©
My main result from this investigation so far is that â¨a, b | aaa=a, abba=bbâ© is the unique two generator, two relation monoid with length 10 that cannot be presented by a finite complete rewriting system over any alphabet (this monoid is "not FCRS"). In fact, just like Squier's S1, it does not have finite derivation type.
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, and they're actually isomorphic:
â¨a, b | aba=aa, baa=aabâ©
I also have an earlier result that one of the length 11 hard instances is not FCRS. The main proof fits in two pages, and it is (relatively speaking) quite straightforward, relying only on nothing more than the preliminary definitions and the pumping lemma for regular languages. I would be very happy if this was incorporated 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.
Resolving the status of the 17 remaining length 11 hard instances is still an open problem. (A very observant reader might notice that the "8 apples" monoid from the introduction, â¨a, b | bab=aaa, bbb=bbâ©, appears among them. I'm pretty sure it's not FCRS.) Let me know if you figure anything out!
Finite monoids
Every finite monoid has a decidable word problem, and one can always find a finite complete rewriting system, in principle at least. How bad do they get?
Of the 28,551 instances in the enumeration, 18,867 are presentations of finite monoids. I've classified them up to (anti-)isomorphism, and I believe there are exactly 555 essentially unique finite monoids that appear. Some are quite small:
- â¨a, b | aa=a, ab=1â© is the first presentation of the trivial group with one element, but there are 2030 more.
- â¨a, b | aa=1, ab=1â© is the first presentation of the group with two elements, but there are 1990 more.
- â¨a, b | aa=a, aaa=bâ© is the other possible monoid structure with two elements; not nearly as popular, with only 46 other duplicates in the enumeration.
- â¨a, b | ab=a, ba=bâ© is the smallest non-commutative monoid in the enumeration, with three elements.
Some nice and short presentations of various classic finite groups then appear:
- â¨a, b | abba=b, baba=1â© is a presentation of the symmetric group of degree 3, with 6 elements. (An interesting fact is that while this is the only non-Abelian group of order 6 up to isomorphism, there are many more monoids that are not groups, for example the slightly ridiculous â¨a, b | ab=a, bbbb=baâ©.)
- â¨a, b | aba=b, aabb=1â© is a presentation of the Quaternion group with 8 elements. Can you see which elements can work as i, j, k, and -1? (There are multiple possible assignments, of course.)
- â¨a, b | bab=aa, bbb=1â© is a finite monoid with 27 elements, but the group with the same presentation is SL(2, 3). (The monoid has three more elements, the powers of b.)
Finally, a "Busy Beaver"-esque problem: what is the largest finite monoid you can present with two generators, two relations, and length N? (The Busy Beaver problem asks, given a Turing machine with m states and n symbols, what is the longest possible running time among all such machines that halt?) Here are two data points:
- The length 10 maximum is 1083 elements, achieved by â¨a, b | aaa=1, abbbba=bâ©. The rewriting system consists of 11 rules and so is not too bad, but here is an explicit description of this monoid:
- The group with the same presentation has 1080 elements, and is isomorphic to the direct product â¤9 ⨯ SL(2, 5).
- One possible isomorphism maps the generators a and b to the following elements,
a := (3, A),
b := (1, B)
where:
A := ,
B :=
- In the group, b90 = 1, so every element can be expressed as a word involving b, but this doesn't hold in the monoid.
- Thus, the monoid with this presentation has three more elements than the group: 1, a, and a2.
- It follows that every element of this monoid can be represented as a triple, consisting of an integer, a 2x2 integer matrix, and a boolean flag that is set for pure powers of a.
- The monoid operation is defined to perform the group operation on the first two components of each triple, and "Boolean and" on the third component.
- Here is an explicit realization of the monoid operation in the form of a short Swift program, to verify that the two generators satisfy the defining relations and generate a monoid of the correct size.
The length 11 maximum is ⥠2,361,964 elements, with top candidates â¨a, b | aaba=bab, bbbb=1â© and â¨a, b | aaaa=1, ababba=bâ©. In fact, they're isomorphic, but the isomorphism is not yet recorded in the enumeration.
- I have not been able to get Knuth-Bendix completion to finish with either of these two presentations. Todd-Coxeter congruence enumeration succeeds though, and outputs a rewriting system with more than 100,000 rules for the first of the two, and 61,000 rules for the second. These are by far the largest rewriting systems in my collection; all the rest are under 100 rules each.
- I have yet to come up with an explicit description of this monoid, if one even exists.
- Note: I put "â¥" above. While the listed monoid has exactly that size, I cannot yet determine if these three hard instances are finite or infinite, so of course it is possible that one of them is a finite monoid with more than 2,361,964 elements:
- â¨a, b | aaaa=1, ababb=baâ©
- â¨a, b | aaa=1, ababbb=baâ©
- â¨a, b | aaa=1, babbb=abaâ©
How big is the largest finite monoid with a presentation of length 12? What about 13?
Two generators, one relation
I've also investigated monoids with one defining relation.
The enumeration
I can find a finite complete rewriting system for every two-generated one-relation monoid with sum of sides ⤠10, with five exceptions that are listed at the page below: It is not known if every one-relation monoid can be presented by a finite complete rewriting system. Maybe it is too much to hope for, but if the answer is "no", perhaps one of these will be the first such counterexample!
Explore:
A number of classical one-relation monoids can be found in this enumeration:
- â¨a, b | ab=1â© is the bicyclic monoid.
- â¨a, b | aba=1â© is the Abelian group of integers under addition. (Can you see why ba=ab, and what the integer values of a and b must be?)
- â¨a, b | bab=abaâ© is the submonoid of positive words in the Braid group B3, discussed in A finite Thue system with decidable word problem and without equivalent finite canonical system. It has no FCRS over the alphabet {a, b}, but if you extend the alphabet with one auxiliary generator equivalent to one of ab, ba, or aba, you can obtain an FCRS.
- â¨a, b | ababba=1â© is isomorphic to the Jantzen monoid, discussed in Finite complete rewriting systems for the Jantzen monoid and the Greendlinger group. To obtain an FCRS for this monoid (which is incidentally a group), one must not only expand the generating set, but also use a recursive path order which allows for length-increasing rewrite rules.
There are no finite monoids in this enumeration, because it takes at least two relations to present a finite monoid with two generators.
A team led by James D. Mitchell at University of St Andrews has been looking at solving the word problem in one relation monoids using a variety of techniques, not just FCRS, with a larger enumeration than mine---they're enumerating all â¨a, b | u=vâ© where |u| ⤠10 and |v| ⤠10, not just |u|+|v| ⤠10. Check out their publications:
Minor results
I've found finite complete rewriting systems for a handful of one relation monoids that have stumped others, which is perhaps mildly interesting. You can see the slightly absurd phenomenon in action here, where even though we're starting from a single relation, we might get a finite complete rewriting system with a large number of rules.
(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.
The presentation â¨a, b | bababbbabba=aâ© 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:
- ca â ac
- b2a â c
- cbac â abc2
- cbabc2 â ba
- ba2 â (ab)2c3
- (ba)2c â aba(bc2)2
- b(ab)2c2 â a
- c(ba)2 â abcba
- cbabcba â a
- (ba)3 â (ab)2c(cb)2a
- b(ab)2cba â (ab)2c2
(3) In the paper On the Dehn functions of a class of monadic one-relation monoids, the same author defines this family of monoids:
Î N := â¨a,b | baa(ba)N=aâ©
He then asks:
Question 3. Does ΠN admit a finite complete rewriting system for all N ⥠2?
I believe they all admit finite complete rewriting systems. Here is N=2, â¨a, b | baababa=aâ©:
- cac3 â ac
- cac2a â a2
- a2c3 â c(ac)2
- a2c2a â caca2
- ad â ca
- dc3 â c
- dc2a â a
- dac â ac5
- dcac â ac3
- da2 â ac4a
- dca2 â ac2a
- ab â c
- bc â db
- ba â d
And N=3, â¨a, b | baabababa=aâ©:
- cac5 â ac
- cac4a â a2
- a2c5 â cac3ac
- a2c4a â cac3a2
- ad â ca
- dc5 â c
- dc4a â a
- dac â ac17
- dcac â ac13
- dc2ac â ac9
- dc3ac â ac5
- da2 â ac16a
- dca2 â ac12a
- dc2a2 â ac8a
- dc3a2 â ac4a
- ab â c
- bc â db
- ba â d
And N=4, â¨a, b | baababababa=aâ©:
- cac6 â ac
- cac5a â a2
- a2c6 â cac4ac
- a2c5a â cac4a2
- ad â ca
- dc6 â c
- dc5a â a
- dac â ac26
- dcac â ac21
- dc2ac â ac16
- dc3ac â ac11
- dc4ac â ac6
- da2 â ac25a
- dca2 â ac20a
- dc2a2 â ac15a
- dc3a2 â ac10a
- dc4a2 â ac5a
- ab â c
- bc â db
- ba â d
This pattern continues for N=5, 6, 7, ... as well, and you seem to always get an FCRS by adding two generators c=ab and d=ba.
(4) 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 is FCRS. The second one â¨a, b | baaabaaa=abaâ© 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:
- bc3 â dbd
- bc2ad â dba
- abd â bcad
- ac â cad
- abc â dba
- dbcadc â adbd
- cbcadc â ad2bd
- adbc â cba
- ab2cd2 â bcdbad2
- ab2c2 â bcdbcad
- ab2cdc â bcdbadc
- ab2cdbc â bcdbcba
- aba â bca2
- a2d â ca2
- dbc(ad)2 â adba
- cbc(ad)2 â ad2ba
- ab2cad â bcdbca2
- ab2cdad â bcdb(ad)2
- adbad2 â cbda2
- ab2cdbad2 â bcdbcbda2
- adbadc â cbd(ad)2
- ab2cdbadc â bcdbcbd(ad)2
- ab2ca2 â bcdba3
- adb(ad)2 â cbdada2
- ab2cdb(ad)2 â bcdbcbdada2
- bca4 â d
- adba3 â c
- ab2cdba3 â bcdbc
- dba5 â ad
- cba5 â ad2