Variations

Variations or k-permutations of n are the different ordered arrangements of a kLaTeXk-element subset of an nLaTeXn-set.

Syntax

variations(Integer, Integer)
 Vector, Integer)

Description

Given two integers nLaTeXn and kLaTeXk, nk, computes all possible arrangements described above.

combinatorics.variations1.calc.png

Given a list or a vector with nLaTeXn elements and kLaTeXk, nkLaTeXn \geq k, returns a list with all the kLaTeXk-subsets.

combinatorics.variations2.calc.png