Cyclic Permutations: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{DISPLAYTITLE:Cyclic Permutations (Generating Random Permutations)}} == 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 == <pre>n: number of elements</pre> == Table of Algorithms == {| class="wikitable sortable" style="text-align:center;" width="100%" ! Name !! Year !! Time !! Space !! Approximation...") |
No edit summary |
||
(5 intermediate revisions by the same user not shown) | |||
Line 10: | Line 10: | ||
== Parameters == | == Parameters == | ||
$n$: number of elements | |||
== Table of Algorithms == | == Table of Algorithms == | ||
Line 24: | Line 24: | ||
|} | |} | ||
== Time Complexity | == Time Complexity Graph == | ||
[[File:Generating Random Permutations - Cyclic Permutations - Time.png|1000px]] | [[File:Generating Random Permutations - Cyclic Permutations - Time.png|1000px]] | ||
Latest revision as of 09:07, 28 April 2023
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
Error creating thumbnail: Unable to save thumbnail to destination