Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: Longest Common Subsequence Question

by Anonymous Monk
on Nov 19, 2007 at 04:11 UTC ( #651580=note: print w/replies, xml ) Need Help??


in reply to Re: Longest Common Subsequence Question
in thread Longest Common Subsequence Question

I thought the longest common subsequence between S1 and S2 in this case is aabbb.
And then the longest common subsequence between this result aabbb and S3 (aa) is aa. Am I missing something?
  • Comment on Re^2: Longest Common Subsequence Question

Replies are listed 'Best First'.
Re^3: Longest Common Subsequence Question
by ikegami (Patriarch) on Nov 19, 2007 at 04:20 UTC

    Oops, I meant

    S1 = aa1bbb S2 = aa2bbb S3 = aa
      with S1=aa1bbb and S2=aa2bbb the longest common subsequence between them still would be aabbb and the longest common subsequence between aabbb and aa would still be aa. This is the longest common subsequence, not the longest common substring.
        oh, it doesn't have to be contiguous? Then yeah, your method would work.

        Update: Pardon the disaster that was my participation in this thread.

      Thank you all. This one got me thinking for awhile there.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://651580]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2023-09-26 06:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?