The Levenshtein distance between two strings is defined as the minimum number of edits needed to transform one string into the other, with the allowable edit operations being insertion, deletion, or substitution of a single character.
http://www.geeksforgeeks.org/dynamic-programming-set-5-edit-distance/
http://www.ideserve.co.in/learn/edit-distance-dynamic-programming
http://algorithms.tutorialhorizon.com/dynamic-programming-edit-distance-problem/
Question1:
Find optimum path between 2 words in a dictionary
You have a dictionary of 1000 words each of 3 chars. Given 2 words you have to find the optimum path between the 2 words. The optimum path contains the words in the dictionary each word at a distance of 1 from the previous word.
for eg source = cat , target = sun
path is
cat -> bat -> but -> bun -> sun
given all these words are in the dictionary
http://www.geeksforgeeks.org/dynamic-programming-set-5-edit-distance/
http://www.ideserve.co.in/learn/edit-distance-dynamic-programming
http://algorithms.tutorialhorizon.com/dynamic-programming-edit-distance-problem/
Question1:
Find optimum path between 2 words in a dictionary
for eg source = cat , target = sun
path is
cat -> bat -> but -> bun -> sun
given all these words are in the dictionary
http://algorithmsbyme.wordpress.com/2012/05/28/levenshtein-distanceedit-distance-using-recursion-and-dynamic-programming-continued/
ReplyDelete