calculate size of F[i .. j]
ApproximateMatching.cs