We compare different analytical and numerical methods for studying the part
itions of a finite system into fragments. We propose a numerical method of
exploring the partition space by generating the Markov chains of partitions
based on the Metropolis algorithm. The advantages of the method for the pr
oblems where partitions are sampled with nontrivial weights are demonstrate
d.