|
|
Subject:
Data structure and algorithm
Category: Computers > Algorithms Asked by: math01-ga List Price: $3.00 |
Posted:
16 Jul 2003 07:58 PDT
Expires: 15 Aug 2003 07:58 PDT Question ID: 231621 |
Compute the longest common subsequence of the following sequences: X: <A C D B C D> and Y: <C B C A D>. |
|
Subject:
Re: Data structure and algorithm
Answered By: elmarto-ga on 16 Jul 2003 12:47 PDT |
Hello math01! The longest common subsequence in this case is <C B C D>, which has 4 elements. There can't be a longer one, since sequence Y is 5 elements long, and the whole sequence Y is not a subsequence of sequence X. Simple algorithms to find the longest common subsequence (LCS problem) 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 |