Last Updated on

The formula for “choosing ‘k’ permutations from a set of ‘n’ elements’ = P(n, k) = (n!)/( (n-k)! ). For set ‘C’, this was 3!/1! = 6/1 = 6.

Finally for this section, the number of “k-subsets” also is calculated with factorials. This is the problem for combining selected elements but without regard to permuting them into various sequences. From set ‘C’ above, the three 2-subsets are {a,b}, {a,c}, {b,c}.

The formula for combining or “choosing” k-subsets is usually shown in the above image, where C(n, k) = (n!)/( k! * (n-k)! ).

These concepts and formulas are useful in discrete probabilty theory, where one must determine the proportion of items that might be selected versus all the combinations that could be chosen.

## Extending the Factorial Beyond Positive Integers

The first and simplest extension is to define “zero factorial” = 0! = 1, for the reason that there is *exactly one way to arrange zero objects*. In other words, the empty set, {}, has exactly that one permutation.

The gamma function **for positive integers** is defined as Γ(n) = (n-1)!. This is *not* an extension of the factorial function, but simply defines part of the gamma function in terms of factorials.

The gamma function may be extended to all positive Real numbers by defining it as the smooth line that fits the points defined by the factorials of positive integers. This integration function plots a smooth curve that joins the (n, n!) points on the Cartesian plane for ( x > zero, Γ(x) ) in the Real numbers. Note the U-shaped curve in the upper right quadrant of the plot. In the integration version of the gamma function, ‘e’ is the base of natural logarithms, with a value of approximately 2.718.

Finally, the general gamma function extends to negative Real numbers and complex numbers. (Complex numbers have the form “z = x + iy”, where ‘z’ is Complex, ‘x’ and ‘y’ are Real, and ‘i’ is the square root of -1). The value of the integral function approaches infinity as the argument approaches each negative integer. Γ(x) never has the value zero.

Another equation defining the gamma function is Γ(x) = (x-1) * Γ(x-1), which is more reminiscent of the recursive definition of the factorial function on positive integers.

The gamma function has applications in probability and statistics, particularly when dealing with continous variables. However, any further discussion about the gamma function will be deferred for much later articles.

## A Future for Factorials in Decoded Science

We will also put an exclamation point on factorials through topics in permutations, combinations, and probability, as well as practical applications of each. To whet your appetite, one application of factorials is to calculate how many different bingo cards are required for a complete set.

**References**:

Weisstein, E. W. *Factorial; k-Subset; Permutation*. MathWorld-A Wolfram Web Resource. (1999-2012). Accessed August 8, 2012.

Decoding Science. One article at a time.