From: Ben Bacarisse on 17 Jul 2010 10:38 Frederick Williams <frederick.williams2(a)tesco.net> writes: > mohangupta13 wrote: >> >> On Jul 15, 9:03 pm, S Perryman <a...(a)a.net> wrote: >> > Frederick Williams wrote: >> > > I have an array of 48 (ish) positive integers arranged in order of >> > > increasing magnitude without repetitions. I wish to create all >> > > 6-element sub-arrays maintaining the order. I think there are about 12 >> > > million of them. >> to me it seems about 43^6= abt 6.3 million (correct me if i am >> wrong ).. This is a very odd statement! Where does the 43 come from? 43^6 is about 6.3 billion (6,321,363,049) and 48^6 is 12,230,590,464 so the 6.3 million is a mystery. > I thought it was 48 choose 6 = 12271512. It is, but there is some cause for confusion in your phrase "ordered subsets" in the subject line. Sets (and thus subsets) are unordered so there is a hint that you might mean something special by saying "ordered subsets". Your text (quoted above) makes it clear that this is not the case, but it's probably wise to avoid the term "ordered subset". You are choosing six-element sets from a set with 48 elements and there are, as you say, 12,271,512 of them (the binomial coefficient <48,6>). The order does not matter to you until you name the elements. You can phrase condition you are looking for in terms of sets by saying "let's name the elements a, b, c, d, e and f with a > b > c > d > e > f...". -- Ben.
From: Frederick Williams on 17 Jul 2010 10:56 Ben Bacarisse wrote: > It is, but there is some cause for confusion in your phrase "ordered > subsets" in the subject line. Sets (and thus subsets) are unordered so > there is a hint that you might mean something special by saying "ordered > subsets". Your text (quoted above) makes it clear that this is not the > case, but it's probably wise to avoid the term "ordered subset". Good point. Each sextuplet is presented (by my code) in decreasing order because the first condition is A > B > C > D > E > F, but that is not really here nor there. -- I can't go on, I'll go on.
From: Tim Rentsch on 17 Jul 2010 11:48 Ben Bacarisse <ben.usenet(a)bsb.me.uk> writes: > Frederick Williams <frederick.williams2(a)tesco.net> writes: > >> mohangupta13 wrote: >>> >>> On Jul 15, 9:03 pm, S Perryman <a...(a)a.net> wrote: >>> > Frederick Williams wrote: >>> > > I have an array of 48 (ish) positive integers arranged in order of >>> > > increasing magnitude without repetitions. I wish to create all >>> > > 6-element sub-arrays maintaining the order. I think there are about 12 >>> > > million of them. >>> to me it seems about 43^6= abt 6.3 million (correct me if i am >>> wrong ).. > > This is a very odd statement! Where does the 43 come from? [snip] Perhaps 49 - 6? Just guessing. >> I thought it was 48 choose 6 = 12271512. > > It is, but there is some cause for confusion in your phrase "ordered > subsets" in the subject line. Sets (and thus subsets) are unordered so > there is a hint that you might mean something special by saying "ordered > subsets". Your text (quoted above) makes it clear that this is not the > case, but it's probably wise to avoid the term "ordered subset". > > You are choosing six-element sets from a set with 48 elements [snip]. Actually there are 49 primes for the particular problem.
From: Frederick Williams on 17 Jul 2010 14:33 Tim Rentsch wrote: > > Ben Bacarisse <ben.usenet(a)bsb.me.uk> writes: > > > Frederick Williams <frederick.williams2(a)tesco.net> writes: > > > >> mohangupta13 wrote: > >>> > >>> On Jul 15, 9:03 pm, S Perryman <a...(a)a.net> wrote: > >>> > Frederick Williams wrote: > >>> > > I have an array of 48 (ish) positive integers arranged in order of > >>> > > increasing magnitude without repetitions. I wish to create all > >>> > > 6-element sub-arrays maintaining the order. I think there are about 12 > >>> > > million of them. > >>> to me it seems about 43^6= abt 6.3 million (correct me if i am > >>> wrong ).. > > > > This is a very odd statement! Where does the 43 come from? [snip] > > Perhaps 49 - 6? Just guessing. > > >> I thought it was 48 choose 6 = 12271512. > > > > It is, but there is some cause for confusion in your phrase "ordered > > subsets" in the subject line. Sets (and thus subsets) are unordered so > > there is a hint that you might mean something special by saying "ordered > > subsets". Your text (quoted above) makes it clear that this is not the > > case, but it's probably wise to avoid the term "ordered subset". > > > > You are choosing six-element sets from a set with 48 elements [snip]. > > Actually there are 49 primes for the particular problem. Hence the parenthetical "ish" in my OP! In the course of running and debugging my code I found that there are, indeed, 49 primes. -- I can't go on, I'll go on.
First
|
Prev
|
Pages: 1 2 Prev: Generating ordered subsets of fixed size. Was Re: Algorithms? Next: Fuzzy Search / Input Rules |