All Permutations: Difference between revisions

From Algorithm Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 24: Line 24:
|}
|}


== Time Complexity graph ==  
== Time Complexity Graph ==  


[[File:All Permutations - Time.png|1000px]]
[[File:All Permutations - Time.png|1000px]]


== Space Complexity graph ==  
== Space Complexity Graph ==  


[[File:All Permutations - Space.png|1000px]]
[[File:All Permutations - Space.png|1000px]]


== Pareto Decades graph ==  
== Pareto Frontier Improvements Graph ==  


[[File:All Permutations - Pareto Frontier.png|1000px]]
[[File:All Permutations - Pareto Frontier.png|1000px]]

Revision as of 13:04, 15 February 2023

Description

Generate all permuttaions of the characters/elements in a string/array.

Parameters

n: number of elements

Table of Algorithms

Name Year Time Space Approximation Factor Model Reference
Steinhaus–Johnson–Trotter algorithm 1963 $O(n)$ on specific permutations $O({1})$ auxiliary Exact Deterministic Time
Tompkins–Paige algorithm 1956 $O(n)$ on specific permutations $O(n)$ auxiliary Exact Deterministic Time
Heap's algorithm 1963 $O(n)$ per permutation $O(n)$ auxiliary Exact Deterministic Time

Time Complexity Graph

Error creating thumbnail: Unable to save thumbnail to destination

Space Complexity Graph

Error creating thumbnail: Unable to save thumbnail to destination

Pareto Frontier Improvements Graph

Error creating thumbnail: Unable to save thumbnail to destination