The main idea will be to replace bit-strings (as described in the previous section) by a much smaller number of dynamic programming states.
the states of the new dynamic program will be tuples (w 1 , w 2 , n, l, m, r).