Given two circular lists, is there an efficient way to compute the optimal alignment between the two lists? For example, given circular lists:
a b b c b c a the optimal alignment is
a b b c a b _ c because this alignment has the smallest edit distance (note: this optimal alignment is not and need not be unique).
One way to do this is to compute the edit distance between the first list and each cyclic permutation of the second list, taking the minimum edit distance as the optimal alignment. Is there a more efficient way to do so?