4 ms·
Would it be possible?
by l9k 9y ago
Would it be possible?
- Smaug123 9y agoProbably. There are only 2^64 possible hash values (Mathematica's Hash function, with no method specified, produces a 32- or 64-bit output depending on platform), and there are many more strings than that which could reasonably be called a "paragraph". It's pretty reasonable to hope that there's a self-describing paragraph out there somewhere.
- repsilat 9y agoHah, "could in theory" vs "could in practice" -- depending on the hash function, it could take hundreds or thousands of processor-years. Maybe Google could do it. http://m.wolframalpha.com/input/?i=2%5E64+things+%2F+%281+billion+things+%2F+second%29+in+years http://m.wolframalpha.com/input/?i=2%5E64+things+%2F+%281+bi...
- bluesign 9y agoActually for any given paragraph, probabilty of hash(paragraph+hash) = hash is pretty high.
- svantana 9y agoYou mean that there exists at least one hash such that hashFunc(paragraph+hash) = hash? Yup, that probability converges to 1-exp(-1) = 63%. So it's no guarantee, but if you have some wiggle room in the paragraph (change the wording slightly etc) you can probably make it work.
- notfed 9y agoIt looks that the default Hash implementation depends on whether the system is 32-bit or 64-bit [1]. It's also not clearly documented what the default implementation of Hash really is. On a 32-bit system, yes, someone could probably do it. [1] https://mathematica.stackexchange.com/a/124340 https://mathematica.stackexchange.com/a/124340
- xamuel 9y agoGiven that they control the hash function, it would be trivial: hard-code a special exception value for exactly that purpose.