Found 2 hits - Term: bogo-sort, Database: *, Strategy: exact
- [1] : Jargon File (4.3.1, 29 Jun 2001)
bogo-sort /boh`goh-sort'/ n. var. `stupid-sort' the archetypical
perversely awful algorithm as opposed to bubble sort, which is merely
the generic _bad_ algorithm. bogo-sort is equivalent to repeatedly
throwing a deck of cards in the air, picking them up at random, and then
testing whether they are in order. it serves as a sort of canonical
example of awfulness. looking at a program and seeing a dumb algorithm,
one might say "oh, i see, this program uses bogo-sort." esp. appropriate
for algorithms with factorial or super-exponential running time in the
average case and probabilistically infinite worst-case running time.
compare bogus, brute force, lasherism.
a spectacular variant of bogo-sort has been proposed which has the
interesting property that, if the many worlds interpretation of quantum
mechanics is true, it can sort an arbitrarily large array in linear
time. in the many-worlds model, the result of any quantum action is to
split the universe-before into a sheaf of universes-after, one for each
possible way the state vector can collapse; in any one of the
universes-after the result appears random. the steps are: 1. permute
the array randomly using a quantum process, 2. if the array is not
sorted, destroy the universe checking that it is sorted requires on
time. implementation of step 2 is left as an exercise for the reader.
see also:
bubble sort bogus brute force lasherism
- [2] : The Free On-line Dictionary of Computing (27 SEP 03)
bogo-sort
/boh"goh-sort"/ or "stupid-sort" the
archetypical perversely awful algorithm as opposed to
bubble sort, which is merely the generic bad algorithm.
bogo-sort is equivalent to repeatedly throwing a deck of cards
in the air, picking them up at random, and then testing
whether they are in order. it serves as a sort of canonical
example of awfulness. looking at a program and seeing a dumb
algorithm, one might say "oh, i see, this program uses
bogo-sort."
also known as "monkey sort" after the infinite monkey
theorem.
compare brute force, lasherism.
an implementation http://www.stdout.org/~adam/psort.
jargon file
2002-04-07
see also:
algorithm bubble sort infinite monkey theorem brute force lasherism lt;an implementationgt; jargon file
Results 1 - 1 of 1 found about bogo-sort: Bogo-Sort
>> B Words
Bogo-Sort, definition of term: Bogo-Sort
bogo-sort_pag1.html
Last accessed:2008/10/13 13:57:50 [Total processing time: 2 seconds] |