Google Answers Logo
View Question
 
Q: Data structure and algorithm ( Answered,   0 Comments )
Question  
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>.
Answer  
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
Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

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 Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy