[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-developer] Issue 336

From: Martin Rubey
Subject: Re: [Axiom-developer] Issue 336
Date: 18 Mar 2007 01:33:09 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

Ralf Hemmecke <address@hidden> writes:

> It seems that we all agree on
> (B1) binomial(r,k) = r(r-1)...(r-k+1)/(k!)
> for any complex r. (Actually it doesn't very much on the domain of r.
> Graham/Knuth/Patashnik in "Concrete Mathematics" extend it to
> (B2) binomial(r,k) = 0 for k < 0.
> With that extension also the addition formula (*) you stated above holds for
> all reals n and all integers k.

Thanks Ralf for pointing out this possibility. So, the answer to my question

> > is there a sensible definition of the binomial coefficient which disagrees
> > with the definition in terms of Gamma functions at certain values?

is simply "yes". So, how to go on now? We cannot check whether n in 


is negative... So that would suggest leaving binomial(n,n) unevaluated. I guess
that it shouldn't be too difficult for the *user* to tell axiom what to do with
it (either using eval or a rule), but might it break other packages?

Below is the list of places where binomial is used. Those which refer to the
definition in IntegerCombinatoricFunctions can be safely ignored. Although, the
first line of the definition there is

      n < 0 or m < 0 or m > n => 0

which is just Graham/Knuth/Patashnik...


crfp.spad:534:         maxi := max( nthRoot( locmax/(binomial(d,j)$ICF::R), j), 
crfp.spad:600:           cc := cc + coef.i * (binomial(i,j)$ICF :: R)
divisor.spad:333:      for i in 1..(n := binomial(nr, nc)) repeat
divisor.spad:347:        i <= (b := binomial(n - j, m)) =>
facutil.spad:114:       k:=binomial(n1,m)
galutil.spad:115:       binomial(n,r)$IntegerCombinatoricFunctions(Z) :: R
lodof.spad:107:         sz() := binomial(n, 
m)$IntegerCombinatoricFunctions(Integer) :: N
lodo.spad:143:            killer(u::P ** m, binomial(n + m - 1, n - 1)::N, 
[un], [a], diff)
mlift.spad:225:     k:=binomial(n1,m)
multsqfr.spad:355:     k:=binomial(n1,m)
odeef.spad:70:    localbinom(j, i) == (j > i => binomial(j, i+1); 0)
rep1.spad:227:         m      :   I   := binomial(n,k)$ICF
rep1.spad:258:       dim : NNI := (binomial(m+n-1,n)$ICF)::NNI
sgcf.spad:205:      n = 0 => binomial(m,cm)$ICF
sgcf.spad:278:      bin : I := binomial$ICF (n,m)
sgcf.spad:287:            if binomial$ICF (y,s) > mm then leave
sgcf.spad:289:         mm := mm - binomial$ICF (y-1,s)
special.spad:319:            cx := (-1)**m * binomial(ni,ni-mi) * factorial(ni)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]