start | subgroups | patterns | mapping
patterns in sequences Version 2 / March 20, 2012 / Benjamin Aaron Degenhart (doesn't work on Firefox for some reason)
This algorithm looks for patterns in sequences.
Possible uses:
How it works: Take each possible pair ((n/2) * (n-1)) of the sequences and slide B (equal or bigger length than A) along A step by step. Look at each step for vertical character-matches. The number of steps until a sliding is completed is: [lengthA + (lengthB - lengthA) + (lengthA - 1)] As example one of the 8 different couples from the prefilled input: step 1 (first):
... step 7:
pattern found: [. . F. D .] ... step 12 (last):
When finding a pattern, check if it's already been found - if not append it to a stack of all patterns and run through all sequences to count how many times this pattern appears in total. Ouput a list of patterns sorted by the factor of [occurrence * length * distinct elements (not '.' placeholders)]. |
|
input:
results:
log:
|