  Recently we showed that the critical nonequilibrium relaxation in the
Swendsen-Wang algorithm is widely described by the stretched-exponential
relaxation of physical quantities in the Ising or Heisenberg models. Here we
make a similar analysis in the Berezinsky-Kosterlitz-Thouless phase transition
in the two-dimensional (2D) XY model and in the first-order phase transition in
the 2D $q=5$ Potts model, and find that these phase transitions are described
by the simple exponential relaxation and power-law relaxation of physical
quantities, respectively. We compare the relaxation behaviors of these phase
transitions with those of the second-order phase transition in the 3D and 4D XY
models and in the 2D $q$-state Potts models for $2 \le q \le 4$, and show that
the species of phase transitions can be clearly characterized by the present
analysis. We also compare the size dependence of relaxation behaviors of the
first-order phase transition in the 2D $q=5$ and $6$ Potts models, and propose
a quantitative criterion on "weakness" of the first-order phase transition.
