Difference between revisions of "Documentation/How Tos/Calc: PERMUT function"
From Apache OpenOffice Wiki
< Documentation | How Tos
(Initial content) |
(→Syntax:: image) |
||
Line 9: | Line 9: | ||
: where <tt>'''n'''</tt> and <tt>'''k'''</tt> are integers. | : where <tt>'''n'''</tt> and <tt>'''k'''</tt> are integers. | ||
− | : <tt>'''PERMUT'''</tt> returns the number of ordered ways that <tt>'''k'''</tt> objects can be chosen from a set of <tt>'''n'''</tt> objects. For example with a set of 3 objects A, B, C, we can choose 2 as follows: AB, AC, BA, BC, CA, CB. | + | : <tt>'''PERMUT'''</tt> returns the number of ordered ways that <tt>'''k'''</tt> objects can be chosen from a set of <tt>'''n'''</tt> objects, where an object can only be chosen once. For example with a set of 3 objects A, B, C, we can choose 2 as follows: AB, AC, BA, BC, CA, CB. |
: <tt>'''PERMUT'''</tt> calculates: | : <tt>'''PERMUT'''</tt> calculates: | ||
− | + | : [[Image:Calc_permut_formula.png]] | |
=== Example: === | === Example: === |
Revision as of 05:34, 8 April 2008
PERMUT
Returns the number of permutations for a given number of objects.
Syntax:
PERMUT(n; k)
- where n and k are integers.
- PERMUT returns the number of ordered ways that k objects can be chosen from a set of n objects, where an object can only be chosen once. For example with a set of 3 objects A, B, C, we can choose 2 as follows: AB, AC, BA, BC, CA, CB.
- PERMUT calculates:
Example:
PERMUT(3; 2)
- returns 6, as in the example above.
See also:
Issues:
- The forthcoming international standard ODFF expects n and k to be integers. Both Calc and Excel truncate any non-integer parameter.