英语翻译
英语翻译
Write a Windows form application that returns the difference of two given files using Levenshtein distance (edit distance).
A commonly-used bottom-up dynamic programming algorithm for computing the Levenshtein distance involves the use of an (n + 1) × (m + 1) matrix,where n and m are the lengths of the two strings.Here is pseudocode for a function LevenshteinDistance that takes two strings,s of length m,and t of length n,and computes the Levenshtein distance between them:
//此处有一个名为:LevenshteinDistance 的函数,省略,请翻译下面
Two examples of the resulting matrix (the minimum steps to be taken are highlighted):
//此处有连个图形表格,省略,请翻译下面
The invariant maintained throughout the algorithm is that we can transform the initial segment s[1..i] into t[1..j] using a minimum of d[i,j] operations.At the end,the bottom-right element of the array contains the answer.
请写一个Windows表单(就是带有若干控件的窗口)程序,根据Levenshtein距离(编辑距离),计算出两个文件的差异.计算Levenshtein距离通常采用的自底向上动态编程算法,需要用到一个(n + 1) × (m + 1) 的矩阵,n和m分别...