-
MathType
-
Wiris Quizzes
-
Learning Lemur
-
CalcMe
-
MathPlayer
-
Store FAQ
-
VPAT for the electronic documentation
-
MathFlow
-
BF FAQ
Permutations with repetition
Reading time: 1minComputes the number of permutations with repetitions. That is, given a non-negative integer n and a sequence of one or more additional non-negative integers n1,...,nr such that n1+⋯+nr=n, this functions returns the number of permutations for n elements taken from r different elements and such that the i-th element repeats ni times.
Syntax
permutations_with_repetition(Integer, Integer, ..., Integer)
permutations_with_repetition(Integer, List | Vector)
Description
Given an integer n and a set of integers n1,...,nr satisfying the conditions above, computes the number of permutations for n elements taken from r different elements and such that the i-th element repeats ni times.
Given an integer n and a list or vector of n elements, comprised of r different elements and such that the i-th element repeats ni times, returns a list of all the different distinct permutations (in lexicographical order).