Factorial - Rate of Growth and Approximations For Large N

Rate of Growth and Approximations For Large N

As n grows, the factorial n! increases faster than all polynomials and exponential functions (but slower than double exponential functions) in n.

Most approximations for n! are based on approximating its natural logarithm

The graph of the function f(n) = log n! is shown in the figure on the right. It looks approximately linear for all reasonable values of n, but this intuition is false. We get one of the simplest approximations for log n! by bounding the sum with an integral from above and below as follows:

which gives us the estimate

Hence log n! is Θ(n log n) (see Big O notation). This result plays a key role in the analysis of the computational complexity of sorting algorithms (see comparison sort). From the bounds on log n! deduced above we get that

It is sometimes practical to use weaker but simpler estimates. Using the above formula it is easily shown that for all n we have, and for all n ≥ 6 we have .

For large n we get a better estimate for the number n! using Stirling's approximation:

In fact, it can be proved that for all n we have

A much better approximation for log n! was given by Srinivasa Ramanujan (Ramanujan 1988)

\log n! \approx n\log n - n + \frac {\log(n(1+4n(1+2n)))} {6} + \frac {\log(\pi)} {2}
= n\log n - n + \frac {\log(1 +1/(2n) +1/(8n^2))} {6} + \frac {3\log (2n)} 6 + \frac {\log(\pi)} {2},

thus it is even better than the next correction term of Stirling's formula.

Read more about this topic:  Factorial

Famous quotes containing the words rate of, rate, growth and/or large:

    At this very moment,... the most frightful horrors are taking place in every corner of the world. People are being crushed, slashed, disembowelled, mangled; their dead bodies rot and their eyes decay with the rest. Screams of pain and fear go pulsing through the air at the rate of eleven hundred feet per second. After travelling for three seconds they are perfectly inaudible. These are distressing facts; but do we enjoy life any the less because of them? Most certainly we do not.
    Aldous Huxley (1894–1963)

    Writing a book I have found to be like building a house. A man forms a plan, and collects materials. He thinks he has enough to raise a large and stately edifice; but after he has arranged, compacted and polished, his work turns out to be a very small performance. The authour however like the builder, knows how much labour his work has cost him; and therefore estimates it at a higher rate than other people think it deserves,
    James Boswell (1740–1795)

    It is in the comprehension of the physically disabled, or disordered ... that we are behind our age.... sympathy as a fine art is backward in the growth of progress ...
    Elizabeth Stuart Phelps (1844–1911)

    I don’t think it is always necessary to take up the anti-colonial—or is it post- colonial?—cudgels against English. What seems to me to be happening is that those people who were once colonized by the language are now rapidly remaking it, domesticating it, becoming more and more relaxed about the way they use it—assisted by the English language’s enormous flexibility and size, they are carving out large territories for themselves within its frontiers.
    Salman Rushdie (b. 1948)