Discussion:
(1 Combination 2) = 0 -- Better explanation?
(too old to reply)
HenHanna
2024-07-14 20:57:32 UTC
Permalink
Python says: (1 Combination 2) = 0

Ok... It's Impossible (to do).

------- is there a Better explanation?



(5 Combination 0) = 1 <---- This is explained by Comb(5,0)=Comb(5,5)

in general: Comb(N,r)=Comb(N,N-r)

_______________________________________

from math import comb

for i in range(6): print( comb(5,i) )

print( comb(1,2) )
Jeff Barnett
2024-07-15 03:44:30 UTC
Permalink
Python says:  (1 Combination 2) = 0
        Ok... It's Impossible (to do).
             ------- is there a Better explanation?
(5 Combination 0) = 1  <---- This is explained by  Comb(5,0)=Comb(5,5)
                                     in general:   Comb(N,r)=Comb(N,N-r)
_______________________________________
from math import comb
for i in range(6):      print( comb(5,i) )
print( comb(1,2)  )
Let combination of n things taken m at a time be represented by [n,m].
Then [n,m] = [n,n-m] as you correctly note above. Further, we have the
computational formula [n,m] = n!/(m!(n-m)!) where x! is simply x
factorial. So [1,2] = 1!/(2!((-1)!)), or 1/2 divided by (-1)!. However
factorial of a negative integer is, by convention, an
HenHanna
2024-07-15 18:49:39 UTC
Permalink
Post by Jeff Barnett
Python says:  (1 Combination 2) = 0
         Ok... It's Impossible (to do).
              ------- is there a Better explanation?
(5 Combination 0) = 1  <---- This is explained by  Comb(5,0)=Comb(5,5)
                                      in general:   Comb(N,r)=Comb(N,N-r)
_______________________________________
from math import comb
for i in range(6):      print( comb(5,i) )
print( comb(1,2)  )
Let combination of n things taken m at a time be represented by [n,m].
Then [n,m] = [n,n-m] as you correctly note above. Further, we have the
computational formula [n,m] = n!/(m!(n-m)!) where x!  is simply x
factorial. So [1,2] = 1!/(2!((-1)!)), or 1/2 divided by (-1)!. However
factorial of a negative integer is, by convention, an infinite value so
[1.2] = 0.
THank you...


Bard.Google.com says that

Comb(1,2) is not defined

factorial(-1) is not defined
factorial(-2) is not defined

GammaFunction(-1) is not defined
GammaFunction(-2) is not defined
Jeff Barnett
2024-07-15 22:20:54 UTC
Permalink
Post by HenHanna
Post by Jeff Barnett
Python says:  (1 Combination 2) = 0
         Ok... It's Impossible (to do).
              ------- is there a Better explanation?
(5 Combination 0) = 1  <---- This is explained by  Comb(5,0)=Comb(5,5)
Comb(N,r)=Comb(N,N-r)
_______________________________________
from math import comb
for i in range(6):      print( comb(5,i) )
print( comb(1,2)  )
Let combination of n things taken m at a time be represented by [n,m].
Then [n,m] = [n,n-m] as you correctly note above. Further, we have the
computational formula [n,m] = n!/(m!(n-m)!) where x!  is simply x
factorial. So [1,2] = 1!/(2!((-1)!)), or 1/2 divided by (-1)!. However
factorial of a negative integer is, by convention, an infinite value
so [1.2] = 0.
THank you...
 Bard.Google.com   says that
                    Comb(1,2) is not defined
                factorial(-1) is not defined
                factorial(-2) is not defined
            GammaFunction(-1) is not defined
            GammaFunction(-2) is not defined
They are partially correct. However, one can say that 1/0 = oo is
defined (where oo is infinity). In particular. 1/oo = 0 certainly makes
sense and that's all we need to accept for the above deductions.

Something I forgot to say in my original above is why x! = oo when x is
a negative integer. I cure that omission now. We want to define the
factorial as 1! = 1 and n! = n*(n-1)! when n > 1. We would also like to
be able to pedal backwards, i.e.. derive (n-1)! from n! and n. This is
certainly straightforward when n > 0. However the cases for other
integer n is trickier. For example, from our recursion formula we have
0! = 0*(-1)! and we know that (by definition) 0! =1. Thus, 1 = 0*(-1)!
which only has the possible symbolic solutions (-1)! = oo or -oo. Now a
trivial induction argument will draw the same conclusion for all
negative integers.

The importance of this bit of sophistry is our desire to do symbolic
manipulations with various classes of formulas without having to
numerically separate out a lot of special cases. Look at the above
definition of combination. With the established conventions, we have 1)
[n,n] = 1 and this can't work unless 0! = 1; 2) [n.0] = 1 which says
that the only o element subset of n elements is the empty set; etc.

It is a goal of mathematicians to make their definitions work not only
for the obvious cases but where there is darkness in our knowledge that
might be trivially illuminated by formulas that allow straightforward
consistent treatment throughout.
--
Jeff Barn
Ben Bacarisse
2024-07-16 11:35:33 UTC
Permalink
Post by HenHanna
Python says: (1 Combination 2) = 0
Ok... It's Impossible (to do).
------- is there a Better explanation?
JB has given you an explanation to do with generalising the algebraic
equations, but there are also simple explanations from first principles.
Post by HenHanna
(5 Combination 0) = 1 <---- This is explained by Comb(5,0)=Comb(5,5)
in general: Comb(N,r)=Comb(N,N-r)
I'll write |[5,0]| for this. In general |[n,m]| is the number of
m-element subsets of a typical set of n elements. So how many
zero-element subsets of such a set are there? Just 1. |[n,0]| = 1.

And how many 2-element subsets of a 1-element set are there? 0, so
|[1,2]| = 0.
--
Ben.
Loading...