Saturday, September 13, 2008

Factorials as summation

The factorial function is defined as
n! = 1, if n = 0
= n(n-1)!, if n > 0
It is recursively defined using products.
It can also be expressed as a recursive summation
Let's see what 3! looks like
3! is simply 3 groups of 2 groups of 1
(1 + 1) +
(1 + 1) +
(1 + 1)
similarly 4! is 4 groups of 3 groups of 2 groups of 1 (I.e. four copies of the above)
((1 + 1) +
(1 + 1) +
(1 + 1) ) +
((1 + 1) +
(1 + 1) +
(1 + 1) ) +
((1 + 1) +
(1 + 1) +
(1 + 1) ) +
((1 + 1) +
(1 + 1) +
(1 + 1) )
Now we can visualize why factorials "grow" like crazy..(10! may take up an entire book)
"Why bats, Master Wayne?"
"Bats frighten me. It's time my enemies shared my dread."
-From Batman Begins

2 comments:

Anonymous said...

I actually did not understand what you were trying to convey!! :-?

Vivek.

Balagopal said...

Well, I've got to improve on my writing skills :). I think writing down factorials as summation helps to better visualize their fast growth rate.It's true or maybe it's just me :-).