Percolation algorithm and Monte Carlo simulation