Monte Carlo Algorithsm For Bayesian Inference