Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/string/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
String 查找具有最少子序列数的最长公共子序列_String_Algorithm_Subsequence_Lcs - Fatal编程技术网

String 查找具有最少子序列数的最长公共子序列

String 查找具有最少子序列数的最长公共子序列,string,algorithm,subsequence,lcs,String,Algorithm,Subsequence,Lcs,给定两个字符串,我想找到具有最小中断的最长公共子序列。 例如: 最长的公共子序列是legth=3的abe 但是,我希望得到情况(1)而不是(2),因为子序列的数量最少。我怎样才能做到这一点?多谢各位 (1) ABcE and ABbdE => AB-E : 2 subsequences (2) ABcE and AbBbE => A-B-E : 3 subsequences (常用子序列的大写字母仅供说明)在检测代码中,只需保存断点最少的常用序列的索引?在检测代码中,只需保存断点最

给定两个字符串,我想找到具有最小中断的最长公共子序列。 例如:

最长的公共子序列是legth=3的abe 但是,我希望得到情况(1)而不是(2),因为子序列的数量最少。我怎样才能做到这一点?多谢各位

(1) ABcE and ABbdE => AB-E : 2 subsequences
(2) ABcE and AbBbE => A-B-E : 3 subsequences

(常用子序列的大写字母仅供说明)

在检测代码中,只需保存断点最少的常用序列的索引?在检测代码中,只需保存断点最少的常用序列的索引?
(1) ABcE and ABbdE => AB-E : 2 subsequences
(2) ABcE and AbBbE => A-B-E : 3 subsequences