AI ALIGNMENT FORUM
AF

Wikitags

Factorial

Edited by michaelcohen, et al. last updated 15th Jul 2016

Factorial is most simply defined as a on positive . 5 factorial (written as 5!) means 1∗2∗3∗4∗5. In general then, for a positive integer n, n!=∏ni=1i. For applications to , it will also be useful to define 0!=1.

Applications to Combinatorics

n! is the number of possible orders for a set of n objects. For example, if we arrange the letters A, B, and C, here are all the options: ABC ACB BAC BCA CAB CBA You can see that there are 6 possible orders for 3 objects, and 6=3∗2∗1=3!. Why does this work? We can . First, we'll see pretty easily that it works for 1 object, and then we can show that if it works for n objects, it will work for n+1. Here's the case for 1 object. A 1=1∏i=1i=1! Now we have the objects {A1,A2,...,An,An+1}, and n+1 slots to put them in. If An+1 is in the first slot, now we're ordering n remaining objects in n remaining slots, and by our , there are n! ways to do this. Now let's suppose An+1 is in the second slot. Any orderings that result from this will be completely unique from the orderings where An+1 was in the first slot. Again, there are n remaining slots, and n remaining objects to put in them, in an arbitrary order. There are another n! possible orderings. We can put An+1 in each slot, one by one, and generate another n! orderings, all of which are unique, and by the end, we will have every possible ordering. We know we haven't missed any because An+1 has to be somewhere. The total number of orderings we get is n!∗(n+1), which equals (n+1)!.

Extrapolating to

The factorial function can be defined in a different way so that it is defined for all real numbers (and in fact for complex numbers too).

Definition

We define x! as follows: x!=Γ(x+1), where Γ is the : Γ(x)=∫∞0tx−1e−tdt Why does this correspond to the factorial function as defined previously? We can prove by induction that for all positive integers x: x∏i=1i=∫∞0txe−tdt First, we verify for the case where x=1. Indeed: 1∏i=1i=∫∞0t1e−tdt 1=1 Now we suppose that the equality holds for a given x: x∏i=1i=∫∞0txe−tdt and try to prove that it holds for x+1: x+1∏i=1i=∫∞0tx+1e−tdt We'll start with the induction hypothesis, and manipulate until we get the equality for x+1. x∏i=1i=∫∞0txe−tdt (x+1)x∏i=1i=(x+1)∫∞0txe−tdt x+1∏i=1i=(x+1)∫∞0txe−tdt =0+∫∞0(x+1)txe−tdt =(−tx+1e−t)]∞0+∫∞0(x+1)txe−tdt =(−tx+1e−t)]∞0−∫∞0(x+1)tx(−e−t)dt By the product rule of integration: =∫∞0tx+1e−tdt This completes the proof by induction, and that's why we can define factorials in terms of the gamma function.

Parents:
6
6
function
combinatorics
prove this by induction
induction hypothesis
gamma function
Mathematics
integers
Discussion0
Discussion0
Real Numbers