![]() |
|
Perl: the Markov chain saw | |
PerlMonks |
Re: finding tuplesby Roy Johnson (Monsignor) |
on Jun 23, 2009 at 18:48 UTC ( #774138=note: print w/replies, xml ) | Need Help?? |
Your description of the problem is a bit puzzling. It looks like you want to run through the string in order and select four characters from it. After you've taken those four out, you want to go back and get four more from what's left, and so on, until you can't form any more tuples. The rules for selecting 4-tuples are that they must all be the same letter (chosen from a cluster of at least 4), or they must be one letter from each of four consecutive clusters of letters.
Is that right? And then to add to the difficulty, you want to get the largest possible set. I think that is a hard problem. I don't have a solution for you, but I hope I've made your requirements clearer to others.
Update
Caution: Contents may have been coded under pressure.
In Section
Seekers of Perl Wisdom
|
|