Tool to generate/count permutations with repetition. In Mathematics, a permutation with repetitions is an arrangement of items which can be repeated in various orders.
Permutations with Repetition - dCode
Tag(s) : Combinatorics
dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
Item permutations with repetition consist in the list of all possible arrangements of elements (which can be repeated) in any order.
Example: A,B,C items be shuffled in 9 couples of 2 items: A,A A,B A,C B,A B,B B,C, C,A, C,B, C,C. The order of the items does matter (A,B and B,A are counted as 2 distinct permutations).
Sets of n items are called tuples.
The generation of permutations with repetitions can be carried out using several methods:
— From combinations with repetitions: for each combination with repetitions, generate their permutations. The set obtained is the list of permutations with repetition.
— From the combinations of choices: all the elements constitute a multiple choice, a permutation of size n is then a questionnaire of n questions with multiple choice. The set of choice combinations represents the list of permutations with repetition.
Counting permutations with repetition of $ k $ items in a list of $ N $ items is $ N^k $
Example: There are $ 3^2 = 9 $ groups of permutations with repetition of $ 2 $ elements among $ 3 $.
In mathematics, the Cartesian product of N identical sets is equivalent to the generation of permutations with repetitions of N elements.
Example: {1, 2, 3} x {1, 2, 3} returns the set of 9 permutations: (1, 1), (1, 2), (1, 3), (2, 1), (2, 2), (2, 3), (3, 1), (3, 2), (3, 3)
dCode retains ownership of the "Permutations with Repetition" source code. Any algorithm for the "Permutations with Repetition" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Permutations with Repetition" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "Permutations with Repetition" or any other element are not public (except explicit open source licence like Creative Commons). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.
The content of the page "Permutations with Repetition" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source.
Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).
To cite dCode.fr on another website, use the link:
In a scientific article or book, the recommended bibliographic citation is: Permutations with Repetition on dCode.fr [online website], retrieved on 2025-04-16,