Combination()

 <  Day Day Up  >  

Combination()

Category: Number

Syntax: Combination ( setSize ; numberOfChoices )

Parameters: setSize ”any expression that returns a non-negative numeric value; numberOfChoices ”any expression that returns a non-negative numeric value.

Description: Returns the number of ways to uniquely choose numberOfChoices items from a set of size setSize .

The values returned by this function are referred to as combination coefficients . They form Pascal's triangle. This function is useful in statistics, combinatorics, and polynomial expansions.

The formula used to determine the Combination value is n! / (n-x)! * x! , where n = set size, x = number of choices.

Examples :

 

 Combination ( 4 ; 2 ) 

Returns 6 , because there are 6 ways of selecting 2 items from a set of 4 items. Given set { A, B, C, D} , these subsets would be { AB, AC, AD, BC, BD, CD}.

 

 Combination ( x ; 0 ) 

Returns 1 for any x, representing the empty set.

 

 Combination ( x ; x ) 

Returns 1 for any x.

 

 (13 * 12 * Combination(4;2) * Combination(4;3)) / Combination(52;5) 

Returns 0.00144057... , which is the probability of being dealt a full house in 5-card poker (less than a 1% chance).

Comments :

The numbers returned by the Combination function are the coefficients of the binomial expansion series. For instance,

 

 (x + y)  4  = 1x  4  + 4x  3  y + 6x  2  y  2  + 4xy  3  + 1y  4  Combination ( 4 ; 0 ) = 1 Combination ( 4 ; 1 ) = 4 Combination ( 4 ; 2 ) = 6 Combination ( 4 ; 3 ) = 4 Combination ( 4 ; 4 ) = 1 

 <  Day Day Up  >  


QUE CORPORATION - Using Filemaker pro X
QUE CORPORATION - Using Filemaker pro X
ISBN: N/A
EAN: N/A
Year: 2003
Pages: 494

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net