To clarify consider two strings, one of length m and the other of length n.
As an example m = 3 and n = 2, with s1 = abc and s2 = de.
First we compare:
abc
de
and generate tuple (0, 1) (as a and e are being compared, so give their indices)
then slide string s2
abc
de
generate (0, 0) {compare a and d}
generate (1, 1) {compare b and e}
slide string s2
abc
de
generate (1, 0) {compare b and d}
generate (2, 1) {compare c and e}
slide string s2
abc
de
generate (2, 0) {compare c and d}
so we return generate (0, 1), (0, 0), (1, 1), (1, 0), (2, 1), (2, 0) in that order
If for example m = 2 and and n = 2
we would generate (0, 1), (0, 0), (1, 1), (1, 0) using a same method of sliding the smaller string.