Live data from Hacker News

Defining zero factorial

johndcook.com

1–10 of 36 posts

Re: Defining zero factorial

#2
0! Is whatever makes sense in context, like any other defintion.

Arguing about what it should be "in general" is treating math like reality television, and it makes you dumber.

O! Isn't a big controversy, but the idiocy surrounding O^0 (which is usefully different in combinatorics vs in analysis) is mind-boggling.

Re: Defining zero factorial

#3
In school it was explained through combinatorics, where the factorial among others tells, in how many ways you can order your set. And an empty set has just one, but it has one, order in which it can be arranged. Now that I am writing this, I'm losing confidence, that this explanation is mathematically correct..

Re: Defining zero factorial

#4

In school it was explained through combinatorics, where the factorial among others tells, in how many ways you can order your set. And an empty set has just one, but it has one, order in which it can be arranged. Now that I am writing this, I'm losing confidence, that this explanation is mathematically correct..

That is the usual explanation, but I don't think that helps much since counting the number of ways to arrange nothing is confusing!

Re: Defining zero factorial

#6

Isn't it just a special case of the idea that the product of an empty sequence is 1?

Almost, but not quite. You could say "n! is the product of the natural numbers However, this same reasoning would say (-1)! = 1, (-2)! = 1, etc. And while you could define negative factorials that way, it's better in practice to leave negative factorials undefined.

Re: Defining zero factorial

#7
How would you find (n-1)! given n!? (Think for a moment before moving on.)

Dividing by n of course, (n-1)!=n!/n. This immediately extends the notion of factorials backwards to 0!=1!/1.

It's only a matter of checking to see which factorial-dependent formula (usually arising in context of combinatorics, or gamma function) fits - and it turns out (luckily) that everything fits.

Edit: Even if it tuned out some things don't fit, we would still be free to define 0! as 1 as a convention. But the fact that everything fits, makes it a useful definition - prevents you from checking a lot of edge cases, eliminating the need of many ``if (k==0) ...`` from codes.

Re: Defining zero factorial

#9
post #7

How would you find (n-1)! given n!? (Think for a moment before moving on.) Dividing by n of course, (n-1)!=n!/n. This immediately extends the notion of factorials backwards to 0!=1!/1. It's only a matter of checking to see which factorial-dependent formula (usually arising in context of combinatorics, or gamma function) fits - and it turns out (luckily) that everything fits. Edit: Even if it tuned out some things don…

For a second there it looked like you were saying that (n-1) does not equal n!/n.

Re: Defining zero factorial

#10

See also Emil Artin's elegant pamphlet, "The Gamma Function".

It's awesome and weird that there's a consistent and useful function that lets you define an equivalent to (-1/2)! -- and that what you get is the square root of pi.
Post reply on HN