Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re^3: Finding a LCS module on word level

by lima1 (Curate)
on May 10, 2008 at 10:31 UTC ( #685847=note: print w/replies, xml ) Need Help??

in reply to Re^2: Finding a LCS module on word level
in thread Finding a LCS module on word level

I am not an expert, but a related problem in bioinformatics is the multiple sequence alignment (which is basically the longest common sequence with sophisticated scoring functions). exact DP solutions are O(n^m) and the implementation gets really ugly for n>2. So people use heuristics. Which one works depends how similar the strings are, how many you want to align etc... A simple and common approach is to cluster the strings in pairs with something like UPGMA, calculate the pair lcs and then calculate the lcs of the pair lcs according some special rules.

The substring problem is solvable in linear time with suffix arrays/trees. Tree::Suffix claims to have this function.

  • Comment on Re^3: Finding a LCS module on word level

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2021-04-15 11:43 GMT
Find Nodes?
    Voting Booth?

    No recent polls found