# The value of binomial(-1,-1) is?

Maple says 1, Mathematica says 1, Sage says 0 (at least in the version installed on SMC).

Peter

edit retag close merge delete

The doc says "If m < 0, return 0."

( 2014-10-07 17:38:57 +0200 )edit

Yes. binomial(n,k) is often defined only for n>=0, k>=0, and otherwise set to 0. The result is in accordance with this definition. But is this restriction adequate for a system like Sage? I do not think so. In this sense I feel it is a bug.

( 2014-10-07 23:59:13 +0200 )edit

An important example is binomial(n-1, k-1), an expression which arises in many combinatorial formulas. The Sage-definition prevents the right extension of all these formulas to (n,k) = (0,0). I could point at such cases in the OEIS where in consequence Maple and Mathematica compute different results compared to Sage, a very unsatisfactory situation.

( 2014-10-08 00:15:52 +0200 )edit

Magma says 0.

( 2014-10-08 20:26:17 +0200 )edit

Sort by » oldest newest most voted

I think that Mathematica says that binomial(-1, 0) is 1, as is binomial(-1, -1). (They may be taking their extension to negative entries from http://arxiv.org/pdf/1105.3689.pdf?) So if I'm right, then the identity

binomial(n,k) + binomial(n, k+1) = binomial(n+1, k+1)


fails when n=-1, k=-1. Sage seems to use a different convention so that this identity is preserved, or at least that's my guess as to what's going on:

sage: binomial(-1, -1)
0
sage: binomial(-1, 0)
1
sage: binomial(-1, -1) + binomial(-1, 0) == binomial(0, 0)
True

more

Set binomial(n,r) = limit(gamma(n+t+1)/(gamma(r+1)*gamma(n+t-r+1)), t=0). By symmetry binomial(-1,-1)= binomial(-1,0). Substituting n=-1, r=0 we get limit(gamma(t)/(gamma(1)*gamma(t)), t = 0) which is 1.

( 2014-10-08 00:53:41 +0200 )edit

Yes, but my point was exactly that there are several choices about how to define binomial coefficients sensibly for negative numbers. This limit involving Gamma functions is one of them, but not the only one.

( 2014-10-08 02:55:48 +0200 )edit

Whatever the convention is, a convention which violates the symmetry relation binomial (n, k) = binomial (n, n - k) (here binomial(-1,-1) = binomial(-1,0)) is not acceptable.

( 2014-10-08 09:08:38 +0200 )edit

I would say the same about the relation binomial(n,k)+binomial(n,k+1)=binomial(n+1,k+1).

( 2014-10-08 16:25:32 +0200 )edit

OK, at this point we have to stop arguing and start afresh giving first a definition of binomial(n,k) for negative integers n, k. After reading Kronenburg (thanks for the reference!) I for my part take his theorem 2.1 as the definition. And I am very happy that than binomial(-1,-1) turns out to be 1. (As a side note: Somehow the discussion is similar to what the value of 0^0 is. My experience shows me that things work better out when binomial(-1,-1) and 0^0 have the same value. And 0^0 is 1, isn't it?)

( 2014-10-09 10:20:41 +0200 )edit