For an arbitrary group G, it is known that either the semigroup rank Grk_s equals the
group rank Grk_g, or Grk_s = Grk_g+1. This is the starting point for the research of the
article, where the precise relation between both ranks for diverse kinds of groups is
established. The semigroup rank of any relatively free group is computed. For a finitely
generated abelian group G, it is proved that Grk_s = Grk_g+1 if and only if G is torsionfree.
In general, this is not true. Partial results are obtained in the nilpotent case. It is
also shown that if M is a connected closed surface, then (?_1(M))rk_s = (?_1(M))rk_g+1
if and only if M is orientable.

CEMAT - Center for Computational and Stochastic Mathematics