Random edit distance implementations