Combinatoric functions

<< Click to Display Table of Contents >>

Navigation:  Using GeNIe > Equation-based and hybrid models > Writing equations in GeNIe > Functions >

Combinatoric functions

Combin(n,k)

Returns the number of combinations of distinct k elements from among n elements, e.g., Combin(10,2)=45

Fact(n)

Returns the factorial of n, e.g., Fact(5)=5!=120

Fact() of a negative number returns 0.

FactDouble(n)

Returns the product of all even (when n is even) or all odd (when n is odd) numbers between 1 and n, e.g., FactDouble(5)=15, FactDouble(6)=48

FactDouble() of a negative number returns 0.

Multinomial(n1,n2,...)

Factorial of sum of arguments, divided by the factorials of all arguments, e.g., Multinomial(2,5,3)=Fact(2+5+3)/(Fact(2)*Fact(5)*Fact(3)=10!/(2!*5!*3!)=2520

All arguments of Multinomial() have to be positive.