perfectSample function

Perfectly samples an MTD Markov chain