摘要
给出求2个字符串最长公共子串(LCS)长度的递归算法、递推算法和心动阵列算法.对2个长度分别为n,m(n≥m)的字符串,递归算法的最坏时空复杂性为(m+n)!/(m!n!),而递推算法的时空复杂性分别仅为m+nm+O(1),2m+O(1).在心动阵列算法中,需m个PE和n+m的时间.最后给出了一个应用实例.
We give recursive, recurrence and systolic algorithms for the problem of longest common substring of two strings. For two strings with length of n and m(n≥m ), the time space complexity of the recursive algorithm in the worst case is (m+n)!/(m!n!) , time space complexity of the recurrence algorithm is m+nm+O(1) and 2m+O(1) respectively. The systolic algorithm requires m PE and m+n time units. An example of its application is also given.
出处
《东南大学学报(自然科学版)》
EI
CAS
CSCD
1998年第6期191-194,共4页
Journal of Southeast University:Natural Science Edition