Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Algorithm inspiration required.

by talexb (Chancellor)
on Jun 18, 2018 at 12:30 UTC ( [id://1216851]=note: print w/replies, xml ) Need Help??


in reply to Algorithm inspiration required.

Take smaller bites of your data, and checksum those bites. Then see if you can see a pattern in at least some of those bites.

Say you take four byte cheksums at every byte, and the pattern is fourteen bytes long and repeats every 30 bytes. You start collecting at offset 0, 1, 2 .. and collect checksums for those spots. By the time you get to offset 30, you'll start to see the same checksums. Now, only three of these will match, but that positive result would be enough to backtrack to 0 and compare the stream byte by byte from there and from 30.

Alex / talexb / Toronto

Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.

Replies are listed 'Best First'.
Re^2: Algorithm inspiration required.
by BrowserUk (Patriarch) on Jun 18, 2018 at 21:15 UTC

    The problem is the sequence being sought could be huge -- bigger than available memory -- and retaining all the checksums for every position will require even more memory than the sequence itself. SO the problem becomes: how to recognise which checksums must be retained and which can be discarded.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority". The enemy of (IT) success is complexity.
    In the absence of evidence, opinion is indistinguishable from prejudice. Suck that fhit

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1216851]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2024-04-19 14:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found