@@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.





