Binomial Coefficients are inconsistent with Partition Coefficients

asked 2015-07-31 14:18:25 +0200

Peter Luschny gravatar image

In Sage:

binomial(-1,-1) = 0

I have complaint about this before: ask-sage and proposed the natural binomial(x,x) = 1 for all x.

I discussed the arguments in detail at sagemath-track where I opened a ticket.

One answer was: "Having binomial(z, z) != 1 is collateral damage."

There is also the damage of inconsistency.

For me inconsistency is what this code shows:

PartitionCoefficient = lambda p: mul(binomial(p[j], p[j+1]) for j in range(len(p)-1))
for n in (0..6):
    for k in (0..n):
        P = Partitions(n, max_part=k, inner=[k])
        print sum(PartitionCoefficient(p) for p in P), binomial(n-1,k-1)  

1 0
0 0
1 1
0 0
1 1
1 1
0 0
1 1
2 2
1 1
0 0
1 1
3 3
3 3
1 1
0 0
1 1
4 4
6 6
4 4
1 1
0 0
1 1
5 5
10 10
10 10
5 5
1 1

Another said: "Apparently Maple and Mathematica use the proposed version. Is that sufficient justification to change our version?"

Question: Is the internal consistency of Sage enough justification?

edit retag flag offensive close merge delete

Comments

1

I think that the sage-devel Google group is the right place to discuss this. The ask.sagemath.org website doesn't get enough traffic to have a good discussion.

John Palmieri gravatar imageJohn Palmieri ( 2015-07-31 16:40:25 +0200 )edit

gp gives

? binomial(-1,-1)
0
vdelecroix gravatar imagevdelecroix ( 2015-08-09 12:20:41 +0200 )edit

Yeah, I think this one really depends a lot upon what (or whether there is) a consensus in this field is. Is this a case of Zero factorial = 1, or of zero to the zero = 1 (even the latter there is sort of a consensus in computers, but not as broad as factorial/gamma).

kcrisman gravatar imagekcrisman ( 2015-08-14 16:04:10 +0200 )edit