Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

Good news from afar can bring you a welcome visitor.


comp / comp.lang.python / (1 Combination 2) = 0 -- Better explanation?

SubjectAuthor
* (1 Combination 2) = 0 -- Better explanation?HenHanna
+* Re: (1 Combination 2) = 0 -- Better explanation?Jeff Barnett
|`* Re: (1 Combination 2) = 0 -- Better explanation?HenHanna
| `- Re: (1 Combination 2) = 0 -- Better explanation?Jeff Barnett
`- Re: (1 Combination 2) = 0 -- Better explanation?Ben Bacarisse

1
Subject: (1 Combination 2) = 0 -- Better explanation?
From: HenHanna
Newsgroups: comp.lang.python, sci.math, sci.lang
Organization: A noiseless patient Spider
Date: Sun, 14 Jul 2024 20:57 UTC
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: HenHanna@devnull.tb (HenHanna)
Newsgroups: comp.lang.python,sci.math,sci.lang
Subject: (1 Combination 2) = 0 -- Better explanation?
Date: Sun, 14 Jul 2024 13:57:32 -0700
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <v71e3t$a766$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 14 Jul 2024 22:57:33 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="0e7ae03f0cc37093a252887daea110a9";
logging-data="335046"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/nvyw6oonwIEZ0LPlO8xpAn5J4zFDG2KQ="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:uWzzGEK3dRlJh1+xQbtci/433qc=
Content-Language: en-US
View all headers

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) )

Subject: Re: (1 Combination 2) = 0 -- Better explanation?
From: Jeff Barnett
Newsgroups: comp.lang.python, sci.math, sci.lang
Organization: A noiseless patient Spider
Date: Mon, 15 Jul 2024 03:44 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jbb@notatt.com (Jeff Barnett)
Newsgroups: comp.lang.python,sci.math,sci.lang
Subject: Re: (1 Combination 2) = 0 -- Better explanation?
Date: Sun, 14 Jul 2024 21:44:30 -0600
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <v725uv$hnvc$1@dont-email.me>
References: <v71e3t$a766$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: base64
Injection-Date: Mon, 15 Jul 2024 05:44:32 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="b6215064fec34f01f575f0f2ca8731f0";
logging-data="581612"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Fm4+vSPBlQxcAUbraGb8VrFN7nIPmszw="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:1GScLz6lmVfdAPcCG9pUxOSjPEI=
X-Antivirus-Status: Clean
In-Reply-To: <v71e3t$a766$1@dont-email.me>
Content-Language: en-US
X-Antivirus: AVG (VPS 240714-8, 7/14/2024), Outbound message
View all headers

On 7/14/2024 2:57 PM, HenHanna wrote:
>
> 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.
--
Jeff Barnett

Subject: Re: (1 Combination 2) = 0 -- Better explanation?
From: HenHanna
Newsgroups: comp.lang.python, sci.math, sci.lang
Organization: A noiseless patient Spider
Date: Mon, 15 Jul 2024 18:49 UTC
References: 1 2
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: HenHanna@devnull.tb (HenHanna)
Newsgroups: comp.lang.python,sci.math,sci.lang
Subject: Re: (1 Combination 2) = 0 -- Better explanation?
Date: Mon, 15 Jul 2024 11:49:39 -0700
Organization: A noiseless patient Spider
Lines: 47
Message-ID: <v73r04$ql49$2@dont-email.me>
References: <v71e3t$a766$1@dont-email.me> <v725uv$hnvc$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 15 Jul 2024 20:49:41 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="9f40a81de22b763cca63bc8ade3e003e";
logging-data="873609"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19bqjt5aXxBRYHbUCZ8dHlFi+M/FnguBX0="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:htIucn9sc28nBbWijMyYPWJdnSE=
Content-Language: en-US
In-Reply-To: <v725uv$hnvc$1@dont-email.me>
View all headers

On 7/14/2024 8:44 PM, Jeff Barnett wrote:
> On 7/14/2024 2:57 PM, HenHanna wrote:
>>
>> 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

Subject: Re: (1 Combination 2) = 0 -- Better explanation?
From: Jeff Barnett
Newsgroups: comp.lang.python, sci.math, sci.lang
Organization: A noiseless patient Spider
Date: Mon, 15 Jul 2024 22:20 UTC
References: 1 2 3
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jbb@notatt.com (Jeff Barnett)
Newsgroups: comp.lang.python,sci.math,sci.lang
Subject: Re: (1 Combination 2) = 0 -- Better explanation?
Date: Mon, 15 Jul 2024 16:20:54 -0600
Organization: A noiseless patient Spider
Lines: 58
Message-ID: <v747c8$t5ch$1@dont-email.me>
References: <v71e3t$a766$1@dont-email.me> <v725uv$hnvc$1@dont-email.me>
<v73r04$ql49$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: base64
Injection-Date: Tue, 16 Jul 2024 00:20:57 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="41c4bf7145d6ba81ba82f94b681769d8";
logging-data="955793"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18L80ytLs9vCSil7XB3v2cn3iNmz7hY/K4="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:1KOaKG9wcwFPPijyDpqXE0fPONM=
X-Antivirus-Status: Clean
In-Reply-To: <v73r04$ql49$2@dont-email.me>
X-Antivirus: AVG (VPS 240715-6, 7/15/2024), Outbound message
Content-Language: en-US
View all headers

On 7/15/2024 12:49 PM, HenHanna wrote:
>
> On 7/14/2024 8:44 PM, Jeff Barnett wrote:
>> On 7/14/2024 2:57 PM, HenHanna wrote:
>>>
>>> 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
>
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 Barnett

Subject: Re: (1 Combination 2) = 0 -- Better explanation?
From: Ben Bacarisse
Newsgroups: comp.lang.python, sci.math, sci.lang
Organization: A noiseless patient Spider
Date: Tue, 16 Jul 2024 11:35 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ben@bsb.me.uk (Ben Bacarisse)
Newsgroups: comp.lang.python,sci.math,sci.lang
Subject: Re: (1 Combination 2) = 0 -- Better explanation?
Date: Tue, 16 Jul 2024 12:35:33 +0100
Organization: A noiseless patient Spider
Lines: 21
Message-ID: <87sew9in7e.fsf@bsb.me.uk>
References: <v71e3t$a766$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Date: Tue, 16 Jul 2024 13:35:37 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="7120799a18215770fdf36e332ede473d";
logging-data="1319572"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/auaLITo0A+jKoZLseKcZme5xPTq3tHuQ="
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:2BcOjecQckk1b7rSB1u+A1/1aOw=
sha1:5+Y986WWUvM+W6TKaWwnU3A9qwQ=
X-BSB-Auth: 1.498f6f0862c2fb9c83a4.20240716123533BST.87sew9in7e.fsf@bsb.me.uk
View all headers

HenHanna <HenHanna@devnull.tb> writes:

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

> (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.

1

rocksolid light 0.9.8
clearnet tor