  In this paper, we introduce a dynamical Monte Carlo algorithm for spin models
in which the number of the spins fluctuates from zero to a given number by
addition and deletion of spins with a probabilistic rule. Such simulations are
realized with a variable-system-size ensemble, a mixture of canonical ensembles
each of which corresponds to a system with different size. The weight of each
component of the mixture is controlled by a penalty term and systematically
tuned in a preliminary run in a way similar to the multicanonical algorithm. In
a measurement run, the system grows and shrinks without violating the detailed
balance condition and we can obtain the correct canonical averages if physical
quantities is measured only when its size is equal to the prescribed maximum
size. The mixing of Markov chain is facilitated by the fast relaxation at small
system sizes. The algorithm is implemented for the SK model of spin glass and
shows better performance than that of a conventional heat bath algorithm.
