generatePermutations function

Generate all permutations of (1, ..., K)

Generate all permutations of (1, ..., K)

It generates a matrix containing all permutations of (1, ..., K).

generatePermutations(K)

Arguments

  • K: integer value of KK.

Returns

A matrix of dimension K!xKK! x K with generated permutations in rows.

Author(s)

Arnošt Komárek arnost.komarek@mff.cuni.cz

Examples

generatePermutations(1) generatePermutations(2) generatePermutations(3) generatePermutations(4)