  In a series of previous papers we have considered the reconstruction of the
surface mass density of a cluster of galaxies from images of lensed faint
background galaxies. We showed that the reconstructed surface mass density is
not uniquely determined, but that there exists a global invariance
transformation that leaves the shape of the images of the lensed galaxies
unchanged. Because of this, only lower limits on the total mass of a cluster
can be derived if no further informations besides image ellipticities are used.
Throughout these papers we used the simplifying assumption that all sources are
at the same redshift. In this paper we account for a redshift distribution of
the faint galaxies, and in particular, some of these galaxies can lie in front
of the cluster or can be cluster members. We show how the mass distribution of
a cluster of galaxies can be obtained from images of these faint galaxies, if
the redshift distribution of these galaxies is known. We demonstrate that for
the reconstruction of non-critical clusters we need less information on the
redshift distribution of the galaxies, i.e., we only need to know two or three
moments of the distribution. We show that the mean mass density across the data
field is still a free variable, i.e., there remains a global invariance
transformation of the resulting mass density field. For non-critical clusters
we can derive the transformation explicitly and it is similar to that derived
previously for the case of a single redshift of the sources. We discuss several
theoretical ideas to break the mass degeneracy; of those considered, we find
that only the magnification effect on the number density of galaxy images can
be used successfully in practice.
