Skip to main content

Variations

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

Syntax

variations(Integer, Integer)
variations(List | Vector, Integer)

Description

Given two integers nn and kk, nk, computes all possible arrangements described above.

combinatorics.variations1.calc.png

Given a list or a vector with nn elements and kk, nkn \geq k, returns a list with all the kk-subsets.

combinatorics.variations2.calc.png