Bayesian Stochastic Computation with application to Model Selection and Inverse Problems