So, this is time vs memory?
Edit: To determine the number of records created from permuting a single string, use this:
for (r = 1; r <= e; r++)
numRecs += (fact(n) / (fact(r) * fact(n - r)));
where e = edit distance and n = length of string. fact() is your standard factorial function.numRecs = -1 + 2^n + (n nCr e+1) * 2F1(1, e-n+1; e+2; -1)
n nCr k combinatorial choice, 2F1 is the hypergeometric function