{'fraction_non_alphanumeric': 0.05289333960615633, 'fraction_numerical': 0.01492035755091068, 'mean_word_length': 3.4159791060722977, 'pattern_counts': {'":': 0, '<': 47, '<?xml version=': 0, '>': 44, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 76, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Decision problems for finite and infinite presentations of groups and monoids

In this survey we show how well known results about the Word Problem for finite group presentations can be generalized to the Word Problem and other decision problems for non-necessarily finite monoid and group presentations. This is done by introducing functions playing the same role of the Dehn function for the given decision problem and by finding the Tietze transformations that leave this function invariant. This survey presents some original ideas and points of view.


Introduction
The Word Problem for finite group presentations is a very well studied problem. The following results are classical: (a) A finite group presentation has a solvable Word Problem if and only if its Dehn function is computable.
(b) The Dehn functions of two finite presentations for the same group are equivalent.
The goal of this survey is to show how these results can be generalized to the Word, the Conjugacy and the Membership Problem of non-necessarily finite monoid a and group presentations.
The first question to answer is: what are the functions which play for the above decision problems the rôle played by the Dehn function? That is, what is the decidability function for any of these problems, i.e., the function whose computability is equivalent to the solvability of the decision problem?
For the Word Problem of finite monoid presentations this function is the derivational length (Definition 5.1), which remarkably was introduced by K. Madlener and F. Otto [14] long before the Dehn function (introduced by M. Gromov in [9]). Part 2 of Proposition 5.11 generalizes (a) to finite monoid presentations.
In a recent paper [8], R. I. Grigorchuk and S. V. Ivanov have introduced for decidable (non-necessarily finite) group presentations a function f 1 which is computable if and only if the Word Problem is solvable. It has to be noticed that f 1 is equivalent to a function (called work ) introduced earlier by J.-C. Birget [2] for monoid and group presentations. In 1 of Proposition 5.11 we prove that the function work permits to generalize (a) also to decidable monoid presentations.
It has to be noticed that there are examples of infinite decidable group presentations with unsolvable Word Problem but with a computable Dehn function (see Example 2.4 of [8]).
It is interesting to consider a group presentation as a monoid presentation and comparing the Dehn function and the derivational length. We have found a quadratic relation between these two functions in the case of finite presentations (2 of Proposition 6.8). In a future paper we will show a linear relation under a mild hypothesis on the presentation, thus proving that in this situation the Dehn function and the derivational length are equivalent.
Let us now talk about the Conjugacy Problem. We have introduced (Definition 7.8) a function, denoted Γ, which is computable if and only if the Conjugacy Problem is solvable (on condition that the Word Problem be solvable, see Proposition 7.17). We have treated the Conjugacy Problem in the context of monoid presentations, not only group presentations. For a this includes also semigroup presentations, see the observation after Definition 1.10 monoids the conjugacy relation is not necessarily symmetric; moreover the solvability of the Conjugacy Problem does not necessarily imply that of the Word Problem. This raises interesting questions about what can be generalized to monoids of the well known results about the conjugacy in groups (see Problems 7.4 and 7.12).
The decidability function for the Membership Problem is the distortion function (Definition 8.6), introduced by Gromov [10]. The generalization of (a) to the Membership Problem (Proposition 8.9) is due to B. Farb [6] for group presentations and to Margolis, Meakin andSuniḱ [17] for monoid presentations.
Let us now consider (b). What is special about finite presentations for the same group is that given any two of them, one can be obtained from the other by applications of elementary Tietze transformations. Given two nonnecessarily finite presentations for the same group this is not the case. To generalize this fact one has to change the point of view and given a finite or infinite presentation P consider all the presentations obtainable from P by means of Tietze transformations of a certain kind. A question that naturally arises is: given a decision problem, what are the Tietze transformations that leave its decidability function invariant? To answer this question we have introduced the so-called bounded Tietze transformations (see Definition 9.4) and found for any decidability function the kind of bounded Tietze transformations that leave the function invariant up to equivalence (Propositions 9.7 and 9.10, Remark 9.8).

Words and presentations
As usual, by a semigroup we mean a set equipped with an associative product. A monoid is a semigroup possessing an identity element. A group is a monoid in which every element has an inverse.
Let S be a semigroup devoid of identity element and let 1 be an element not belonging to S. Then we can embed S into the monoid S ∪ {1} where we set 1s = s1 = s for every s ∈ S ∪ {1}. We denote by S 1 the monoid S ∪ {1}. If S is a monoid then by S 1 we denote S itself.
Definition 1.1 A congruence on a semigroup S is an equivalence relation ∼ compatible with the product of S, that is if a, x and y are elements of S and if x ∼ y then ax ∼ ay and xa ∼ ya. In this case the set of equivalence classes of S under ∼ is a semigroup, which is a monoid or a group if S is.
A congruence on S is a subset of S 2 , that is it is the set of pairs (x, y) such that x ∼ y. The intersection of a family of congruences on S is still a congruence.
Definition 1.2 Let R ⊂ S 2 ; the congruence generated by R, denoted R , is the intersection of all the congruences on S containing R. We denote by S/ R the semigroup of the equivalence classes of R . Remark 1.3 If R is symmetric, i.e., if (u, v) ∈ R implies that (v, u) ∈ R, then the congruence generated by R can be described in the following way. Let u, v ∈ S and let (a, b) ∈ R; we say that (u, v) is a one step R-derivation (by means of (a, b)) if there exists x, y ∈ S 1 such that u = xay and v = xby.
We say that (u, v) is an R-derivation if u = v or if there exist a 0 = u, a 1 , · · ·, a k = v ∈ S such that (a i−1 , a i ) is a one step R-derivation for every i = 2, · · · , k. In this case we say that (u, a 1 , · · · , a k−1 , v) is a k steps Rderivation.
Now we prove that u is congruent to v in the congruence generated by R if and only if (u, v) is an R-derivation. Indeed let ∼ be the relation defined by: u ∼ v if (u, v) is an R-derivation. Then ∼ is a congruence containing R, that is ∼ contains R . On the other side if a congruence contains R then it contains any R-derivation, that is it contains ∼; therefore R contains ∼.
Obviously R ′ is symmetric and the congruence generated by R coincides with that generated by R ′ . Thus it is not restrictive to consider only congruences generated by symmetric sets.
Remark 1.5 Let S be a semigroup (with or without identity), let 1 be an element not belonging to S, set M := S ∪ {1} and extend to M the product of S by setting m1 = 1m = m for m ∈ M . We have that M is a monoid whose identity is 1 (if S is a monoid with identity e then e is not the identity of M since we have set e1 = e = 1).
Let R ⊂ S 2 and denote by R S and R M the congruences of S and M respectively generated by R. We show that S/ R S is isomorphic to It is obvious that if u and v are elements of M such that uv = 1 then necessarily u = v = 1. Since for every (a, b) ∈ R we have that a, b = 1, then if (xay, xby) is a one step R-derivation of M then xay, xby = 1. This implies that the congruence class of 1 contains only 1. This implies also that the R-derivations of S and M coincide and that if u ∈ S then the congruence classes of u in S and in M coincide. Thus the application from S/ R S to (M/ R M ) \ {1} sending the congruence class of u in S to that in M is well defined and is an isomorphism of semigroups.
Remark 1.6 Let G be a group and let R ⊂ G 2 . Set then R coincides with the congruence generated by the set {(w, 1) : w ∈ R 0 }. Moreover if R is symmetric then R 0 contains the inverse of any of its elements.
Let N be the normal subgroup of G normally generated by R 0 , that is the intersection of all the normal subgroups of G containing R 0 . Then u is congruent to v if and only if uv −1 ∈ N . Moreover b G/ R = G/N and N coincides with the equivalence class of 1 in the congruence generated by R.
Let R be symmetric; then there is an R-derivation from u to v if and only if there exist a 1 , · · · , a k ∈ G and r 1 , · · · , r k ∈ R such that uv −1 = a 1 r 1 a −1 1 · · · a k r k a −1 k .
Definition 1.7 Let X be a set (finite or infinite); the free monoid on X, denoted M(X), is the set of words on X equipped with the usual operation of concatenation of words. The identity element of M(X) is the word with zero letters, denoted 1. If w = x 1 · · · x m is an element of M(X) with the x i ∈ X then the length of w, denoted |w|, is the natural number m. The length of 1 is zero. The elements of X are called letters. Given (u, v) ∈ M(X) 2 we define the length of (u, v) as |u| + |v|.
M(X) is free on the set X in the category of monoids (see Def. I.7.7 of [12]), that is for every monoid M and for every function f from X to M there is one and only one homomorphism from M(X) to M which extends f . Definition 1. 8 The free semigroup on X, denoted M(X) + , is equal to M(X) minus the element 1, that is it is the set of words on X of positive length. It is free on the set X in the category of semigroups.
We recall that R denotes the congruence generated by R. Definition 1.9 Let R be a subset of M(X) 2 ; we say that < X | R > is a monoid presentation for M(X)/ R . A monoid presentation is also called a string rewriting system or a Thue system. The elements of X are called generators and those of R are called defining relations. The elements of R are called relations.
Definition 1.10 Let R be a subset of M(X) 2 + ; we say that < X | R > is a semigroup presentation for M(X) + / R . By virtue of Remark 1.5, if P =< X | R > is a semigroup presentation for the semigroup S then P considered as a monoid presentation presents c S ∪ {1} where 1 is an element not belonging to S and is the identity element for S ∪ {1}. b we observe that R is a subset of G 2 while N is a subset of G c we observe that if S is a monoid and if e is the identity of S then as seen in Remark 1.5, e is not the identity for S ∪ {1} This means that it is not restrictive to consider only monoid presentations; indeed, if P is a semigroup presentation for the semigroup S, then we can consider P as a monoid presentation for a monoid M and retrieve S by eliminating the element 1 from M . Definition 1.11 Let X −1 be a set disjoint from X such that |X| = |X −1 | and suppose given a bijection X → X −1 . We denote by x −1 the image by this bijection of an element x ∈ X and we call it the inverse of x. If y ∈ X −1 we denote by y −1 the unique element of X such that (y −1 ) −1 = y. The free group on X, denoted F(X), is the quotient of the free monoid M(X ∪ X −1 ) by the congruence generated by F(X) is free on the set X in the category of groups. Any equivalence class of the congruence generated by F contains one and only one reduced word, i.e., a word of the form x 1 · · · x m such that x −1 i = x i+1 for every i = 1, · · · , m − 1 (see The. 1.2 of [16]). If u ∈ M(X ∪ X −1 ) and if u ′ is the unique reduced word congruent to u then we say that u ′ is the reduced form of u.
Definition 1. 12 We let ρ : M(X ∪ X −1 ) → F(X) be the function sending a word to its unique reduced form.
We can consider F(X) as a subset of M(X ∪ X −1 ) (but not as a subgroup). Given two words u and v of F(X), we denote by uv their product in M(X ∪ X −1 ) and by ρ(uv) that in F(X). If uv is reduced then the products of u by v in M(X ∪ X −1 ) and in F(X) are equal.
Definition 1.13 Let R be a subset of F(X); we say that < X | R > is a group presentation for F(X)/N , where N is the normal subgroup of F(X) normally generated by R. The elements of R and those of N are called respectively defining relators and relators.
We say that < X | R > corresponds to the monoid presentation < X ∪ For every w ∈ R there are exactly |w| + 1 pairs of words (x, y) such that xy = w; thus if R is finite then |R 1 | = |R| + w∈R |w| .
Definition 1.14 Let X be a set; the free commutative monoid on X (denoted CM(X)) is the monoid presented by the monoid presentation < X | (xy, yx) for every x, y ∈ X > .
The free abelian group on X (denoted FA(X)) is the group presented by the group presentation < X | xyx −1 y −1 for every x, y ∈ X > .

Computable functions and decidable sets
For a simple but rigorous introduction to computable functions and decidable sets a good reference is the book of Shen-Vereshchagin [23].
Definition 2.1 Let E be a subset of N and let f be a function from E to N. The function f is said computable if there exists an algorithm which taken as input an n ∈ N then • it halts and gives f (n) as output if n ∈ E; • it does not halt if n / ∈ E.
A computable function is also called recursive.
, if there exists an algorithm which determines whether an arbitrary n ∈ N belongs to E.

Definition 2.3
The set E is said enumerable if there exists an algorithm which enumerates the elements of E. This means that there is an algorithm which for every n outputs a certain e n and that E = {e n : n ∈ N}. We assume that for some n the output of this algorithm can be empty, that is to be formal we must write E = {e n : n ∈ N and e n is not empty}. We also assume that e m can be equal to e n for m = n and that we are able to determine whether or not e m = e n .
A decidable set is enumerable. It is obvious that E is decidable if and only if E and N \ E are enumerable. Decidable and enumerable sets are also called recursive and recursively enumerable respectively in the literature.
Any finite subset of N is decidable (see 1.2 of [23]). Anyway when talking about a finite set E we do not only assume that its elements are finitely many but we require also the following condition: there exists an algorithm enumerating E which after a finite time it gives only empty outputs d . This condition is necessary to avoid paradoxes (see Appendix A).
We call a set verifying the latter condition a finite and effectively computable set. It turns out that almost every finite set encountered in mathematics is also effectively computable, so we will mostly use the the terms finite set and finite and effectively computable set as synonymous. d or equivalently we can say that after a finite time the algorithm stops and does not output anything more Definition 2.4 Let U and V be enumerable sets, that is U = {u n : n ∈ N} and V = {v n : n ∈ N}, where there are two algorithms whose n-th outputs are u n and v n respectively. Let V ′ be a subset of V and let f be a function from V ′ to U . Let f be the following function: let n be a natural such that v n ∈ V ′ and let f (v n ) = u m ; then set f (n) = m. Let E = {n ∈ N : v n ∈ V ′ }; then f is a function from E to N. We say that f is computable if f is computable, that is if there exists an algorithm which taken v n as input, it halts and gives f (v n ) as output if v n ∈ V ′ , otherwise it does not halt.
In an analogous way one can define decidable and enumerable subsets of an enumerable set.
Remark 2.5 If E and F are enumerable sets, then also E × F is. More generally if {E n } n∈N is an enumerable family of enumerable sets, then also n∈N E n is enumerable. This proves that if X is enumerable then the free monoid M(X) and the free group F(X) are enumerable. Thus a monoid or group with an enumerable set of generators is enumerable.
The same is true also for countable sets, that is a monoid or group generated by a countable set of elements is countable. We recall that by admitting the Church-Turing thesis (see 3.3 of [24]), there are countable sets which are not enumerable since there are countably many Turing machines and uncountably many subsets of N. Definition 2.6 A presentation P =< X | R > is said finitely or decidably or enumerably generated if X is respectively finite, decidable or enumerable. In the same way P is said finitely or decidably or enumerably related if R is finite, decidable or enumerable. A presentation which is finitely generated and related is said finite. A presentation which is finitely generated and decidably related is said finitely generated decidable.
If a group presentation is finitely, decidably or enumerably generated or related, the same is true for the monoid presentation corresponding to it (Definition 1.13).
Proposition 2.7 If a monoid admits a decidably generated and enumerably related presentation then it admits also a presentation which is decidably generated and related.
Proof Indeed let P =< X | R > be a presentation with X decidable and R enumerable and let M be the monoid presented by P. Thus R = {(a n , b n ) : n ∈ N} where there is an algorithm whose n-th output is (a n , b n ). Let e be an element not belonging to M(X), set and let R ′ = {(e n a n , b n ) : n ∈ N} ∪ R 1 .
Obviously < X ∪ {e} | R ′ > is a decidably generated presentation of M , which is finitely generated if P is finitely generated. Let us prove that R ′ is decidable. Let (u, v) be an element of M(X) 2 . Since X is decidable, the same is true for the set R 1 , thus one can decide whether or not (u, v) belongs to R 1 . Let (u, v) do not belong to R 1 . If u is not of the form e m w where w is a word not containing e then (u, v) does not belong to R ′ ; the same if v contains the letter e. Otherwise let us compute (a m , b m ); if w = a m and v = b m then (u, v) belongs to R ′ otherwise it does not.
By the proof of Proposition 2.7 we have the following Corollary 2.8 If a monoid admits a finitely generated and enumerably related presentation then it admits also a presentation which is finitely generated and decidably related.
Proposition 2.7 and Corollary 2.8 are valid also for group presentations.
Proposition 2.9 Let P =< X | R > be a monoid presentation and let M(X) and R be enumerable. Then the set of derivations for P is enumerable.
Proof First we prove that for every k, the set of k-steps derivations is enumerable. Let k = 1; the set of 1-step derivations is enumerable since it is the set of pairs (xay, xby) where x, y ∈ M(X) and (a, b) ∈ R, thus it can be represented as the Cartesian product M(X) 2 × R, which is enumerable since M(X) and R are enumerable. By induction hypothesis the sets of 1-step derivations and of (k−1)-steps derivations are enumerable, thus their Cartesian product is enumerable and there is an algorithm A enumerating it. Then we define an algorithm A k in the following way: let n be a natural number and let (a 0 , a 1 , · · · , a k , b, c) be the n-th output of A, where (a 0 , a 1 , · · · , a k−1 ) is a (k − 1)-steps derivations and (b, c) a 1-step derivation. Then if a k−1 = b, the n-th output of A k is (a 0 , a 1 , · · · , a k , c), otherwise it is an empty output. The algorithm A k enumerates the set of k steps derivations.
The set of derivations of P is the union for all the naturals k of the sets of k steps derivations and by Remark 2.5 is enumerable since each of these is enumerable.
We have seen in Remark 2.5 that if X is enumerable then M(X) too is enumerable. If X and R are enumerable then we can suppose that the algorithms enumerating X and R operate in parallel and that when an element r = x 1 · · · x m ∈ R is outputted with the x i ∈ X, then the elements x 1 , · · · , x m have already been outputted.
The set of relations of P is the set of pairs (a, b) such that there is a derivation from a to b. Therefore if the set of derivations is enumerable also that of relations is enumerable. Thus we have the following Corollary 2.10 Let P =< X | R > be a presentation and let X and R be enumerable; then M(X), the set of derivations and the set of relations of P are enumerable.

Van Kampen diagrams for monoid presentations
Van Kampen diagrams for group presentation are well studied in the literature (see for instance Sec. V.1 of [13], §11 of [18] or Sec. 4 of [3]). In [20], J. H. Remmers defined diagrams for semigroup presentations and generalized to semigroups the well known results about small cancellations presentations (see also [21] and Sec. 5 of [11]).
For full details about the notions treated in this section we refer the reader to 1.7 of [11].
A source in a directed graph is a vertex with no out-edges, a sink is one with no in-edges. If X is a set then an X-labeled graph is a graph with an application from its edges to X. The label of a path is the word on X obtained by the concatenation of the labels of its edges from the first to the last.
In a planar 2-cell complex every edge can belong to at most two faces (we do not consider the unbounded exterior region as a face). The boundary of a planar 2-cell complex is the set of edges which do not belong to two faces, that is they belong to only one face or to no one. These edges are said exterior and a path containing only exterior edges is said an exterior path.
Let P =< X | R > be a monoid presentation. A van Kampen diagram for P is a planar and simply connected X-labeled 2-cell complex C such that 1. C has exactly one source and one sink; 2. either there is a simple cycle going from the source to the sink of C; or there are two exterior paths going from the source to the sink of C whose intersection does not contain any edge belonging to a face; 3. the subgraph constituted by a face of C: either is a simple cycle and if u is its label then (u, 1) is a defining relation; or has exactly one source and one sink and has exactly two simple paths going from the source to the sink and if u and v are the labels of these paths then (u, v) is a defining relation.
We observe that there can be more than one pair of exterior paths in C verifying 2, but we assume that we have fixed one of these pairs. If u and v are the labels of these exterior paths then we say that C is a van Kampen diagram for (u, v).
We have the following result (see The. 3.2 of [21] or The. 1.7.2 of [11]): Theorem 3.1 Let P =< X | R > be a monoid presentation, let u and v be words on X and let k be a natural number. Then there is a k steps derivation from u to v if and only if there is a van Kampen diagram for (u, v) with k faces.
We will prove one direction of the theorem. Let (u, u 1 , · · · , u k ) be a derivation. We show how to associate with it in a standard way a van Kampen diagram in such a way that if k 1 then there are two exterior simple paths going from the source to the sink of C and they are labeled by u and u k .
Let k = 0, that is we have the trivial relation (u, u). In this case if u = x 1 · · · x m , we consider the graph which is a simple path with m edges each labeled by with the arrow indicating the direction of the path. Suppose to have associated a 2-cell complex C with the derivation (u, u 1 , · · · , u k−1 ). Let u k−1 = vaw and u k = vbw with (a, b) a defining relation. By induction hypothesis we can assume that we have fixed an exterior path of C labeled u k−1 going from the source to the sink of C.
Let a = x 1 · · · x m , b = y 1 · · · y n and let F be the following 2-cell complex: Then we associate with the derivation (u, · · · , u k ) the complex obtained by adjoining (see [1]) F to C along the bijection between the exterior paths of F and C labeled by a, that is by "gluing" F and C along these paths.
If a or b are equal to 1, then the source and the sink of F do coincide and the boundary of F is a simple cycle. In particular if a = 1 then F is glued to C along a single vertex; if b = 1 then the two vertices of C which are the initial and the final vertex of the exterior path labeled by a are made to coincide and a new face is created.
Let P =< X | R > be a group presentation and let P ′ be the monoid presentation corresponding to P. Then the van Kampen diagrams for P are as those associated with P ′ but with the following modifications: • we consider only diagrams associated with relations of the form (1, v), that is we consider only derivations whose initial word is u = 1; • there is no face for a defining relation (xx −1 , 1), that is in this case the two edges labeled by x and x −1 are made to coincide and thus identified; • if a defining relation (xx −1 , 1) is applied and the subpaths labeled by x and x −1 to be identified are cycles then the portions of the graph comprised in these cycles are eliminated in order to keep the graph planar.
For further details about van Kampen diagrams for group presentations see the references cited at the beginning of the section.

The Word Problem
Definition 4.1 Let P =< X | R > be a presentation for the monoid M . We say that P has a solvable Word Problem if given u, v ∈ M(X) there exists an algorithm which decides whether the elements of M represented by u and v are equal. This is equivalent to say that the set of relations of P is decidable.
We say that a presentation has a solvable Word Search Problem if it has a solvable Word Problem and for any relation (u, v) there exists an algorithm which finds a derivation from u to v.
The same definition holds for group presentations with M(X) replaced by F(X).
We observe that if P is a group presentation then P has a solvable Word Problem if and only if the same is true for the monoid presentation corresponding to P as in Definition 1.13. Thus all the results which we will prove in the case of monoid presentations hold also for group presentations with the obvious modifications.
Moreover if P is a group presentation for the group G then we have the equality u = v in G if and only if uv −1 = 1 in G, that is the Word Problem is solvable for a group presentation if and only if the set of relators of P is decidable.
We recall that R denotes the congruence generated by R.
Proposition 4.2 Let P =< X | R > be a monoid presentation and let M(X) be enumerable (in particular let X be enumerable). Then the Word Problem for P is solvable if and only if the monoid M(X)/ R is enumerable.
Proof We have that M(X) = {w n : n ∈ N}, where there is an algorithm whose n-th output is w n . Consider the algorithm whose n-th output is the congruence class of w n ; by Definition 2.3 this algorithm enumerates M(X)/ R if and only if we can determine whether two elements of M(X)/ R are equal or not, that is if and only if the Word Problem for P is solvable.
From now on we assume that the set of defining relators of any presentation is symmetric. By Remark 1.3 we have that if P =< X | R > is a presentation for the monoid M and if u, v ∈ M(X), then u = v in M if and only if there is an R-derivation from u to v.

Remark 4.3
Let P =< X | R > be a presentation such that the set of R-derivations is enumerable (in particular let X and R be enumerable, see Corollary 2.10); then the solvability of the Word Problem is equivalent to that of the Word Search Problem. Indeed let (u, v) be a relation; then the algorithm enumerating the R-derivations will give after a finite time an output which is a derivation from u to v.
Anyway the complexity of the Word Search Problem can be much greater than that of the simple Word Problem. Madlener and Otto showed in ( [14], Cor. 6.14) group presentations with Word Problem solvable in polynomial time and with Word Search Problem e arbitrarily hard. Namely for every m 3 they constructed a group G(m) with these properties: the complexity of the Word Problem for G(m) is at most polynomial, that of the Word Search Problem is bounded above by a function in the Grzegorczyk class E m (see Ch. 12 of [5]) but by no function in the Grzegorczyk class E m−1 .
We end this section with a definition of equivalence of functions often used in Combinatorial Group Theory. f (x 1 , · · · , x p ) αg(αx 1 , · · · , αx p ) + α(x 1 + · · · + x p ) for every non-zero natural numbers x 1 , · · · , x p . We say that f and g are equivalent if f g and g f and in this case we write f ≃ g.
Let f, g : R p + → R p + be two functions. We write f s g if there exists a positive constant α such that for every non-zero natural numbers x 1 , · · · , x p . We say that f and g are strongly equivalent if f s g and g s f and in this case we write f ≃ s g. e Madlener and Otto call pseudo-natural algorithm an algorithm for solving the Word Search Problem f a function f : If f g then f s g; if f s g then f g. If f is a function from N p + to R p + then we consider f as defined on R p + by assigning the value f (n 1 , · · · , n p ) to every (x 1 , · · · , x p ) such that x i ∈]n i , n i + 1[ for i = 1, · · · , p.

Derivational length and derivational work
Definition 5.1 Let P =< X | R > be a monoid presentation and let (u, v) be a relation of P. The derivational length of (u, v) is defined as Let P be finitely generated and let n 1 and n 2 be natural numbers; the derivational length of P at (n 1 , n 2 ) is Since we always assume that R is symmetric then dl(v, u) = dl(u, v). Moreover we have that dl(u, u) = 0. By Theorem 3.1 we have that dl(u, v) is the minimal number of faces of a van Kampen diagram for (u, v).
The derivational length was introduced by K. Madlener and F. Otto in ( [14], Sec. 3) with the name of derivational complexity.
Indeed if (u, u 1 , · · · , u k−1 , v) is a k steps derivation then also is a k steps derivation and obviously there is a derivation of length |v| from vv −1 to 1.
Let (a, b) be a 1-step derivation by means of the defining relation (u, v), that is there exist words a 1 , a 2 , b 1 and b 2 such that a = a 1 ua 2 and b = b 1 vb 2 . The work of (a, b) is defined as the work of (u, v). The (derivational) work of a k steps derivation (u 0 , u 1 , · · · , u k ) is defined as Let (u 1 , u 2 ) be a relation. The (derivational) work of (u 1 , u 2 ) is defined as the minimal work of a derivation from u 1 to u 2 . If n 1 and n 2 are natural numbers we define the (derivational) work of P at (n 1 , n 2 ) as The function work has been introduced by J.
We can define the work of a relation in terms of van Kampen diagrams (see Section 3). Indeed the work of a defining relation is equal to the number of edges of the van Kampen diagram associated with it. Let (u 0 , u 1 , · · · , u k ) be a k steps derivation and let C be the van Kampen diagram associated with it; then the work of (u 0 , u 1 , · · · , u k ) is equal to the number of edges of C belonging to a single face plus twice the number of edges of C belonging to two faces.

Remark 5.4
Let h be the minimal length g of elements of R; then for every relation (a, b) we have that hdl(a, b) work(a, b). This implies that hDL Ω.
Let the length of the elements of R be bounded above by a constant h ′ (in particular let R be finite); then work(a, b) h ′ dl(a, b) and Ω h ′ DL, thus hDL Ω h ′ DL; therefore in this case DL and Ω are strongly equivalent (Definition 4.4). In particular if all the elements of R have the same length and if h is this length then work(a, b) = hdl(a, b) and Ω = hDL.
Remark 5.5 Let P :=< X | R > be a group presentation and let P ′ be the monoid presentation corresponding to P (Definition 1.13). In ( [15], Def. 3.1), Madlener and Otto have introduced a function, which we call strong derivational length and denote sdl, in the following way: Then sdl is extended to the whole set of relations in the same way as this is done for the function work.
It is easy to see that for every relation (a, b) we have the following inequality Analogously we define for natural numbers n 1 , n 2 and by the preceding inequality we have that With the same argument of Proposition 5.11 one proves that P has a solvable Word Problem if and only if SDL is computable.
Problem 5.6 Find an upper bound for Ω in function of SDL.
Given a non-negative rational number n we denote by ⌊n⌋ the integer part of n, that is the biggest natural number less or equal to n.
Exercise 5.7 Prove that DL(m, n) = ⌊m/2⌋+⌊n/2⌋ for the standard monoid presentation of a free group, that is for the presentation < X ∪ X −1 | F > where F is as in Definition 1.11. Exercise 5.8 Let CM(X) be the free commutative monoid on X and consider the presentation given in Definition 1.14. Let m, n be natural numbers such that m n. Prove that: By Remark 5.4 we have that Ω = 2DL for the presentation of Exercise 5.7 and Ω = 4DL for that of Exercise 5.8. Proposition 5.9 Let P :=< X | R > be a monoid presentation, let u be a word on X and let k be a natural number.
1. If P is finitely generated decidable then the set of derivations from u of work equal to k is finite and effectively computable; 2. if P is finitely related then the set of k steps derivations from u is finite and effectively computable.
Proof 1. Let X be finite and R decidable. Let h k, let n min{|u|, h} and find all the subwords of u of length n. If a is any of these subwords, consider all the words on X of length up to k − |a|; if b is any of these words decide whether (a, b) is a defining relation. In the affirmative case consider the 1-step derivation from u by means of (a, b). All the 1-step derivations from u of work up to k are obtained this way; moreover since X is finite, the number of these words b is finite and effectively computable.
If v is a word obtained from u by a derivation of work k, then there exist words u 0 = u, u 1 , · · · , u m = v such that (u i , u i+1 ) is a 1-step derivation of work k i and k 1 + · · · + k m = k. Since these derivations can be all obtained with the procedure described above, then the set of derivations from u of work equal to k is finite and effectively computable.
2. Let P be finitely related and let q = |R|; it is sufficient to prove that the set of 1-step derivations from u is finite and effectively computable. For every (a, b) ∈ R, check whether a is a subword of u and for any of these cases apply the relation (a, b) to u. There are thus at most q|u| words to compute and this proves the claim.
Lemma 5.10 Let P be an enumerably related monoid presentation with solvable Word Problem and let DL and Ω be its derivational length and work. If P is finitely generated then DL and Ω are bounded above by computable functions; if P is finitely generated decidable then Ω is computable; if P is finite then DL is computable.
Proof Since the set of generators and that of defining relators are enumerable, then by Remark 4.3 the solvability of the Word Problem implies that of the Word Search Problem. Let P be finitely generated and let n 1 and n 2 be naturals; then the number of pairs of words of length bounded by n 1 and n 2 respectively is finite. For any of these pairs of words we solve the Word Search Problem; this gives for any relation (u 1 , u 2 ) with |u 1 | n 1 and |u 2 | n 2 an upper bound f (u 1 ,u 2 ) for dl(u 1 , u 2 ) and an upper bound g (u 1 ,u 2 ) for work(u 1 , u 2 ). We can compute in a finite time the maxima of these bounds which are thus upper bounds for DL(n 1 , n 2 ) and Ω(n 1 , n 2 ).
Let P be finitely generated decidable, let n 1 and n 2 be natural numbers and let (u 1 , u 2 ) be a relation with |u 1 | n 1 and |u 2 | n 2 . By 1 of Proposition 5.9, for any k = 1, · · · , g (u 1 ,u 2 ) the derivations from u of work equal to k are finitely many and effectively computable. For at least one of these k's, the word v belongs to the set of derivations from u of work equal to k and the minimal k for which this happens is equal to the derivational work from u to v. Therefore we can compute Ω in a finite time and thus Ω is computable.
Let P be finite; then the proof that DL is computable is the same as the preceding case with the difference that by 1 of Proposition 5.9, for any k = 1, · · · , f (u 1 ,u 2 ) the k steps derivations from u are finitely many and effectively computable.
A converse of Lemma 5.10 holds: Proof We give the proof for 1, that for 2 being analogous. By Lemma 5.10, if the Word Problem is solvable for P then Ω is computable which implies trivially that Ω is bounded above by a computable function. We have to prove that if Ω is bounded above by a computable function then the Word Problem is solvable.
Let f : N 2 → N be a computable function such that Ω(n 1 , n 2 ) f (n 1 , n 2 ) and let u 1 , u 2 be words such that |u 1 | n 1 and |u 2 | n 2 . We have that (u 1 , u 2 ) is a relation if and only if there exists a derivation from u 1 to u 2 of work less or equal to f (n 1 , n 2 ). By 1 of Proposition 5.9 these derivations can be computed in a finite time, thus one can decide whether (u 1 , u 2 ) is a relation. This solves the Word Problem.

The Word Problem for group presentations
We recall that ρ denotes the reduced form (Definition 1.12). Definition 6.1 Let < X | R > be a group presentation, let N be the normal subgroup of F(X) normally generated by R and let w ∈ N . The area of w is defined as area(w) = min{k ∈ N : ρ(a 1 r 1 a −1 1 · · · a k r k a −1 k ) = w, a i ∈ F(X), r i ∈ R}.
The area of a relator was introduced by M. Gromov in ( [9], Sec. 2.3). Given a relator w, its area is equal to the minimal number of faces of van Kampen diagrams for w. Given a van Kampen diagram, we define its work as the number of edges belonging to a single face plus twice the number of edges belonging to two faces. Then the group work of w is the minimal work of a van Kampen diagram for w. Remark 6.2 Let P := X | R be a group presentation, let w be a relator of P and let r 1 , · · · , r k be defining relators and a 1 , · · · , a k be words such that w is the reduced form of Let c be the maximal length of r 1 , · · · , r k and let |w| = n. By using the properties of the associated van Kampen diagram one can prove that there exist words b 1 , · · · , b k such that |b i | ck + n and w is the reduced form of that is we can choose the conjugating elements of length no more than ck+n. See Prop. 2.2 of [7] or The. 1.1 and 2.2 of [22] for a proof of this fact h (see also Lem. 7.1 of [19]). Definition 6.3 Let P be a finitely generated group presentation and let n be a natural number; the Dehn function of P at n is ∆(n) := max{area(w) : w is a relator and |w| n}.
The group work of P at n is Ω g (n) = max{gwork(w) : w is a relator and |w| n}.
In [8], R. I. Grigorchuk and S. V. Ivanov have defined a function f 1 from N to N in the following way: if n is a natural number then f 1 (n) is the minimal number of edges of van Kampen diagrams for relators of P of length less or equal to n. Exercise 6.4 Prove that f 1 is equivalent (Definition 4.4) to Ω g . Remark 6.5 In the same way as shown in Remark 5.4 we have that if h is the minimal length of elements of R then for every relator w we have that h area(w) gwork(w), thus h∆ Ω g ; and if the length of the elements of R is bounded above by a constant h ′ (in particular if R is finite) then area(w) h ′ gwork(w) and Ω g h ′ ∆, thus h∆ Ω g h ′ ∆.
Therefore in this case ∆ and Ω g are strongly equivalent (Definition 4.4).
Exercise 6.6 Let FA(X) be the free abelian group on X and consider the presentation given in Definition 1.14. Prove that: By Remark 6.5 we have that Ω g = 4∆ for the presentation of Exercise 6.6. Remark 6.7 Let P =< X | R > be a group presentation and let us consider the monoid presentation corresponding to P (Definition 1.13). Let u and v be non-necessarily reduced words on X ∪ X −1 such that (u, v) is a 1-step derivation. Thus either v is obtained from u by means of a cancellation or by the application of a relation (r, 1) where r ∈ R. In the first case ρ(u) = ρ(v), in the second there exists a word a such that ρ(v) = ρ(ara −1 u), thus ρ(u) = ρ(ar −1 a −1 v). This implies that if v is obtained from u by a derivation of length k, then there exists h ∈ {0, 1, · · · , k} and there exist words a 1 , · · · , a h and r 1 , · · · , r h ∈ R such that ρ(v) = ρ(a 1 r 1 a −1 1 · · · a h r h a −1 h u). Let u = 1, that is v is a relator; if k is the derivational length of (1, v), then there exists an expression of v as product of h k conjugates of defining relators, that is the area of v is less or equal to the derivational length from 1 to v. In formula, area(v) dl(v, 1) and thus ∆(n) DL(n, 0) for every natural n.
In the same way one proves that gwork(v) work(v, 1) and Ω g (n) Ω(n, 0). Proposition 6.8 Let P := X | R be a group presentation, let ∆ and Ω g be the Dehn function and the group work of P and let DL and Ω be the be the derivational length and work of the monoid presentation corresponding to P. Let n be a natural number; we have that 1. Ω g (n) Ω(n, 0) 4Ω 3 g (n) + Ω 2 g (n) + (4n + 1)Ω g (n) − n; 2. let the length of the elements of R be bounded above by a natural c (in particular let P be finitely related); then ∆(n) DL(n, 0) 2c∆ 2 (n) + 2n + c 2 + 1 ∆(n) − n 2 and Ω g (n) Ω(n, 0) 4c Ω 2 g (n) + (4n + c + 1)Ω g (n) − n.
Proof The inequalities ∆(n) DL(n, 0) and Ω g (n) Ω(n, 0) have been proved in Remark 6.7. First we prove 1 and the second inequality of 2.
Let w be a relator of length n and set h = gwork(w). Let w = ρ(a 1 r 1 a −1 1 · · · a k r k a −1 k ) with |r 1 | + · · · + |r k | = h. Let p = max{|r 1 |, · · · , |r k |}; by Remark 6.2 there exist words b 1 , · · · , b k such that |b i | pk + n and w is the reduced form of We show that in the monoid presentation corresponding to P there exists a derivation from 1 to w of work less or equal to 4h 3 + h 2 + (4n + 1)h − n for the inequality of 1 and of work less or equal to 4ch 2 + (4n + c + 1)h − n for the second inequality of 2.
Since |b i | pk + n for i = 1, · · · , k, then there is a derivation from 1 to b 1 b −1 1 · · · b k b −1 k of work less or equal to 2(pk + n)k, thus there is a derivation from 1 to u of work less or equal h + 2(pk + n)k = h + 2pk 2 + 2nk.
We have that w is the reduced form of u, thus there is a derivation from u to w consisting only in cancellations, that is of work |u| − |w| 2pk 2 + (2n + p)k − n.
Since p h then we have that (1) is less or equal to 4h 3 +h 2 +(4n+1)h−n and this proves 1.
Let the length of the elements of R be bounded above by a natural c; then this implies that p c and then that (1) is less or equal to 4ch 2 + (4n + c + 1)h − n and this proves the second inequality of 2.
For the first inequality of 2 the procedure is analogous with the following modifications. We take k as area(w); the derivation from 1 to u has length less or equal pk 2 + (n + 1)k; there is a derivation from u to w consisting only in cancellations and of length less or equal to |u| − |w| 2 pk 2 + n + p 2 k − n 2 .
Problem 6.9 Find better bounds than those given in Proposition 6.8 for DL(n, 0) in function of ∆(n) and for Ω(n, 0) in function of Ω g (n); or prove that the latter are optimal by finding group presentations in which these bounds are attained.
We have the following Proposition 6.10 Let P :=< X | R > be a group presentation and let n and k be natural numbers.
1. If P is finitely generated decidable then the set of relators of length and group work equal to n and k respectively is finite and effectively computable; 2. if P is finite then the set of relators of length and area equal to n and k respectively is finite and effectively computable.
Proof 1. Let w be a relator of length and group work equal to n and k respectively; then w is the reduced form of a product of at most k conjugates of defining relators the sum of whose lengths is equal to k. Since P is finitely generated then the words of length up to k are finitely many; since P is decidably related then one can decide which of these words are defining relators. In particular since none of these has length more than k, then by Remark 6.2 we have that the conjugating elements can be chosen of length no more than k 2 + n, that is we can find all the relators of length and work equal to n and k in a finite time.
2. Let c be the maximal length of defining relators; then a relator of area and length equal to k and n respectively is the reduced form of a product of k conjugates of defining relators with the length of any conjugating element bounded above by ck + n by Remark 6.2. Thus all the relators of length and area equal to n and k can be found in a finite time.
The proofs of the next two propositions are analogous to those of Lemma 5.10 and Proposition 5.11. Lemma 6.11 Let P be an enumerably related group presentation with solvable Word Problem and let ∆ and Ω g be its Dehn function and group work. If P is finitely generated then ∆ and Ω g are bounded above by computable functions; if P is finitely generated decidable then Ω g is computable; if P is finite then ∆ is computable.

The Conjugacy Problem
Definition 7.1 Let M be a monoid and let a, b ∈ M ; we say that a is conjugated to b if there exists t ∈ M such that ta = bt.
The conjugacy is a reflexive and transitive relation; it is also symmetric if M is a group. Definition 7.2 Let P =< X | R > be a presentation for a monoid M . We say that P has a solvable Conjugacy Problem if given a, b ∈ M(X) there exists an algorithm which determines whether the element of M determined by a is conjugated to that determined by b, that is whether or not there exists a word t ∈ M(X) such that (ta, bt) is a relation for P. This is equivalent to say that the set is decidable. We say that P has a solvable Conjugacy Search Problem if it has a solvable Conjugacy Problem and if there exists an algorithm which finds a conjugating word t. Remark 7.3 Let P =< X | R > be a presentation for a monoid M and let the Conjugacy Problem be solvable. If M is a group then also the Word Problem is solvable since a word on X is equal to 1 in M if and only if it is conjugated to 1. If M is not a group then the Word Problem is not necessarily solvable since there can be an algorithm which, given two words a and b, decides whether a is conjugated to b but not if a = b in M . Problem 7.4 Find a presentation with solvable Conjugacy Problem but unsolvable Word Problem or prove that the solvability of the Conjugacy Problem implies that of the Word Problem. Remark 7.5 Let R be the set of relations of P. If M(X) and R are enumerable (in particular if X and R are enumerable, see Corollary 2.10), then the set (2) is enumerable. This is because in this case the set M(X) 3 × R is enumerable and thus is equal to a set of the form {α n = (a n , b n , t n , u n , v n ) : n ∈ N, a n , b n , t n ∈ M(X), where there is an algorithm whose n-th output is α n . Consider the algorithm whose n-th output is (a n , b n ) if t n a n = u n and b n t n = v n , otherwise the output is empty; this algorithm enumerates (2). Remark 7.6 Let P =< X | R > be a presentation such that M(X) and R are enumerable. Then the solvability of the Conjugacy Problem is equivalent to that of the Conjugacy Search Problem. Indeed where there is an algorithm whose n-th output is β n . Let a be conjugated to b; let us consider the algorithm whose n-th output is t n if u n = t n a and v n = bt n , otherwise the output is empty. Then for some n the output will be non-empty and t n will be a conjugating word.
We have seen in Remark 4.3 that the complexity of the Word Search Problem can be much greater than that of the Word Problem. It would be interesting to give an answer to the analogous problem for the Conjugacy Problem.
Problem 7.7 Find a presentation whose Conjugacy Search Problem has a complexity greater than that of the Conjugacy Problem; or prove that the two complexities are equal for any presentation.
Definition 7.8 Let M be a monoid, let X be a generating set for M and let a 1 , a 2 ∈ M(X) be such that the element of M determined by a 1 is conjugated to that determined by a 2 . We set γ(a 1 , a 2 ) := min{|t| : t ∈ M(X) and ta 1 = a 2 t in M }.
The functions γ and Γ depend on the generating set X. If n ′ 1 n 1 and n ′ 2 n 2 then Γ(n ′ 1 , n ′ 2 ) Γ(n 1 , n 2 ). We have seen that if M is a group then the conjugacy is a symmetric relation, thus γ and Γ are symmetric functions. If M is not a group then this is not true anymore, that is there can be two elements a 1 and a 2 such that a 1 is conjugated to a 2 but a 2 is not conjugated to a 1 . Or it may happen that a 1 and a 2 are conjugated one to the other but γ(a 1 , a 2 ) = γ(a 2 , a 1 ). Thus Γ(n 2 , n 1 ) is not necessarily equal to Γ(n 1 , n 2 ). Definition 7.9 Let P =< X | R > be a monoid presentation; the function Γ relative to P is the function Γ with respect to X for the monoid presented by P. Part 1 of Exercise 7.11 is a solution of the Conjugacy Problem for the free monoid.

Problem 7.12
1. Find an example in which a 1 is conjugated to a 2 but not the contrary.
2. Find a monoid M and two natural numbers n 1 and n 2 such that Γ(n 2 , n 1 ) = Γ(n 1 , n 2 ). Or prove that some or all of the preceding points are impossible.
Let M be a cancellative monoid, that is for every a, b, t ∈ M if ta = tb or at = bt then a = b. Any group is a cancellative monoid. Let M be generated by a set X, let a be a word on X such that the element of M represented by a is central. If b is another word on X then a is conjugated to b if and only if a and b determine the same element of M ; in this case γ(a, b) = 0. Thus if M is a commutative cancellative monoid then Γ is equal to the zero function. The converse is also true, that is a commutative monoid is cancellative if and only if Γ = 0. If M is a group then it is also true that M is abelian if and only if Γ = 0. These results hold with respect to every generating set of M .
If M is a finite monoid then Γ is bounded. Indeed if X is a generating set for M and if h is the maximal length of elements of M then Γ is eventually equal to a constant less or equal to h.
On the other side, let M be generated by a finite set X and let Γ be bounded; then this implies that there exists a finite subset {t 1 , · · · , t n } of M such that for every a, b ∈ M such that a is conjugated to b there exists i = 1, · · · , n such that t i a = bt i . Problem 7.13 Find a finitely generated infinite non-commutative cancellative monoid whose function Γ (with respect to a finite generating set) is bounded; or prove that a commutative monoid for which Γ is bounded is finite or cancellative. Solve the same problem for groups instead that for cancellative monoids or prove that a group whose function Γ is bounded is finite or abelian.
Definition 7.14 Let F(X) be the free group on X and let u ∈ F(X), that is u is a reduced word on X ∪ X −1 . We say that u is cyclically reduced if the first and the last letters of u are not inverse one of the other. If u is a reduced word which is not cyclically reduced then there exist unique reduced words a and u ′ such that u ′ is cyclically reduced and u = au ′ a −1 . The word u ′ is called the cyclically reduced form of u.
Definition 7.15 Let G be a group and let X be a subset of G which generates G as a group. Let u, v ∈ F(X); then u and v are conjugated in G if and only if their cyclically reduced forms are conjugated. Let a 1 , a 2 be cyclically reduced words in F(X) which are conjugated in G; then we set γ 0 (a 1 , a 2 ) := min{|t| : t ∈ F(X) and ta 1 = a 2 t in G}.
The Conjugacy Problem for F(X) is solvable; indeed by The. 1.3 of [16] we have that two cyclically reduced words are conjugated in F(X) if and only if they are cyclic conjugates.
We recall that the functions γ and Γ are symmetric for a group.
Proposition 7.17 Let P =< X | R > be a finitely generated presentation with solvable Word Problem and whose set of relations is enumerable (in particular let R be enumerable). P has a solvable Conjugacy Problem if and only if Γ is bounded above by a computable function. In this case Γ is computable.
Proof Let M be the monoid presented by P.
1. Let Γ(n 1 , n 2 ) f (n 1 , n 2 ) where f (n 1 , n 2 ) is computable. Since P is finitely generated, then for any naturals n 1 and n 2 the number of pairs of words (a 1 , a 2 ) such that |a 1 | n 1 and |a 2 | n 2 is finite. Let a 1 , a 2 be words such that |a 1 | n 1 and |a 2 | n 2 ; a 1 is conjugated to a 2 if and only there exists a word t of length no more than f (n 1 , n 2 ) such that (ta 1 , a 2 t) is a relation.
Let us solve the Word Problem for all the pairs of the form (ta 1 , a 2 t) where |t| f (n 1 , n 2 ); this solves the Conjugacy Problem for (a 1 , a 2 ). Moreover if a 1 is conjugated to a 2 then the minimal length of a conjugating word is equal to γ(a 1 , a 2 ) and thus Γ(n 1 , n 2 ) is computable since it is the maximum of the γ(a 1 , a 2 ).
2. Let P be have a solvable Conjugacy Problem. Since the set of relation of P is enumerable then by Remark 7.6, P has a solvable Conjugacy Search Problem. Let n 1 , n 2 be natural numbers; since P is finitely generated, then the number of pairs of words (a 1 , a 2 ) such that |a 1 | n 1 and |a 2 | n 2 is finite. Let us solve the Conjugacy Search Problem for these pairs of words; this gives for any (a 1 , a 2 ) such that a 1 is conjugated to a 2 an upper bound for γ(a 1 , a 2 ). The maximum of these bounds is an upper bound for Γ(n 1 , n 2 ) which is then bounded above by a computable function.
Corollary 7.18 Let P be a finitely generated presentation whose set of relators is enumerable and suppose that P presents a group. Then P has a solvable Conjugacy Problem if and only if P has a solvable Word Problem and Γ is computable.

The Membership Problem
Definition 8.1 Let P =< X | R > be a presentation for a monoid M and let A be a subset of M(X). We say that P has has a solvable Membership Problem on A if given w ∈ M(X) there exists an algorithm which determines whether the element of M represented by w belongs to the submonoid of M generated by A, that is whether there exist elements a 1 , · · · , a m ∈ A such that (w, a 1 · · · a m ) is a relation for P. This is equivalent to say that the set {(w, a 1 , · · · , a m ) : w ∈ M(X), a i ∈ A and w = a 1 · · · a m in M } is decidable. We say that P has a solvable Membership Search Problem on A if it has a solvable Membership Problem on A and if there exists an algorithm which finds elements a 1 , · · · , a m of A such that w = a 1 · · · a m in M .
The Membership Problem is also called generalized word problem or uniform word problem.
If P presents a group then the solvability of the Membership Problem on A = {1} is equivalent to that of the Word Problem. We refer the reader to the introduction of [17] for a list of groups for which the Membership Problem is known to be solvable or not.

Remark 8.3
If M(X), R and A are enumerable, then the set (3) is enumerable. Indeed in this case the Cartesian product of M(X), R and the set of finite sequences of elements of A is enumerable, that is it is equal to {α n = (w n , a 1 , · · · , a kn , u n , v n ) : n ∈ N, w n ∈ M(X), a i ∈ A, (u n , v n ) ∈ R }, where there is an algorithm whose n-th output is α n . Consider the algorithm whose n-th output is (w n , a 1 , · · · , a kn ) if w n = u n and v n = a 1 · · · a kn , otherwise the output is empty; this algorithm enumerates (3).

Remark 8.4
If A and R are enumerable, then the solvability of the Membership Problem on A is equivalent to that of the Membership Search Problem on A. Indeed the Cartesian product of R and the set of finite sequences of elements of A is enumerable and thus is equal to where there is an algorithm whose n-th output is β n . Let w belong to the submonoid generated by A and consider the algorithm whose n-th output is (a 1 , · · · , a kn ) if w = u n and a 1 · · · a kn = v n , otherwise the output is empty. Then necessarily for some n the output will be non-empty. Problem 8.5 Find a presentation whose Membership Search Problem on a some set A has a complexity greater than that of the Membership Problem on A; or prove that the two complexities are equal for any presentation and any set A. Definition 8.6 Let P =< X | R > be a presentation for the monoid M , let A be a subset of M(X), let T be the submonoid of M generated by A and let t ∈ T . Then there exist a 1 , · · · , a m ∈ A such that t = a 1 · · · a m . The least of such m is called the length of t in A and denoted length A (t).
Let n be a natural number: the distortion at n of P relative to A is t ∈ M(X), |t| n, t = a 1 · · · a m in M for some a 1 , · · · , a m ∈ A}.
This definition of distortion function is due B. Farb ([6], Sec. 2). A slightly different notion of distortion was previously been given by Gromov We also observe that if A is finite then there exists a finite subset B ′ of B such that T is generated by B ′ . Indeed for any a ∈ A there exist b 1 , · · · , b n elements of B such that a is a monomial in b 1 , · · · , b n . Then the subset of B whose elements are these b i for all the a ∈ A is a finite subset of B and generates T since A does. Lemma 8.8 Let P =< X | R > be a presentation for a monoid M , let A be a finite subset of M(X) and suppose that given a word on X and one on A it is decidable whether these two words are equal in M (in particular let the Word Problem be solvable for P). If Dist A is bounded above by a computable function then P has a solvable Membership Problem; if moreover P is finitely generated then Dist A is computable.
Proof Let T be the submonoid of M generated by A, let Dist A (n) f (n) where f (n) is a computable function, let u be a word on X and let m = |u|.
Then u belongs to T if and only there exist a 1 , · · · , a k ∈ A with k f (m) such that u = a 1 · · · a k in M . Thus one can decide whether u belongs to T by deciding whether u = a 1 · · · a k in M for all a 1 , · · · , a k ∈ A and k f (m). Since A is finite and f is computable then this is done in finite time.
Let P be finitely generated. Then for every natural n there are finitely many words on X of length n. Let u be one of these words and decide Thus length A is computable and therefore Dist A is computable. Proposition 8.9 Let P =< X | R > be a finitely generated presentation for a monoid M and let the set of relations of P be enumerable. Let A be a finite subset of M(X) and suppose that given a word on X and one on A it is decidable whether these two words are equal in M (in particular let the Word Problem be solvable for P). Then P has a solvable Membership Problem on A if and only if Dist A is computable.
Proof Let T be the submonoid of M generated by A. By Lemma 8.8 we have that if Dist A is computable then the Membership Problem on A is solvable.
Let P have a solvable Membership Problem; by Remark 8.4, P has a solvable Membership Search Problem. Let n be a natural number; since P is finitely generated, then the number of words of length bounded above by n is finite. If u is one of these words solve the Membership Search Problem on u. If u belongs to T then this gives an expression of u as monomial on A and thus it gives an upper bound for langth A (u). The maximum of these bounds is an upper bound for Dist A which is then bounded above by a computable function. With the same argument of the proof of Lemma 8.8 one proves that Dist A is computable.
The first proof of Proposition 8.9 has been given in ( [17], Prop. 1.1), but earlier a slightly less general statement has been proved in ( [6], Prop. 2.1).

Tietze transformations
Definition 9.1 Let P =< X | R > be a monoid presentation and let us consider the following transformations on P which consist in adding or deleting "superfluous" generators and defining relations. They are called Tietze transformations: 3. Let U ⊂ M(X) and for every u ∈ U let y u be an element not belonging to M(X) and such that if u and u ′ are distinct elements of U then 4. Let Y ⊂ X and suppose that for every y ∈ Y there exists a word u y not containing z for every z ∈ Y and such that (y, u y ) ∈ R. Let ϕ be the homomorphism from M(X) to M(X \Y ) which sends any y ∈ Y to u y and any x ∈ X \ Y to itself. Then set T : Let P =< X | R > be a group presentation and let us denote by R the set of relators of P, that is the normal subgroup of F(X) normally generated by R. The Tietze transformations for a group presentation are defined in the same way but with the following modifications: in 1 and 2 replace R and R \ Q with R and R \ Q respectively i . In 3, U ⊂ F(X), y u is an element not belonging to F(X) and T := {y −1 u u : u ∈ U }. In 4, for every y ∈ Y there exists a word u y not containing neither z nor z −1 for every z ∈ Y and such that y −1 u y ∈ R; ϕ is the homomorphism from F(X) to F(X \ Y ) which sends any y ∈ Y to u y and any x ∈ X \ Y to itself; finally we replace R with ϕ(R \ T ).
The transformations 1 and 2 add or delete respectively superfluous defining relations; transformation 3 and 4 add or delete superfluous generators and defining relations. Transformations of types 1 and 2 are inverse one of the other; the inverse of a transformations of type 3 is a transformation of type 4. The inverse of a transformations of type 4 is a transformation of type 3, followed by one of type 1 and by one of type 2; this is because first we have to add Y to the generators and T to the defining relators obtaining < X | T ∪ V >, then add R and finally delete V from the set of defining relations.
We say that two presentations are of the same kind if they are both monoid or group presentations.
It is obvious that by applying Tietze transformations to a presentation we obtain a presentation for the same monoid. The converse is also true, that is if P and P ′ are presentations of the same kind for the same monoid then there exists a finite sequence of Tietze transformations which applied to P gives P ′ (see j Th. 1.5 of [16]). In fact by the proof of Th. 1.5 of [16] we have the following stronger result: Proposition 9.2 Two presentations of the same kind for the same monoid can be obtained one from the other by applications of at most four Tietze transformations, namely a transformation of type 3 followed by one of type 1, then by one of type 2 and finally by one of type 4 (some of these transformations can be empty). Definition 9.3 A Tietze transformation is said finite if it adds or deletes only finitely many generators or defining relations, that is if the sets Q, T and Y of Definition 9.1 are finite k . In the same way a Tietze transformation is said decidable if the sets Q, T and Y are decidable.
By l Cor. 1.5 of [16] we have that two finite [respectively decidable] presentations of the same kind define the same monoid if and only if one can be obtained from the other by repeated applications of finite [respectively decidable] Tietze transformations. Moreover Proposition 9.2 holds also in the special cases of finite or decidable presentations, that is two finite or decidable presentations of the same kind for the same monoid can be obtained one from the other by applications of at most four Tietze transformations of the types specified in Proposition 9.2.
Let us consider a graph whose vertices are all the monoid presentations and with an edge joining two presentations if one can be obtained from the other by application of a Tietze transformation; any connected component of this graph corresponds to an isomorphism class of monoids. Furthermore by Proposition 9.2, two vertices are either non-connected or they are connected by a path of length at most four.
Moreover let M be a monoid and let P and P ′ be two finite monoid presentations of M . Then there is a path (of length at most four) from P to P ′ whose edges are finite [respectively decidable] Tietze transformations.
The same thing can be said if we take as vertices of the graph all the group presentations.
Definition 9. 4 We say that a Tietze transformation of type 1 or 2 is of bounded derivation if it adds or deletes a set of relations whose derivational length is bounded, that is if sup{dl(q) : q ∈ Q} is finite where Q is as in 1 and 2 of Definition 9.1. Analogously we define Tietze transformations of type 1 or 2 of bounded work, of bounded area and of of bounded group work by replacing dl by work, area and gwork respectively m . k In the literature an elementary Tietze transformation is defined as a Tietze transformation which adds or deletes exactly one generator and/or defining relation. An elementary Tietze transformation is obviously finite and any finite Tietze transformation is obtained by repeated applications of elementary Tietze transformations.
l The proof of Cor. 1.5 of [16] is given for elementary Tietze transformations but the same argument holds also for finite and decidable Tietze transformations m of course if we talk about Tietze transformations of bounded derivation or work then this means that we are dealing with a monoid presentation, while for Tietze transforma-We say that a Tietze transformation of type 3 or 4 is of bounded length if it adds or deletes a set of generators whose length is bounded, that is if sup{|u| : u ∈ U } or sup{|u y | : y ∈ Y } (respectively for 3 or 4 of Definition 9.1) are finite.
A Tietze transformation of bounded derivation, work, area or group work is said a bounded Tietze transformation.
A finite Tietze transformation is necessarily bounded. If the presentation is finitely generated then any Tietze transformation of bounded length is necessarily finite. But if the presentation is finitely related then a Tietze transformation of bounded derivation, work, area or group work needs not be finite.
Remark 9.5 Let P be a presentation and let P ′ be the presentation obtained from P by application of a bounded Tietze transformation. We want to determine the relationship between the derivational length, the work, the area, the group work and the length of group elements in P and P ′ .
Suppose that P ′ is obtained from P by application of a Tietze transformation of type 1 of bounded derivation and let c be the maximal derivational length of defining relations added. Let dl and DL the functions "derivational length" relative to P (see Definition 5.1) and let dl ′ and DL ′ those relative to P ′ . Then we have for a relation (u, v) that and then that DL ′ DL c DL ′ .
In the same way one proves that if P ′ is obtained from P by application of a Tietze transformation of type 1 of work, area or group work bounded by a constant c then Ω ′ Ω c Ω ′ , and where Ω, ∆ and Ω g are the function "work", the Dehn function and the function "group work" relative to P and Ω ′ , ∆ ′ and Ω ′ g those relative to P ′ . Let us now suppose that P ′ is obtained from P by application of a Tietze transformation of type 3 of bounded length. We will use the notation of 3 of Definition 9.1. There exists a natural number c such that |u| c for every u ∈ U . Let ϕ be the function from M(X ∪ Y ) to M(X) sending any element of X to itself and any y u ∈ Y to u. We have that ϕ is the identity tions of bounded area or group work the presentation is a group presentation on M(X), in particular (ϕ(u), ϕ(v)) = (u, v) for every (u, v) ∈ R, and that (ϕ(y u ), ϕ(u)) = (u, u) for every (u, y u ) ∈ T . Moreover |ϕ(w)| c|w|.
If R and R∪T are the congruences of M(X) and M(X ∪Y ) generated by R and R ∪ T respectively, then we have that R ⊂ R ∪ T and that Let (a, b) be a 1-step derivation by means of (u, v) Let (u, v) be an R ∪ T -relation and let (u = u 0 , u 1 , · · · , u k−1 , v = u k ) be an R ∪ T -derivation where k = dl ′ (u, v). Then there is an R-derivation from ϕ(u) to ϕ(v) of length at most k, that is If (u, v) is an R-relation then since (ϕ(u), ϕ(v)) = (u, v) and since obviously dl ′ (u, v) dl(u, v) then dl(u, v) = dl ′ (u, v). In particular we have that Let (u, v) be an R ∪ T -relation but not an R-relation. There exist R ∪ Tderivations from u to ϕ(u) and from v to ϕ(v) of lengths at most |u| and |v|. Since there is an R-derivation from ϕ(u) to ϕ(v) of length dl(ϕ(u), ϕ(v)), this gives an (R∪T )-derivation from u to v of length dl(ϕ(u), ϕ(v)) +|u|+|v|, that is dl ′ (u, v) dl(ϕ(u), ϕ(v)) + |u| + |v| and then since |ϕ(u)| c|u| and |ϕ(v)| c|v| we have that DL ′ (m, n) DL(cm, cn) + m + n, that is DL(m, n) DL ′ (m, n) DL(cm, cn) + m + n.
With an analogous argument one proves that Ω(m, n) Ω ′ (m, n) Ω(cm, cn) + (c + 1)(m + n), ∆(n) ∆ ′ (n) ∆(cn) + n and Ω g (n) Ω ′ g (n) Ω g (cn) + (c + 1)n. Let us now determine the relationship between the length of elements in P and P ′ . If M is the monoid presented by P and P ′ and if a is any element of M then |a| ′ |a| c|a| ′ where | · | and | · | ′ denote respectively the lengths with respect to the sets of generators of P and P ′ respectively. Remark 9.6 Let P :=< X | R > be a presentation such that X and R are enumerable and let P ′ be the presentation obtained from P by adding to R all the relations of P, that is P ′ =< X | R >.
The set of defining relations of P ′ is not finite, is enumerable and is decidable if and only if the Word Problem is solvable for P. Moreover there exist natural numbers m 0 and n 0 such that DL(m, n) = 1 and Ω(m, n) = m + n for every m m 0 and n n 0 (if m < m 0 and/or n < n 0 then either DL(m, n) = 1 and Ω(m, n) = m + n or DL(m, n) = Ω(m, n) = 0). Proposition 9.7 Let P and P ′ be presentations such that P ′ is obtained from P by applications of Tietze transformations of bounded derivation or length (in particular, let P and P ′ be finite presentations for the same monoid). Then the derivational lengths for P and P ′ are equivalent.
Proof By (4) and (5), we have that by applying a Tietze transformation of type 1 or 3, the equivalence class of the derivational length does not change. This is also true by applying a Tietze transformation of type 2 because its inverse is a transformation of type 1; and is true also for a Tietze transformation of type 4 since its inverse is a transformation of type 3 followed by one of type 1 and by one of type 2.
Remark 9.8 Let P ′ be obtained from P by applications of Tietze transformations of bounded length and bounded work, area or group work. Then the work, the Dehn function or the group work of P and P ′ respectively are equivalent. The proof is analogous to that of Proposition 9.7.
We observe that Grigorchuk and Ivanov have proved ( [8], The. 1.6) that the group work is invariant up to equivalence under some transformations called T-transformations and stabilizations. We have improved their result since the latter are special cases of Tietze transformations of bounded group work. Remark 9.9 If P ′ is obtained from P by applying non-bounded Tietze transformations then DL and DL ′ are in general non-equivalent. For instance if P and P ′ are as in Remark 9.6, then DL and DL ′ are equivalent if and only if DL is equivalent to a constant function. In particular if P is a finite presentation with unsolvable Word Problem then DL is greater than any computable function while DL ′ is constant. This shows that if in Proposition 9.7 we remove the hypothesis of boundedness for the Tietze transformations applied to a presentation, then the derivational lengths of two presentations of the same kind for the same monoid can be not related at all.
This shows also that a decidable Tietze transformation needs not be of bounded derivation (or bounded work, or bounded area). Indeed let P and P ′ as in Remark 9.6, let P be finitely generated decidable, let DL be not equivalent to a constant function and suppose that the Word Problem is solvable for P. Then P ′ is decidable, thus one can obtain P ′ from P by applications of decidable Tietze transformations; but since DL and DL ′ are not equivalent then P ′ cannot be obtained from P by applications of Tietze transformations of bounded derivation.
Let P =< X | R > be a monoid presentation, let A ⊂ M(X) and suppose that we apply to P a Tietze transformation τ . Then the set corresponding to A by τ is equal to A if τ is a Tietze transformation of type 1, 2 or 3; if τ is a Tietze transformation of type 4, the set corresponding to A by τ is equal to ϕ(A) where ϕ is as in 4 of Definition 9.1.
If P ′ =< X ′ | R ′ > is the presentation obtained from P by application of a series of Tietze transformations, then the set corresponding to A in P ′ is the set obtained applying to A these transformations. In particular it is a subset of M(X ′ ). Proposition 9.10 Let P =< X | R > and P ′ =< X ′ | R ′ > be presentations such that P ′ is obtained from P by applications of Tietze transformations of type 3 or 4 of bounded length and by any Tietze transformations of type 1 or 2 (in particular, let P and P ′ be finitely generated presentations for the same monoid).
1. Let A ⊂ M(X) and let A ′ be the set corresponding to A in P ′ . Then the distortion functions (Definition 8.6) relative to A and A ′ are equivalent.
2. If Γ and Γ ′ are the functions of Definition 7.8 relative to P and P ′ respectively then Γ and Γ ′ are strongly equivalent (Definition 4.4).
Proof Let M be the monoid presented by P and P ′ and let Dist A and Dist ′ A ′ be the distortion functions relative to A and A ′ . Since Γ and the distortion function is independent from the defining relations of a presentation, then they do not change by applying Tietze transformations of type 1 or 2 . Let us apply a Tietze transformation of length bounded by a natural number c; let γ and γ ′ be the functions of Definition 7.8 relative to P and P ′ respectively and let length A and length ′ A ′ be the length functions relative to A and A ′ . By (6) we have that γ ′ (w 1 , w 2 ) γ(w 1 , w 2 ) cγ ′ (w 1 , w 2 ) for every w 1 , w 2 ∈ M(X) such that w 1 is conjugated to w 2 and for every t belonging to the submonoid generated n by A. Thus Γ ′ Γ c Γ ′ n obviously the submonoid generated by A is equal to that generated by A ′ and Dist ′ A ′ (n) Dist A (n) Dist ′ A ′ (cn) and the claim is proved.

A A paradox of Computability Theory
Let E be an enumerable set and suppose that every finite subset of E (i.e., every subset of E with finitely many elements) is decidable. We prove that this implies that every subset of E is decidable, while by admitting the Church-Turing thesis (see 3.3 of [24]) there are subsets of N which are not even enumerable.
Let F be any subset of E. Since E is enumerable then E = {e n : n ∈ N}, where there is an algorithm whose n-th output is e n . Let F n = {e ∈ F : e = e k for some k n}. Each F n is finite and by our hypothesis it is decidable.
Let e be an element of E; then there exists n ∈ N such that e = e n . We have that e belongs to F if and only if e belongs to F n . But F n is decidable, thus there exists an algorithm which decides whether e belongs to F n , thus F is decidable.