|
|
Subject:
Data structure and algorithm
Category: Computers > Algorithms Asked by: math01-ga List Price: $3.00 |
Posted:
16 Jul 2003 08:12 PDT
Expires: 15 Aug 2003 08:12 PDT Question ID: 231632 |
Match the following subsequences using the longest common subsequence dynamic programming algorithm: A T C A T T A T A T C A |
|
Subject:
Re: Data structure and algorithm
Answered By: elmarto-ga on 16 Jul 2003 23:05 PDT |
Hello again math01! I wrote a code for the longest common subsequence in Matlab and used it with the strings provided here. The answer would be that the longest common subsequence is: A T C A which is 4 elements long. Since the longest possible subsequence could be 5 elements long (because the second string is 5 elements long), and T A T C A is not a subsequence of the first string, the longest common subsequence can't possibly have 5 elements. Then A T C A, with 4 elements, is the longest common subsequence. As in question #231621, simple algorithms to find the longest common subsequence can be found at the following pages Longest common subsequence http://freespace.virgin.net/cdm.henderson/site/cpp/lcs/ http://www-igm.univ-mlv.fr/~lecroq/seqcomp/node4.html I hope this helps! Google search strategy: algorithm "longest common subsequence" ://www.google.com/search?hl=en&lr=&ie=UTF-8&oe=UTF-8&q=algorithm+%22longest+common+subsequence%22 Best wishes! elmarto |
|
There are no comments at this time. |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |