OK, seems I'm coming to this party late.

But as I ponder this problem; it feels like a Fraction -- an attempt to find the lowest common denominator. So in an attempt to make the problem even easier (more simplistic) it occurred to be that the easiest (least complex) solution could probably be found by converting said stream to binary. I couldn't quire gather from your OP whether the data was strictly limited to AlphaNumeric, or not. This solved that for me. IMHO, and off the top of my point head. Only needing to deal with exactly 2 known characters should make finding a pattern near trivial, and should even reduce the record size you would need to maintain, to find that pattern.

Again, these are just my initial thoughts on the matter, and while I would normally have waited until I had produced a workable example. I thought I might throw this out there, in case I was actually on to something, and it lit a light in someoneelses head, (maybe yours) before mine. :-)

--Chris

Evil is good, for without it, Good would have no value
¡λɐp ʇɑəɹ⅁ ɐ əʌɐɥ puɐ ʻꜱdləɥ ꜱᴉɥʇ ədoH


In reply to Re: Algorithm inspiration required. by taint
in thread Algorithm inspiration required. by BrowserUk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.