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 large n, rate of, rate, growth and/or large:

    “The newspapers, especially those in the East, are amazingly superficial and ... a large number of news gatherers are either cynics at heart or are following the orders and the policies of the owners of their papers.”
    —Franklin D. Roosevelt (1882–1945)

    “We all run on two clocks. One is the outside clock, which ticks away our decades and brings us ceaselessly to the dry season. The other is the inside clock, where you are your own timekeeper and determine your own chronology, your own internal weather and your own rate of living. Sometimes the inner clock runs itself out long before the outer one, and you see a dead man going through the motions of living.”
    —Max Lerner (b. 1902)

    “We honor motherhood with glowing sentimentality, but we don’t rate it high on the scale of creative occupations.”
    —Leontine Young (20th century)

    “Those who have been immersed in the tragedy of massive death during wartime, and who have faced it squarely, never allowing their senses and feelings to become numbed and indifferent, have emerged from their experiences with growth and humanness greater than that achieved through almost any other means.”
    —Elisabeth Kübler-Ross (b. 1926)

    “Private information is practically the source of every large modern fortune.”
    —Oscar Wilde (1854–1900)