Answers to Questions
What is a permutation? (Definition)
Item permutations consist in the list of all possible arrangements and ordering of elements in any order.
Example: A,B,C can be shuffled in 6 ways: A,B,C B,A,C C,A,B A,C,B B,C,A C,B,A
For partial permutations (A,B among A,B,C) see arrangements.
How to generate permutations?
The best known method is the Heap algorithm.
Step 1 - for each item, fix it at the beginning
Step 2 - repeat step 1 with the rest
Permutations can thus be represented as a tree of permutations:
How to count permutations?
How to count distinct permutations?
Having a repeated item involves a division of the number of permutations by the number of permutations of these repeated items.
Example: DCODE 5 letters have $ 5! = 120 $ permutations but contain the letter D twice (these $ 2 $ letters D have $ 2! $ permutations), so divide the total number of permutations $ 5! $ by $ 2! $: $ 5!/2!=60 $ distinct permutations.
How to remove the limit when computing permutations?
Permutations makes exponential values witch needs huge computing servers with huge memory cells, so the generation must be paid.