@@General discussion

\ni A group G is said to be an amalgamated product of its 
subgroups A and B with the subgroup H amalgamated, if 
(i) G is generated by A and B, termed the factors;
(ii) A and B intersect in H, termed the amalgamated subgroup;
(iii) every product of the form c_1 c_2 ... c_n, where c_i is
not the identity,  each c_i is in the union of A and B,  
and consecutive terms c_i lie in diferent factors, is different
from the identity.

\ni If A=<X;R>, if B=<Y;S>, if H=gp(w_1(x), ...,w_m(x)) is generated,
qua subgroup of A, by the words w_1(x),...,w_n(x), where x here 
stands for a tuple of elements of X and if, similarly,
H=gp(z_1(y),...,z_m(y)) is generated, qua subgroup of B, by the
words z_1(y),...,z_m(y) where equally indexed w_i and z_i represent
equal elements in G, then G can be presented as follows: 

\ni generators: the union of X and Y;

\ni relators: the union of R and S and the elements
w_1z_1^{-1},...,w_mz_m^{-1}.

\ni If we denote the subgroup of A generated by the words w_i by
W and the subgroup of B generated by the words z_i by
Z, then the mapping which sends w_i to z_i, for i=1,...,m, defines
an isomorphism, say \phi. We then say that G is the amalgamated
product of its subgroups A and B amalgamating the subgroups W
and Z according to the isomorphism \phi. 

\ni For a detailed discussion of these notions, see the books:

Combinatorial group theory, by R.C. Lyndon and P.E. Schupp,
Published by Springer, 1977;

Combinatorial group theory, by W. Magnus, A. Karrass and D. Solitar,
Interscience, 1966, Reprinted by Dover.

\ni Even in the case where the factors are (finitely generated)
free and the amalgamated subgroups are finitely generated, these
amalgamated products can be extremely complicated. C.F. Miller
has shown that this class of groups has an undecidable isomorphism
problem and there exist groups of this kind with undecidable
conjugacy problem. In the special case where the amalgamated subgroup
is cyclic, all of the classical problems have a positive solution.
In general, the word problem for an amalgamated product is solvable
when the factors are finitely presented groups with solvable word
problem, if each of the amalagamated subgroups is finitely
generated and if the generalized word problem for W in A and for
Z in B is solvable.

@@Is the given group free? 

\ni It is not clear whether there is an algorithm which decides whether
or not a given amalgamated product of finitely generated free groups with
a finitely generated subgroup amalgamated is free. In the case where the
amalgamated subgroup is cyclic, the amalgamated product is free if and
only if the generator of the cyclic subgroup that is amalgamated is either
part of a basis for the one factor or part of a basis for the other.
This can be determined, using Whitehead's algorithm, leading to a decision
as to whether or not the given amalgamated product is free.

@@Homology of an amalgamated product

\ni The integral homology groups of an amalgamated product G of two
finitely presented groups A and B amalgamating the finitely generated
subgroup H of A with the finitely generated subgroup K of B can be
computed via the Mayer-Vietoris sequence (see the book by Hilton and
Stammbach). Even though one knows that the second integral homology 
group of a finitely presented group is finitely generated, there is no
algorithm which decides whether or not it is trivial (this is due
to Cameron Gordon). In the case where the factors are free, the
computation of homology is effective. In more detail, suppose that
A is free on a_1,...,a_r, B is free on b_1,...,b_s, H is free on
h_1,...,h_m and K is free on k_1,...,k_m.  Then the n-dimensional
homology group H_n(G)=0 if n > 2. In order to compute H_2(G), let
F be the free group freely generated by a_1,..,a_r,b_1,...,b_s and
let j be the rank of the image I of the subgroup generated by the
elements a_1 b_1^{-1},...,a_m b_m^{-1} in the abelianisation F_{ab} 
of F. Then H_2(G) is free abelian of rank j and H_1(G)=F_{ab}/I. 
Notice that H_1(G) is isomorphic to the abelianization of G.




@@The word problem 

