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

Re: [OT] The interesting problem of comparing bit-strings.

by sundialsvc4 (Abbot)
on Mar 27, 2015 at 17:22 UTC ( #1121531=note: print w/replies, xml ) Need Help??


in reply to [OT] The interesting problem of comparing bit-strings.

NO, IT IS NOT “PUERILE TROLLING!”

Yes, I am unfortuantely well aware that BrowserUK and (by my rough estimate of downvote counts) about ±7 other Monks), “has a fan-club”   But I n-e-v-e-r respond to any post here as (as the NodeReaper just told me) “puerile trolling.”

Get over it.™ When the dust finally settled on this “interesting problem,” it turns out to be not interesting at all.   The bit-strings being sought are apparently “millions of bits” long, in a buffer of “billions of bits.” That’s not “an interesting problem.”   That’s hardly a problem at all.   And, that is exactly what I said.

If you have “a million bits,” then these bits must align with some boundary that it is convenient for the microprocessor to handle most-efficiently ... and, for a 64-bit system, that boundary is “64 bits.”   Therefore, there are exactly 64 possible “shifts” of that million-bit quantity before you know exactly what value must occur in the second 64-bit word, or the 100,000th and so on.   The “interesting bit-string problem has reduced itself a non-problem, precisely because you know that the “value being sought” is about 15,000 quadwords long, and you know the value that must occur at any of those positions.   If you search for the expected value for position #2, then directly test offsets #1,000 and #15,000 and find the expected answer ... you have your answer.   All that remains is to confirm it.

Like it or not, and, “XP points or not,” I have handed you the best solution to this problem in this case.   I’m not part of your Fan Club.   In fact, I am probably the crazy-uncle.   But, in the context of the problem as it eventually has been described, here is your solution.

Now, please, with my blessings, go ahead and Reap this node, too.   Hope that the Queen isn’t listening in.

  • Comment on Re: [OT] The interesting problem of comparing bit-strings.

Replies are listed 'Best First'.
Re^2: [OT] The interesting problem of comparing bit-strings.
by Anonymous Monk on Mar 27, 2015 at 17:28 UTC

    Show us the code.

Re^2: [OT] The interesting problem of comparing bit-strings.
by BrowserUk (Pope) on Mar 27, 2015 at 19:13 UTC
    I have handed you the best solution to this problem in this case.

    You haven't handed anyone here anything. Ever! Except, dubious council & mal-advice, technical buffoonery, the rare scrap of broken code, and eye-ache.

    And you certainly have handed me, nor even described, "a solution" to anything.

    What you have done in this post, after 4 (or is it 5? Or 6?) attempts -- now you finally dropped all mention of REP SCASB|W|D; which was your only unique, though entirely broken, contribution to this thread -- is to hand-wavely, approximately describe something vaguely akin to what was already better described in my OP, way back up there. Ie. You need to compare every 64-bit value at every one of the 64-bit offsets! There is no shortcut. And I wasn't looking for one.

    But then, as always, you go and screw it all up with this contradictory, non-sequitous garbage: "The “interesting bit-string problem has reduced itself a non-problem, precisely because you know that the “value being sought” is about 15,000 quadwords long, and you know the value that must occur at any of those positions. If you search for the expected value for position #2, then directly test offsets #1,000 and #15,000 and find the expected answer ... you have your answer. All that remains is to confirm it.";

    That simple has no useful interpretation. So once again, you crash and burn.

    What you've also done is totally pollute this thread -- as with so many others previously -- such that your garbage, and my refutation of it, has rendered nil, almost all interest in the actual problem I wanted help -- not your spurious and pointless speculations -- in solving.

    Your continued need to stick your oar in where its not wanted, -- and you've been told, repeatedly, that its not wanted -- and to suffer the humiliation of being shown -- yet again -- that your attempts at technical contributions here are nothing more than a vacuous pretense of some kind of technical knowledge; simply corrupts the nature and purpose of this place.

    You neither disseminate learning; nor acquire any. Your 'contributions' here are all, entirely negative. And your persistence in vomiting them in our direction is far more offensive and "rude" than any "bad words" I might have used.

    And your, entirely puerile, attempts to offend me by mentioning the British Royals is hilarious. I couldn't give two hoots what you say about them.

    (Be careful what you say; Brangalina might be listening!)


    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". I'm with torvalds on this
    In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked
Re^2: [OT] The interesting problem of comparing bit-strings.
by salva (Abbot) on Mar 27, 2015 at 21:26 UTC
    The funny think here, is that you are almost right. There are better ways to search for a bitstring than just the brute-force one.

    Unfortunately, that one you are "outlining" is not one of them. Also, you should have already learned that you can not trust your instinct about probabilistic matters (well, at least, not about that).

      There are better ways to search for a bitstring than just the brute-force one.

      Care to expand?


      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". I'm with torvalds on this
      In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked
        Several (most?) string-search algorithms can be adapted to work on bitstrings. For instance, if your data is mostly random, Boyer-Moore is going to perform quite well and eliminate most of the bitstring comparisons.
Re^2: [OT] The interesting problem of comparing bit-strings.
by Anonymous Monk on Mar 28, 2015 at 08:44 UTC

    sundialsvc4: I’m not part of your Fan Club. In fact, I am probably the crazy-uncle.

    So you're trying to say you're family , that you could be his daddy?

    How rude

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2019-10-21 04:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?