Sorting the Slow Way: Perversely Awful Randomized Sorting Algorithms (2007) [pdf]
hermann-gruber.com
hermann-gruber.com
1) Randomise list
2) if list not in correct order, destroy the universe
The universe that's left will have the correct answer.
https://gist.github.com/SpComb/b8c722abde2b04a94b14
And specific choices of random seed also have some impact :)
To be pedantic (and why not), I don't think that the procedures described in the paper strictly qualify as algorithms because there's no guarantee of termination. That's part of the fun, of course.
I don't think that's part of the description of 'algorithm' (although I don't know if the word has a technical definition, so that we may be left arguing about how we use the word personally). Otherwise, there could be no algorithm for listing all the natural numbers, for example.
I have seen definitions both with and without the requirement for a halting state.
Fortunately someone will be along shortly to explain it properly.
Certainly I have never seen a definition (of an algorithm, rather than, say, a total language) that builds in that requirement; otherwise, what would be the objects considered in the halting problem? By this definition, they couldn't just be algorithms, or else "RETURN TRUE" would be a correct decision procedure.
Of course, in this age of cloud computing, we really should be using more modern terrible sorting techniques such as stacksort: https://gkoberger.github.io/stacksort/
while not sorted:
swap(a[rand(n)], a[rand(n)])