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 combinations with repetition consist in generating the list of all possible combinations with elements that can be repeated.

Example:A,B,C items are shuffled in 6 couples of 2 items: A,AA,BA,CB,BB,C, C,C. Without repetition, there would be only 3 couples A,B, A,C et B,C.

The sets of n elements are called tuples: {1,2} or {1,2,3} are tuples.

How to count combinations with repetition?

Counting repeated combinations of k items (sometimes called k-combination) in a list of N is noted $ \Gamma_n^k $ and $$ \Gamma_n^k = {n+k-1 \choose k} = \frac{(n+k-1)!}{k! (n-1)!} $$

The number of combinations with repeats of $ k $ items among $ N $ is equal to the number of combinations without repeats of $ k $ items among $ N + k - 1 $.

How to remove the limit when computing combinations?

The calculation of the combinations generates an exponential number of values and the generator requires large calculation power on servers, these generations have therefore a cost (ask for a quote).

Source code

dCode retains ownership of the online 'Combinations with Repetition' tool source code. Except explicit open source licence (indicated CC / Creative Commons / free), any 'Combinations with Repetition' algorithm, applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, translator), or any 'Combinations with Repetition' function (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) and no data download, script, copy-paste, or API access for 'Combinations with Repetition' will be for free, same for offline use on PC, tablet, iPhone or Android ! dCode is free and online.

Need Help ?

Please, check our dCode Discord community for help requests! NB: for encrypted messages, test our automatic cipher identifier!

Questions / Comments

Thanks to your feedback and relevant comments, dCode has developed the best 'Combinations with Repetition' tool, so feel free to write! Thank you!

Thanks to your feedback and relevant comments, dCode has developed the best 'Combinations with Repetition' tool, so feel free to write! Thank you!