Tool to count and generate partial k-permutations. In Mathematics, a partial permutation (or k-permutation) is an ordered list of items. It consists in permutations of each combination.

K-Permutations - 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*!

A **partial permutation** of k items out of n consist in the list of all possible permutation of each combination of k out of n.

__Example:__ 2 items among 3 (A,B,C) can be shuffled in 6 ways: A,B A,C B,A B,C C,A C,B

In a k-permuation the notion of order is important A,B is different from B,A, contrary to combinations.

The counting of the permutations uses combinatorics and factorials

__Example:__ For k items out of n, the number of k-permutations is equal to $$ n!/(n-k)! $$

In counting/combinatorial, the k-permutations are used to count the cases where $ k $ elements are selected from among $ n $ when the order matters.

__Example:__ Number of podium of 3 horses among 20 participants in a horse race: 20 * 19 * 18 = 6840 possibilities

__Example:__ Number of routes passing through 5 French cities (35,000 municipalities): 52506870250563750840000 separate routes

__Example:__ Number of sentences of 10 words in the dictionary (100,000 words): 99955008699055063270306822366827310265723712000000 possible sentences

The list is infinite, here are some examples:

A(2,3) | 6 arranged subsets | (1,2)(2,1)(1,3)(3,1)(2,3)(3,2) |

A(2,4) | 12 arranged subsets | (1,2)(2,1)(1,3)(3,1)(1,4)(4,1)(2,3)(3,2)(2,4)(4,2)(3,4)(4,3) |

A(2,5) | 20 arranged subsets | (1,2)(2,1)(1,3)(3,1)(1,4)(4,1)(1,5)(5,1)(2,3)(3,2)(2,4)(4,2)(2,5)(5,2)(3,4)(4,3)(3,5)(5,3)(4,5)(5,4) |

A(2,6) | 30 arranged subsets | (1,2)(2,1)(1,3)(3,1)(1,4)(4,1)(1,5)(5,1)(1,6)(6,1)(2,3)(3,2)(2,4)(4,2)(2,5)(5,2)(2,6)(6,2)(3,4)(4,3)(3,5)(5,3)(3,6)(6,3)(4,5)(5,4)(4,6)(6,4)(5,6)(6,5) |

A(3,4) | 24 arranged subsets | (1,2,3)(2,1,3)(3,1,2)(1,3,2)(2,3,1)(3,2,1)(1,2,4)(2,1,4)(4,1,2)(1,4,2)(2,4,1)(4,2,1)(1,3,4)(3,1,4)(4,1,3)(1,4,3)(3,4,1)(4,3,1)(2,3,4)(3,2,4)(4,2,3)(2,4,3)(3,4,2)(4,3,2) |

**Partial permutations** need exponential resources of computer time, so the generation must be paid.

dCode retains ownership of the online 'K-Permutations' tool source code. Except explicit open source licence (indicated CC / Creative Commons / free), any 'K-Permutations' algorithm, applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, translator), or any 'K-Permutations' 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 'K-Permutations' will be for free, same for offline use on PC, tablet, iPhone or Android ! dCode is free and online.

Please, check our dCode Discord community for help requests!

NB: for encrypted messages, test our automatic cipher identifier!

arrangement,permutation,combination,counting,order,combinatorics

Source : https://www.dcode.fr/partial-k-permutations

© 2021 dCode — The ultimate 'toolkit' to solve every games / riddles / geocaching / CTF.

Feedback

▲
Thanks to your feedback and relevant comments, dCode has developed the best 'K-Permutations' tool, so feel free to write! Thank you!