What is the lower bound (Omega) of Levinshtein distance algorithm in terms of time complexity? Algorithm are as described:
// len_s and len_t are the number of characters in string s and t respectively
int LevenshteinDistance(string s, int len_s, string t, int len_t)
{
/* base case: empty strings */
if (len_s == 0) return len_t;
if (len_t == 0) return len_s;
/* test if last characters of the strings match */
if (s[len_s-1] == t[len_t-1])
cost = 0;
else
cost = 1;
/* return minimum of delete char from s, delete char from t, and delete char from both */
return minimum(LevenshteinDistance(s, len_s - 1, t, len_t ) + 1,
LevenshteinDistance(s, len_s , t, len_t - 1) + 1,
` LevenshteinDistance(s, len_s - 1, t, len_t - 1) + cost));
}
I know this has been answered here: Complexity of edit distance (Levenshtein distance) recursion top down implementation. But I don't understand how Omega(2^(max(m,n))) is derived? I seek a derivation by either some kind of rule, example or mathematical derivation.