0x4E4F@infosec.pub to Programmer Humor@programming.devEnglish · 14 hours agoNot my problem sortinfosec.pubimagemessage-square37fedilinkarrow-up1515arrow-down18
arrow-up1507arrow-down1imageNot my problem sortinfosec.pub0x4E4F@infosec.pub to Programmer Humor@programming.devEnglish · 14 hours agomessage-square37fedilink
minus-squareBatmanAoD@programming.devlinkfedilinkarrow-up116·14 hours agoReminds me of quantum-bogosort: randomize the list; check if it is sorted. If it is, you’re done; otherwise, destroy this universe.
minus-squareZaphod@discuss.tchncs.delinkfedilinkarrow-up18·8 hours ago The creation and destruction of universes is left as an exercise to the reader
minus-squareBatmanAoD@programming.devlinkfedilinkarrow-up2·1 hour agoCreation is easy, assuming the many-worlds interpretation of quantum mechanics!
minus-squareNaN@lemmy.worldlinkfedilinkarrow-up14·10 hours agoInstead of destroying the universe, can we destroy prior, failed shuffle/check iterations to retain o(1)? Then we wouldn’t have to reload all of creation into RAM.
minus-squareBatmanAoD@programming.devlinkfedilinkarrow-up4·8 hours agoDelete prior iterations of the loop in the same timeline? I’m not sure there’s anything in quantum mechanics to permit that…
minus-squarexmunk@sh.itjust.workslinkfedilinkarrow-up75·14 hours agoGuaranteed to sort the list in nearly instantaneous time and with absolutely no downsides that are capable of objecting.
minus-squarefrezik@midwest.sociallinkfedilinkarrow-up38·13 hours agoYou still have to check that it’s sorted, which is O(n). We’ll also assume that destroying the universe takes constant time.
minus-squareBenjaben@lemmy.worldlinkfedilinkarrow-up6·8 hours ago We’ll also assume that destroying the universe takes constant time. Well yeah just delete the pointer to it!
minus-squareBatmanAoD@programming.devlinkfedilinkarrow-up31·12 hours agoIn the universe where the list is sorted, it doesn’t actually matter how long the destruction takes!
minus-squaregroet@feddit.orglinkfedilinkEnglisharrow-up7·8 hours agoIt actually takes a few trillion years but its fine because we just stop considering the “failed” universes because they will be gone soon™ anyway.
minus-squarevithigar@lemmy.calinkfedilinkarrow-up14·13 hours agoExcept you missed a bug in the “check if it’s sorted” code and it ends up destroying every universe.
minus-squaredb2@lemmy.worldlinkfedilinkarrow-up5·12 hours agoThere’s a bug in it now, that’s why we’re still here.
minus-squarefrezik@midwest.sociallinkfedilinkarrow-up2·13 hours agoSince randomizing the list increases entropy, it could theoretically make your cpu cooler just before it destroys the universe.
Reminds me of quantum-bogosort: randomize the list; check if it is sorted. If it is, you’re done; otherwise, destroy this universe.
Creation is easy, assuming the many-worlds interpretation of quantum mechanics!
Instead of destroying the universe, can we destroy prior, failed shuffle/check iterations to retain o(1)? Then we wouldn’t have to reload all of creation into RAM.
Delete prior iterations of the loop in the same timeline? I’m not sure there’s anything in quantum mechanics to permit that…
Guaranteed to sort the list in nearly instantaneous time and with absolutely no downsides that are capable of objecting.
You still have to check that it’s sorted, which is O(n).
We’ll also assume that destroying the universe takes constant time.
Well yeah just delete the pointer to it!
In the universe where the list is sorted, it doesn’t actually matter how long the destruction takes!
It actually takes a few trillion years but its fine because we just stop considering the “failed” universes because they will be gone soon™ anyway.
Eh, trillion is a constant
amortized O(0)
Except you missed a bug in the “check if it’s sorted” code and it ends up destroying every universe.
There’s a bug in it now, that’s why we’re still here.
deleted by creator
Since randomizing the list increases entropy, it could theoretically make your cpu cooler just before it destroys the universe.