Documentation/Calc Functions/PERMUTATIONA

    From The Document Foundation Wiki
    This page contains changes which are not marked for translation.

    Function name:

    PERMUTATIONA

    Category:

    Statistical Analysis

    Summary:

    Calculates the number of ordered permutations when choosing a subset of objects from a collection (with repetition permitted).

    Syntax:

    PERMUTATIONA(Count 1; Count 2)

    Returns:

    Returns a positive integer that is the number of permutations (with repetition permitted) 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.

    • If either Count 1 or Count 2 is non-numeric, then PERMUTATIONA reports a #VALUE! error.
    • If either Count 1 or Count 2 is a non-integer value, then PERMUTATIONA truncates it to an integer value.
    • If either Count 1 or Count 2 is less than 0, then PERMUTATIONA reports an invalid argument error (Err:502).

    Additional details:

    • The formula for calculating the number of permutations with repetition is:
    [math]\displaystyle{ P(n, k)\:=\: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.
    • For more information about permutations, visit Wikipedia's Permutation page.

    Examples:

    Formula Description Returns
    =PERMUTATIONA(A1; A2) where cells A1 and A2 contain the values 7 and 3 respectively. There are 343 different ways to select a sequence of three playing cards from a hand of seven playing cards (with repetition). Note that the formula =PERMUTATIONA(7.6; 3.9) returns the same result because the non-integer argument values are truncated to integers. 343
    =PERMUTATIONA(4; 2) Given a collection of the four letters 'A', 'B', 'C', and 'D', there are 16 ways to choose two letters (with repetition). The 16 possibilities are 'AA', 'AB', 'AC', 'AD', 'BA', 'BB', 'BC', 'BD', 'CA', 'CB', 'CC', 'CD', 'DA', 'DB', 'DC', and 'DD'. 12
    =PERMUTATIONA(0; 0) Although not a particularly useful feature, this formula returns the value 1. The formula =PERMUTATIONA(1; 1) returns the same result. 1
    =PERMUTATIONA(2; 3) Unlike the PERMUT function, PERMUTATIONA accepts cases where the Count 2 argument is greater than Count 1. 8

    Related LibreOffice functions:

    COMBIN

    COMBINA

    PERMUT

    ODF standard:

    Section 6.18.60, part 2

    Related (or similar) Excel functions:

    PERMUTATIONA since v.2013.