Difference between revisions of "Documentation/How Tos/Calc: COMBINA function"
From Apache OpenOffice Wiki
< Documentation | How Tos
(→See also:) |
OOoWikiBot (Talk | contribs) m (Robot: Automated text replacement %s) |
||
Line 23: | Line 23: | ||
: returns <tt>'''10'''</tt>. | : returns <tt>'''10'''</tt>. | ||
− | + | {{Documentation/SeeAlso| | |
− | + | * [[Documentation/How_Tos/Calc: COMBIN function|COMBIN]] | |
− | + | * [[Documentation/How_Tos/Calc: PERMUT function|PERMUT]] | |
− | + | * [[Documentation/How_Tos/Calc: PERMUTATIONA function|PERMUTATIONA]]''' | |
− | + | * [[Documentation/How_Tos/Calc: Mathematical functions|Mathematical functions]]''' | |
− | [[Documentation/How_Tos/Calc: Functions listed alphabetically| | + | * [[Documentation/How_Tos/Calc: Functions listed alphabetically|Functions listed alphabetically]] |
− | [[Documentation/How_Tos/Calc: Functions listed by category| | + | * [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}} |
Revision as of 13:35, 25 February 2009
COMBINA
Returns the number of combinations of a subset of items.
Syntax:
COMBINA(n; k)
- n is the number of items in the set.
- k is the number of items to choose from the set.
- COMBINA returns the number of unique ways to choose these items, where the order of choosing is irrelevant, and repetition of items is allowed. For example if there are 3 items A, B and C in a set, you can choose 2 items in 6 different ways, namely AA, AB, AC, BB, BC and CC; you can choose 3 items in 10 different ways, namely AAA, AAB, AAC, ABB, ABC, ACC, BBB, BBC, BCC, CCC.
- COMBINA implements the formula:
- (n+k-1)!/(k!(n-1)!)
Example:
COMBINA(3,2)
- returns 6.
COMBINA(3,3)
- returns 10.