  A Monte Carlo simulation of mergers in clusters of galaxies is carried out.
An ``explosive'' character of the merging process (an analog of phase
transition), suggested earlier by Cavaliere et al. (1991), Kontorovich et al.
(1992), is confirmed. In particular, a giant object similar to cD-galaxy is
formed in a comparatively short time as a result of mergers. Mass and angular
momentum distribution function for galaxies is calculated. An intermediate
asymptotics of the mass function is close to a power law with the exponent
$\alpha\approx2$. It may correspond to recent observational data for steep
faint end of the luminosity function. The angular momentum distribution formed
by mergers is close to Gaussian, the rms dimensionless angular momentum
$S/(GM^3R)^{1/2}$ being approximately independent of mass, which is in
accordance with observational data.
