Skip to main content

Variations with repetition

Variations with repetition are the different ordered arrangements of a k-element subset of an n-set, allowing repetitions.

Syntax

variations_with_repetition(Integer, Integer)
variations_with_repetition(List | Vector, Integer)

Description

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

combinatorics.variations_with_repetition1.calc.png

Given a list and a vector with nn elements, returns a list with all the kk-subsets.

combinatorics.variations_with_repetition2.calc.png