[Openmcl-devel] bit string matching
Lonnie Cumberland
lonnie at biofuelstechnologyinc.com
Tue Jan 4 11:09:36 PST 2011
Greetings All,
I am working on a small project in lisp and have found Clozure LISP to
be great thus far.
Currently, I am looking for an efficient and fast method to locate
duplicate strings, or lists, within a string or list.
For example, some information that I might have would be something like:
(1 1 0 0 0 1 1 0 0 0 1 1 0 0 0 1 1 0 0 ....)
for my purposes, I am actually looking for a duplicate series that is
mirrored an closest to the beginning.
In the above example the mirrored solution would be:
(1 0 0 0 1)
since if you"flip" it about the center of the second "1 1" then that
pattern will continue. The mirror image is actually very important as
the patter becomes more and more complex through various iterations.
( 1 0 1 1 0 1 0 1 1 0 0 0 0 1 1 0 0 0 0 1 1 0 1 0 1 1 0 1 0 1 1 0 0 0
0 1 1 0 0 0 0 1 1 0 1 0 1 1 0 1
and in this case above the first repeating series is
( 1 0 1 0 1 1 0 0 0 0 1)
close inspection will show that, with the exception of the first 3
elements "1 0 1" that the series repeats by flipping through in
blocks.
I am looking for a set of LISP functions that I can use to do these
various searches.
Any suggestions would be of great help,
Thanks in advance,
Lonnie
More information about the Openmcl-devel
mailing list