function abcInf(nSamples, targetSeq, tolerance) {
let samples = Array(nSamples);
let c = 0
while (c < nSamples) {
let theta = Math.random();
let testSeq = markov(targetSeq.length, theta);
if (Math.abs(countTrans(testSeq) - countTrans(targetSeq)) <= tolerance) {
samples[c] = theta;
c++;
}
}
return samples;
}