• (1 Combination 2) = 0 -- Better explanation?

    From HenHanna@21:1/5 to All on Sun Jul 14 13:57:32 2024
    XPost: sci.math, sci.lang

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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jeff Barnett@21:1/5 to All on Sun Jul 14 21:44:30 2024
    XPost: sci.math, sci.lang

    T24gNy8xNC8yMDI0IDI6NTcgUE0sIEhlbkhhbm5hIHdyb3RlOg0KPiANCj4gUHl0aG9uIHNh eXM6wqAgKDEgQ29tYmluYXRpb24gMikgPSAwDQo+IA0KPiAgwqDCoMKgwqDCoMKgwqAgT2su Li4gSXQncyBJbXBvc3NpYmxlICh0byBkbykuDQo+IA0KPiAgwqDCoMKgwqDCoMKgwqDCoMKg wqDCoMKgIC0tLS0tLS0gaXMgdGhlcmUgYSBCZXR0ZXIgZXhwbGFuYXRpb24/DQo+IA0KPiAN Cj4gDQo+ICg1IENvbWJpbmF0aW9uIDApID0gMcKgIDwtLS0tIFRoaXMgaXMgZXhwbGFpbmVk IGJ5wqAgQ29tYig1LDApPUNvbWIoNSw1KQ0KPiANCj4gIMKgwqDCoMKgwqDCoMKgwqDCoMKg wqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoCBp biBnZW5lcmFsOsKgwqAgQ29tYihOLHIpPUNvbWIoTixOLXIpDQo+IA0KPiBfX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18NCj4gDQo+IGZyb20gbWF0aCBpbXBvcnQg Y29tYg0KPiANCj4gZm9yIGkgaW4gcmFuZ2UoNik6wqDCoMKgwqDCoCBwcmludCggY29tYig1 LGkpICkNCj4gDQo+IHByaW50KCBjb21iKDEsMinCoCApDQoNCkxldCBjb21iaW5hdGlvbiBv ZiBuIHRoaW5ncyB0YWtlbiBtIGF0IGEgdGltZSBiZSByZXByZXNlbnRlZCBieSBbbixtXS4g DQpUaGVuIFtuLG1dID0gW24sbi1tXSBhcyB5b3UgY29ycmVjdGx5IG5vdGUgYWJvdmUuIEZ1 cnRoZXIsIHdlIGhhdmUgdGhlIA0KY29tcHV0YXRpb25hbCBmb3JtdWxhIFtuLG1dID0gbiEv KG0hKG4tbSkhKSB3aGVyZSB4ISAgaXMgc2ltcGx5IHggDQpmYWN0b3JpYWwuIFNvIFsxLDJd ID0gMSEvKDIhKCgtMSkhKSksIG9yIDEvMiBkaXZpZGVkIGJ5ICgtMSkhLiBIb3dldmVyIA0K ZmFjdG9yaWFsIG9mIGEgbmVnYXRpdmUgaW50ZWdlciBpcywgYnkgY29udmVudGlvbiwgYW4g aW5maW5pdGUgdmFsdWUgc28gDQpbMS4yXSA9IDAuDQotLSANCkplZmYgQmFybmV0dA0KDQo=

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From HenHanna@21:1/5 to Jeff Barnett on Mon Jul 15 11:49:39 2024
    XPost: sci.math, sci.lang

    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jeff Barnett@21:1/5 to All on Mon Jul 15 16:20:54 2024
    XPost: sci.math, sci.lang

    T24gNy8xNS8yMDI0IDEyOjQ5IFBNLCBIZW5IYW5uYSB3cm90ZToNCj4gDQo+IE9uIDcvMTQv MjAyNCA4OjQ0IFBNLCBKZWZmIEJhcm5ldHQgd3JvdGU6DQo+PiBPbiA3LzE0LzIwMjQgMjo1 NyBQTSwgSGVuSGFubmEgd3JvdGU6DQo+Pj4NCj4+PiBQeXRob24gc2F5czrCoCAoMSBDb21i aW5hdGlvbiAyKSA9IDANCj4+Pg0KPj4+IMKgwqDCoMKgwqDCoMKgwqAgT2suLi4gSXQncyBJ bXBvc3NpYmxlICh0byBkbykuDQo+Pj4NCj4+PiDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDC oCAtLS0tLS0tIGlzIHRoZXJlIGEgQmV0dGVyIGV4cGxhbmF0aW9uPw0KPj4+DQo+Pj4NCj4+ Pg0KPj4+ICg1IENvbWJpbmF0aW9uIDApID0gMcKgIDwtLS0tIFRoaXMgaXMgZXhwbGFpbmVk IGJ5wqAgQ29tYig1LDApPUNvbWIoNSw1KQ0KPj4+DQo+Pj4gwqDCoMKgwqDCoMKgwqDCoMKg wqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKg wqAgaW4gZ2VuZXJhbDogICANCj4+PiBDb21iKE4scik9Q29tYihOLE4tcikNCj4+Pg0KPj4+ IF9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fXw0KPj4+DQo+Pj4gZnJv bSBtYXRoIGltcG9ydCBjb21iDQo+Pj4NCj4+PiBmb3IgaSBpbiByYW5nZ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Wxsb3cgc3RyYWlnaHRmb3J3 YXJkIA0KY29uc2lzdGVudCB0cmVhdG1lbnQgdGhyb3VnaG91dC4NCi0tIA0KSmVmZiBCYXJu ZXR0DQoNCg==

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ben Bacarisse@21:1/5 to HenHanna on Tue Jul 16 12:35:33 2024
    XPost: sci.math, sci.lang

    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)