Cyclic Permutations (Generating Random Permutations)

From Algorithm Wiki
Revision as of 15:44, 15 February 2023 by Admin (talk | contribs)
Jump to navigation Jump to search

Description

Given an input string/array, generate a single random cyclic permutation of the characters/elements of the string/array.

Related Problems

Related: General Permutations

Parameters

n: number of elements

Table of Algorithms

Name Year Time Space Approximation Factor Model Reference
Sattolo's algorithm 1986 $O(n)$ $O({1})$ Exact Randomized Time

Time Complexity Graph

Generating Random Permutations - Cyclic Permutations - Time.png

Space Complexity Graph

Generating Random Permutations - Cyclic Permutations - Space.png

Time-Space Tradeoff

Generating Random Permutations - Cyclic Permutations - Pareto Frontier.png