I attach what I believe to be the implementation of the optimal algorithm. The proof is local to windows of size 3. First prove the windowing, then generate and fold the patterns.
I have also fixed the code (hence the repost) so it deals correctly with the degenerate cases (short sequences, end of sequence) correctly! All lines after the blank line deal with degenerate cases, and can be handled as special cases in the proof.
no subject
Date: 2005-11-02 12:43 am (UTC)I have also fixed the code (hence the repost) so it deals correctly with the degenerate cases (short sequences, end of sequence) correctly! All lines after the blank line deal with degenerate cases, and can be handled as special cases in the proof.