> thanks everyone. only a question. there is a way to advantage of binary > sequences?
I doubt you'll find any way to optimize the code that somehow only applies to binary sequences. You still have to find each possible subsequence of minimum length within the sequence and compare it to all other possible subsequences and that's what's going to take most of the time. If you haven't already, check out psyco (http://psyco.sourceforge.net/). It will most definitely make your code run faster. BR Johan Lindberg [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list