Longest Common Subsequence for Multiple Sequences

前端 未结 3 1819
旧巷少年郎
旧巷少年郎 2020-12-14 10:49

I have done a bunch of research for finding the longest for M = 2 sequences, but I am trying to figure out how to do it for M ≥ 2 sequences

I am being given N and M:

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-14 11:51

    You can look into "Design of a new Deterministic Algorithm for finding Common DNA Subsequence" paper. You can use this algorithm to construct the DAG (pg 8, figure 5). From the DAG, read the largest common distinct subsequences. Then try a dynamic programming approach on that using the value of M to decide how many DAGs you need to construct per sequence. Basically use these subsequences as key and store the corresponding sequence numbers where it is found and then try to find the largest subsequence (which can be more than 1).

提交回复
热议问题