Documentation/Calc Functions/PERMUT
TDF LibreOffice Document Liberation Project Community Blogs Weblate Nextcloud Redmine Ask LibreOffice Donate
Function name:
PERMUT
Category:
Statistical Analysis
Summary:
Calculates the number of ordered permutations when choosing a subset of objects from a collection (without repetition).
Syntax:
PERMUT(Count 1; Count 2)
Returns:
Returns a positive integer that is the number of permutations (without repetition) for the given arguments.
Arguments:
Count 1 is a non-negative integer, or a reference to a cell containing that number, that is the total number of objects in the collection.
Count 2 is a non-negative integer, or a reference to a cell containing that number, that is the number of objects to be chosen from the collection. Count 2 must not be greater than Count 1.
- If either Count 1 or Count 2 is non-numeric, then PERMUT reports a #VALUE! error.
- If either Count 1 or Count 2 is a non-integer value, then PERMUT truncates it to an integer value.
- If either Count 1 or Count 2 is less than 0, then PERMUT reports an invalid argument error (Err:502).
- If Count 1 is less than Count 2, then PERMUT reports an invalid argument error (Err:502).
Additional details:
- The formula for calculating the number of permutations without repetition is:
- [math]\displaystyle{ P(n, k)\:=\:\frac{n!}{(n-k)!} }[/math]
- where n is the total number of items in the collection and k is the number of items in the subset to be selected.
- Instead of the notation [math]\displaystyle{ P(n, k) }[/math] used in the above formula, the notations [math]\displaystyle{ ^nP_k }[/math] and [math]\displaystyle{ _nP_k }[/math] are sometimes used.
- For more information about permutations, visit Wikipedia's Permutation page.
Examples:
Formula | Description | Returns |
---|---|---|
=PERMUT(A1; A2) where cells A1 and A2 contain the values 7 and 3 respectively. | There are 210 different ways to select a sequence of three playing cards from a hand of seven playing cards (without repetition). Note that the formula =PERMUT(7.6; 3.9) returns the same result because the non-integer argument values are truncated to integers. |
210 |
=PERMUT(4; 2) | Given a collection of the four letters 'A', 'B', 'C', and 'D', there are 12 ways to choose two letters (without repetition). The 12 possibilities are 'AB', 'AC', 'AD', 'BA', 'BC', 'BD', 'CA', 'CB', 'CD', 'DA', 'DB', and 'DC'. | 12 |
=PERMUT(0; 0) | Although not a particularly useful feature, this formula returns the value 1 – a consequence of the mathematical definition of 0!. The formula =PERMUT(1; 1) also returns 1. |
1 |
Related LibreOffice functions:
ODF standard:
Related (or similar) Excel functions:
PERMUT