run.random.sampling function

Run the random sampling algorithm