\ni In general, the word problem is undecidable for amalgamated
products (see @General discussion@General_amalg_prods::General discussion@)
In the case of an amalgamated product of free groups with a finitely
generated subgroup identified, the word problem is solvable. Specifically,
suppose that
A=<a_1,...,a_m>, B=<b_1,...,b_n>, H=gp(h_1,...,h_p), K=gp(k_1,...,k_p)
and that G is the amalgamated product of A and B amalgamating H with K
with h_i identified with k_i, for each i. So here h_i is a word in the
generators of A and k_i is a word in the generators of B. Suppose
w is a word in the generators of A and B. Then we can group the generators
involved together in such a way that w=u_1 v_1 u_2 v_2 ..., 
where each u_i is a word in a_1,...,a_m and each v_i is a word in b_1,...,b_n.
We check whether any of the u_i are in H. If not, we check whether any of the
v_i are in K. If not, w is not equal to 1 in G. If one or u_i or one of v_i
is contained in H or K, we replace it by a word that it is equal to and then
observe that we can re-express w as a product of u_i's and v_i's, but that
the number of terms is fewer than before. Continuing in this way leads to
a decision as to whether or not w is equal to 1 in G.


@@Equality of two words 

\ni Given two words u and v in an amalgamated product, we simply have to
decide whether uv^-1=1 in order to decide if u=v. In the case of an
amalgamated product of free groups, this is always possible 
(see @The word problem@General_amalg_prods::The word problem@). 

@@Element in the  center?  

\ni The center of an amalgamated product is the intersection of the
centers of the factors with the amalgamated subgroup. In the case where
factors in the amalgamated product are free, the amalgamated product is
centerless if either one or other of the factors is not cyclic. In the
case where they are both cyclic, the center of the group is as stated
above, which can then be computed.

@@The conjugacy problem 

\ni The conjugacy problem for amalgamated products of free groups is, in general, 
undecidable. We use the general procedure dealing with finitely presented groups 
to attempt to decide if two words u and v in an amalgamated product of free groups 
represent conjugate elements. In more detail, we proceed as follows.

\ni First we check to see if u and v are not conjugate in the abelianization
of G and then in some nilpotent quotients of G.

\ni Next we check to see if the accompanying  presentation is a small cancellation
presentation, in which case we use the known solution of the conjugacy 
problem, i.e., an algorithm that is essentially due to Dehn. 
(See @General discussion@General_small_cancellation::General discussion@). 

\ni Since G has a solvable word problem, we start enumerating all of the 
conjugates of u by elements of G and check to see if any of these coincide
with v. 

\ni In the case of an amalgamated product of free groups with a cyclic subgroup
amalgamated, the conjugacy problem was solved by S. Lipschutz. We use a variation
of his algorithm to decide whether two words represent conjugate elements for
amalgamated products of this kind.

@@Find the reduced form of a word 

\ni The reduced form of a word in an amalgamated product of two groups
A and B with the subgroup H of A identified with the subgroup K of B,
is a representation of the word as a product of words either in the
generators of A or those of B where consecutive words take on values
which do not lie in the amalgamated subgroups. In the case of an amalgamated
product of free groups, in view of the fact that it is possible to decide if 
a word in a finitely generated free group lies in a finitely generated 
subgroup (and in this event to find an expression for it in terms of the
generators of the subgroup - see  
 @Does a word represent an element in a given subgroup?@General_free_groups::
 Does a word represent an element in a given subgroup?@), one can find a 
 reduced form of a given word. 

@@The power problem 

\ni Here we implement the algorithm which determines whether a word
in an amalgamated product of free groups amalgamating a cyclic subgroup is 
a proper power. 

@@Maximal root of an element

\ni In an amalgamated product of free groups where the amalgamated subgroup is 
cyclic, every non-trivial element has a maximal root. We find such a maximal
root here.

@@Is the group hyperbolic? 

\ni An amalgamated product G  of finitely generated free groups A and B 
amalgamating the finitely generated subgroup H of A with the subgroup K 
of B, is hyperbolic if either H is malnormal in A or K is malnormal in 
B (note that it is possible for G to be hyperbolic even if neither H is
malnormal in A nor K in B). We invoke here the algorithm which determines
whether a finitely generated subgroup of a free group is malnormal (see
@Is a subgroup malnormal?@General_free_groups::Is a subgroup malnormal?@).



