44 ms·
This seems completely pointless. The elegance of bogosort is that it's an extremely simple algorithm, with a simple description of "randomize until it's sorted"
by eridius 13y ago
This seems completely pointless. The elegance of bogosort is that it's an extremely simple algorithm, with a simple description of "randomize until it's sorted". Bogobogosort is complicated for no apparent reason. It's trying to be cute and clever, but there's no rationale for why additional complexity is being added.
Bogobogosort seems in the end to be no more worthwhile than sleepybogosort, where you must sleep() in between every operation.
- deletes 13y agoNo, since the complexity of bogosort with sleep is still O(n!), while the algorithm from OP has a higher bound.
- eridius 13y agoDepends on how you do the sleeps.
- egypturnash 13y agoI think half the point of this is the straight-faced, detailed examination of exactly how terrible this proposed sort is. Or at least that's the part that made me start giggling...
- elwell 13y agoIf all you have is a hammer, everything looks like a nail. It's for this reason that computer scientists created bogobogosort (and sleepybogosort, as you mentioned). For example, bogobogosort tests memory cards more efficiently than a smaller-space algorithm like bogosort. In this case, the recursive nature of bogobogosort acts as space multiplier and fully fills the memory cards (be it DIMM or others). Don't be so quick to judge an algorithm just because it's new. Also, I'm working on a Bogo programming language with randomized compilation; if anyone is interested in contributing, let me know.