Live data from Hacker News

Defining zero factorial

johndcook.com

21–30 of 36 posts

Re: Defining zero factorial

#21
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…

By that logic, (-1)! = 0!/0 = 1/0 = infinity, no?

Re: Defining zero factorial

#22
post #21
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…

By that logic, (-1)! = 0!/0 = 1/0 = infinity, no?

Well, nobody has ever said that 1/0 will get you infinity, because it won't. Interpreted directly, it's an illegal operation, and there is no result because the computation is impossible. Sure enough, the gamma function doesn't exist at nonpositive integers.

But wait! If you interpret 1/0 in a limit sense... there is no result, because there's no constraint that the neighborhood of 0 is entirely positive or entirely negative (obviously, the neighborhood of 1 is entirely positive). You'd only get an answer of "infinity" if you were limiting a function like "1 / 0^2".

Sure enough, we see that the gamma function has no limit at the nonpositive integers, always approaching positive infinity from one side and negative infinity from the other side. So the factorial of a negative integer doesn't exist. What point are you trying to make?

Re: Defining zero factorial

#23
post #21
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…

By that logic, (-1)! = 0!/0 = 1/0 = infinity, no?

Yep, it sure does. The magnitude of Gamma(x) grows without bound as x approaches any negative real integer. The negative integers (and the point at infinity) are also the only points where Gamma(x) has a singularity.

Re: Defining zero factorial

#25

Earlier quoted context omitted.

What you have shown is that the _limiting form_ 0^0 is not always equal to 1. The _value_ 0^0 is still equal to 1. Similarly, floor(−1/n) converges to −1, which tells us that the _limiting form_ floor(0) is not always equal to 0; but the _value_ floor(0) is still equal to 0. Nobody uses this to argue that the value of floor(0) should be undefined or context-dependent.

Because floor is a discontinuous function. But you are right, what I meant is there is no way to define 0^0 maintaining continuity of the power function. Why is this important? Because power is a continuous function otherwise.

Similarly, there is no way to define floor(n) for integers n maintaining continuity of the floor function, even though floor is a continuous function otherwise. We still define floor(n) = n because the meaning of the floor function is more important than its continuity. And so it is with exponentiation at (0, 0).

Re: Defining zero factorial

#26
post #21

Earlier quoted context omitted.

By that logic, (-1)! = 0!/0 = 1/0 = infinity, no?

Well, nobody has ever said that 1/0 will get you infinity, because it won't. Interpreted directly, it's an illegal operation, and there is no result because the computation is impossible. Sure enough, the gamma function doesn't exist at nonpositive integers. But wait! If you interpret 1/0 in a limit sense... there is no result, because there's no constraint that the neighborhood of 0 is entirely positive or entirely…

> Sure enough, we see that the gamma function has no limit at > the nonpositive integers, always approaching positive > infinity from one side and negative infinity from the other side.

On the complex plane, there is more than one side to approach from. And the convention that was used when I learned complex analysis (stereographic projection), is that there is only one value of infinity, which can be approached from many directions. Under this model, the point at infinity is much better-behaved than the points at infinity in real analysis.

The Gamma function is characterized as having poles at the negative integers. That's a very straightforward description, and the behavior is well-understood and relatively easy to deal with. Certainly easier to deal with than the value of e^-x as x->0 (that singularity is essential, rather than a pole).

Re: Defining zero factorial

#27
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.

The way I know P!=NP is that N=(P-1)! Of course P=NP if P=0 or N=1. So who knows. :)

Re: Defining zero factorial

#28
I tried to fit a simpler function to the (logarithm of) factorial function with symbolic regression: http://i.imgur.com/9UJCDxT.png?1 They all seem to fit it fairly well, and they all suggest that 0! should be close to one.

This is hardly rigorous mathematics, but I find it interesting that it should converge to the same prediction, when I gave it no bias that it should be that way.

Re: Defining zero factorial

#29

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.

That's just because we need to define the set more gracefully: "n! is the product of the first n natural numbers".

The negative factorial issue arises from a slightly awkward specification of the set, not from jameshart's core idea.

Re: Defining zero factorial

#30

I tried to fit a simpler function to the (logarithm of) factorial function with symbolic regression: http://i.imgur.com/9UJCDxT.png?1 They all seem to fit it fairly well, and they all suggest that 0! should be close to one. This is hardly rigorous mathematics, but I find it interesting that it should converge to the same prediction, when I gave it no bias that it should be that way.

Interesting! What software is that?
Post reply on HN