我遇到了一个问题,可以总结如下:
给定一组具有从n长度序列中提取的权重的序列 需要找到与给定序列的子集兼容并具有最大求和权重的n长度序列
e.g. given sequences below, find a sequence of length 6 with max weight from compatible(has same character at overlapping locations) sub-set of given sequences.
1. a,b,c,d,e weight 1
2. b,e weight 2
3. c,d weight -1
4. a,b weight 0
5. d,e,f weight 3
in the example, it should be a,b,e,d,e,f which has weight of 5 (2,4,5 are compatible with each other(has same character or empty at same position)
我只找到一个解决方案,将问题转换为5个顶点图,其中边表示子序列对之间的兼容性,然后找到最大加权团,但它是NP难的,因此子序列计数超过200的性能太差了可以使用。
这个问题有更好的算法吗?