  In particle-in-cell simulations and some other statistical computations, the
representation of modelled distributions with tracked macro-particles can
become locally excessive. Merging or resampling dense clusters or
highly-populated phase space volumes may, however, remove or affect small-scale
peculiarities in the modelled distribution or cause local changes of conserved
quantities, such as energy and momenta. This may lead to additional noise,
reduced accuracy or even unphysical effects. Here we describe a probabilistic
algorithm for reducing the number of macro-particles in such clusters or
volumes so that all the distribution functions are not affected on average and
an arbitrary number of conservation laws, distribution central moments and
contributions to the grid quantities (such as charge and current density) are
preserved.
