  A generalized Baumslag-Solitar (GBS) group is a finitely generated group
acting on a tree with infinite cyclic edge and vertex stabilizers. We show how
to determine effectively the rank (minimal cardinality of a generating set) of
a GBS group; as a consequence, one can compute the rank of the mapping torus of
a finite order outer automorphism of a free group $F_n$. We also show that the
rank of a finite index subgroup of a GBS group G cannot be smaller than the
rank of G. We determine which GBS groups are large (some finite index subgroup
maps onto $F_2$), and we solve the commensurability problem (deciding whether
two groups have isomorphic finite index subgroups) in a particular family of
GBS groups.
