I have forgotten

• https://me.yahoo.com
COST (GBP)
0.19
0.00
0

# falling factorial

Calculates the falling factorial with arguments \e x and \e n.
Controller: CodeCogs

C++
Excel

## Falling Factorial

 doublefalling_factorial( double x int n )
The falling factorial has the following formula

$[x]_n&space;=&space;\prod_{i&space;=&space;0}^{n&space;-&space;1}&space;(x&space;-&space;i)&space;=&space;x!&space;/&space;n!$

Note that the number of <em> injections </em> or 1-to-1 mappings from a set of n elements to a set of m elements is $\inline&space;&space;[m]_n$. The number of permutations of n objects out of m is $\inline&space;&space;[m]_n$. Moreover, the Stirling numbers of the first kind can be used to convert a falling factorial into a polynomial, as follows:

$[x]_n&space;=&space;\sum_{i&space;=&space;0}^n&space;S^i_n&space;x^i$

## Example:

#include <codecogs/maths/combinatorics/arithmetic/falling_factorial.h>
#include <iostream>
int main()
{
std::cout << Maths::Combinatorics::Arithmetic::falling_factorial(4, 2) << std::endl;
return 0;
}

## Output:

12

## References:

SUBSET, a C++ library of combinatorial routines, http://www.csit.fsu.edu/~burkardt/cpp_src/subset/subset.html

### Parameters

 x the first falling factorial argument n the second falling factorial argument

### Returns

the falling factorial of the pair of values x and n

### Authors

Lucian Bentea (August 2005)
##### Source Code

Source code is available when you agree to a GP Licence or buy a Commercial Licence.

Not a member, then Register with CodeCogs. Already a Member, then Login.