what is often before a pattern ?

J

joh12005

Hello,

i'm looking for a way to detect sequence objects which are often before
a pattern.

say for example some list like:

a = "a0 a1 a2 a3 a4 myPatternMatchHere".split()
b = "a5 a2 a4 myPatternMatchHere".split()
c = "a6 a7 a2 a3 a8 a4 myPatternMatchHere".split()
d = "a9 a10 a2 myPatternMatchHere".split()

a2 a3 a4 is the most interesting because it appears 2 times upon 4, and
overlap a2 a4, and we have some clues that a2 is also important as it
appears 4/4.

maybe have you some suggestions or idioms where i should look after

best.
 
J

James Stroud

Hello,

i'm looking for a way to detect sequence objects which are often before
a pattern.

say for example some list like:

a = "a0 a1 a2 a3 a4 myPatternMatchHere".split()
b = "a5 a2 a4 myPatternMatchHere".split()
c = "a6 a7 a2 a3 a8 a4 myPatternMatchHere".split()
d = "a9 a10 a2 myPatternMatchHere".split()

a2 a3 a4 is the most interesting because it appears 2 times upon 4, and
overlap a2 a4, and we have some clues that a2 is also important as it
appears 4/4.

maybe have you some suggestions or idioms where i should look after

best.

Look into suffix trees.

http://www.csse.monash.edu.au/~lloyd/tildeAlgDS/Tree/Suffix/

--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095

http://www.jamesstroud.com/
 
J

joh12005

thanks, i 've checked, it may fit.

i also find something about a longest common sequence which may be of
interest, but i was unable to adapt it for list (words) rather than
characters :(
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top