|
PermutationsA with repetition
|
|
Returns the number of permutations with repetition for a given number of
objects.
syntax
PermutationsA(number_all_objects [; repeat_object1; repeat_object2;...])
returns
integer number >= 0
info
- given numbers are convert into integer numbers
- number_all_objects must be greater or equal than sum of all objects repetitions
Formula of the function: n!/(k1!*k2!*...*kn!)
example
PermutationsA(18;5;3;4) = 370507737600
example 2
How much different words (sense is not required) can we create using all letters
of word "mathematics".
Word "mathematics" has 11 letters (that is number_objects=11).
Repetitions of letters:
- letter "m" - repeats itself 2 times (mathematics) repeat_object1=2
- letter "a" - repeats itself 2 times (mathematics) repeat_object2=2
- letter "t" - repeats itself 2 times (mathematics) repeat_object3=2
Other letters are not repeat itself.
solution
PermutationsA(11;2;2;2) = 4989600
answer
We can create 4989600 different words.
notice
- If none of letters are
not repeat (e.g. "home") use function Permutations