Computing Atlas

How Computing Was Built
Sign In
Text size
100%
Theme
Algorithm

Bogosort

Sorting Algorithm

Bogosort, also known as permutation sort or stupid sort, is a sorting algorithm in computer science based on the generate-and-test paradigm, in which the function successively generates permutations of its input until it finds one that is already sorted. It is not considered useful for sorting in practice but is used for educational purposes to contrast it with more efficient algorithms, and its name is a portmanteau of bogus and sort. Two versions exist: a deterministic version that enumerates every permutation until it finds a sorted one, and a randomized version that repeatedly permutes the input at random and checks whether it is sorted, an approach comparable to sorting a deck of cards by throwing it into the air and picking the cards up at random until they happen to land in order.

Facts
Time Complexity
Time Complexity (category)
Factorial Time -- O(n!) 2
Classification
Design Technique
Randomized 1
Connections

In Field

Source Bogosort (Wikipedia)

Uses Design Technique

Entity-backed identity for the design-technique enum value this algorithm already carries, resolved to a computing concept by an explicit value-to-entity map (phase 3 bucket conversion, docs\design_entity_backed_browse_buckets_20260928.md). The design-technique fact itself stays on the algorithm unchanged.

Sources
1. Bogosort (Wikipedia)
  • Wikipedia lead/infobox
    deterministic version that enumerates all permutations until it hits a sorted one, and a randomized version that randomly permutes its input and checks whether it is sorted. An analogy for
  • In Field: Algorithms and Complexity Theory, Lead sentence
    bogosort (also known as permutation sort and stupid sort) is a sorting algorithm based on the generate and test paradigm.
View the Source
2. Bogosort (Wikipedia)
Wikipedia article body, read for Browse By backfill (w-bbfill-computing6-0927)
Comments (0)
No comments yet. Be the first to share a thought.
Reader Challenges (0)
No disputes yet. Spotted an error or a better source? Open the first one.