Re: [Jprogramming] permutation list

2012-06-26 Thread Linda Alvord
tware.com] On Behalf Of Linda Alvord Sent: Wednesday, June 27, 2012 1:26 AM To: 'Programming forum' Subject: Re: [Jprogramming] permutation list I seem to know a little more J than I did 10 years ago, so here is a little cleaner way to get the combinations. It is still slow and won

Re: [Jprogramming] permutation list

2012-06-26 Thread Linda Alvord
-Original Message- From: programming-boun...@jsoftware.com [mailto:programming-boun...@jsoftware.com] On Behalf Of Henry Rich Sent: Tuesday, June 26, 2012 9:17 PM To: Programming forum Subject: Re: [Jprogramming] permutation list Take the time to ponder R. E. Boss's version (in the Wiki). It is beaut

Re: [Jprogramming] permutation list

2012-06-26 Thread ed bierly
> Linda > > > > > > -Original Message- > > From: programming-boun...@jsoftware.com > > [mailto:programming-boun...@jsoftware.com] On Behalf Of bob therriault > > Sent: Tuesday, June 26, 2012 3:02 PM > > To: Programming forum > > Subjec

Re: [Jprogramming] permutation list

2012-06-26 Thread Linda Alvord
-boun...@jsoftware.com] On Behalf Of Henry Rich Sent: Tuesday, June 26, 2012 9:17 PM To: Programming forum Subject: Re: [Jprogramming] permutation list Take the time to ponder R. E. Boss's version (in the Wiki). It is beautiful, and I have tried without success to make any improvement. $ 12

Re: [Jprogramming] permutation list

2012-06-26 Thread Henry Rich
cr) $ [: i. ] > $4 comb 10 > 4 210 > > It might take a little time to remember what I did. > > Linda > > > -Original Message- > From: programming-boun...@jsoftware.com > [mailto:programming-boun...@jsoftware.com] On Behalf Of bob therriault > Sent: T

Re: [Jprogramming] permutation list

2012-06-26 Thread Linda Alvord
- From: programming-boun...@jsoftware.com [mailto:programming-boun...@jsoftware.com] On Behalf Of Linda Alvord Sent: Tuesday, June 26, 2012 8:54 PM To: 'Programming forum' Subject: Re: [Jprogramming] permutation list I wrote a book called "Probability in APL" many years ago. Whe

Re: [Jprogramming] permutation list

2012-06-26 Thread Linda Alvord
2 PM To: Programming forum Subject: Re: [Jprogramming] permutation list Raul, I don't think that there is a 1-1 correspondence between combinations and permutations, since each combination of items can have a number of different permutations. In the example you give the number of items is the sa

Re: [Jprogramming] permutation list

2012-06-26 Thread Tirrell, Jordan (Consultant)
do in J? I know I've encountered several of them before, but it might be nice to try to write them all out. -Original Message- From: programming-boun...@jsoftware.com [mailto:programming-boun...@jsoftware.com] On Behalf Of Devon McCormick Sent: Tuesday, June 26, 2012 3:54 PM To: Program

Re: [Jprogramming] permutation list

2012-06-26 Thread Devon McCormick
way to define it, but this is how perm should > behave if it were used dyadically. > > > > -Original Message- > From: programming-boun...@jsoftware.com > [mailto:programming-boun...@jsoftware.com] On Behalf Of bob therriault > Sent: Tuesday, June 26, 2012 3:02 PM >

Re: [Jprogramming] permutation list

2012-06-26 Thread Raul Miller
On Tue, Jun 26, 2012 at 3:37 PM, Tirrell, Jordan (Consultant) wrote: > I'm sure there is a better way to define it, but this is how perm should > behave if it were used dyadically. Yes, I should have been paying closer attention. Thanks, -- Raul ---

Re: [Jprogramming] permutation list

2012-06-26 Thread Tirrell, Jordan (Consultant)
mming-boun...@jsoftware.com] On Behalf Of bob therriault Sent: Tuesday, June 26, 2012 3:02 PM To: Programming forum Subject: Re: [Jprogramming] permutation list Raul, I don't think that there is a 1-1 correspondence between combinations and permutations, since each combination of items can h

Re: [Jprogramming] permutation list

2012-06-26 Thread Tirrell, Jordan (Consultant)
consequence of the intended monadic definition. -Original Message- From: programming-boun...@jsoftware.com [mailto:programming-boun...@jsoftware.com] On Behalf Of Raul Miller Sent: Tuesday, June 26, 2012 2:14 PM To: Programming forum Subject: Re: [Jprogramming] permutation list They

Re: [Jprogramming] permutation list

2012-06-26 Thread bob therriault
Raul, I don't think that there is a 1-1 correspondence between combinations and permutations, since each combination of items can have a number of different permutations. In the example you give the number of items is the same because the difference in the two arguments is 1, but this would not

Re: [Jprogramming] permutation list

2012-06-26 Thread Raul Miller
They are certainly different. 2 comb 3 0 1 0 2 1 2 2 perm 3 0 1 2 0 2 1 1 0 2 In general, for n of m permutations and n of m combinations, the permutations are going to be longer (length m instead of length n). But the number of distinct items will be the same. -- Raul On Tue, Jun 26, 2

Re: [Jprogramming] permutation list

2012-06-26 Thread Devon McCormick
I thought that in the usual mathematical definition, combinations and permutations differ: for permutations, order matters; for combinations, it does not. Under this definition, the combinations of 3 things is just " i. 3 " - assuming we don't allow replacement? If we do allow replacement, the pe

Re: [Jprogramming] permutation list

2012-06-26 Thread Raul Miller
Note that the number of combinations and the number of permutions are the same. And, perm is just: ! A.&i. ] It seems like there ought to be a way of putting the permutations in 1 to 1 correspondence with the combinations (to give us a concise expression for combinations). -- Raul On Tue, Jun

Re: [Jprogramming] permutation list

2012-06-26 Thread ed bierly
yes combinations not permutations thought there might be a way that didn't loop thank you for the references On Tue, Jun 26, 2012 at 12:30 PM, R.E. Boss wrote: > 4 comb 10 > > > R.E. Boss > > > > -Oorspronkelijk bericht- > > Van: programming-boun...@jsoftware.com [mailto: > programming-b

Re: [Jprogramming] permutation list

2012-06-26 Thread R.E. Boss
4 comb 10 R.E. Boss > -Oorspronkelijk bericht- > Van: programming-boun...@jsoftware.com > [mailto:programming-boun...@jsoftware.com] Namens ed bierly > Verzonden: dinsdag 26 juni 2012 18:15 > Aan: programming@jsoftware.com > Onderwerp: [Jprogramming] permutation list > > what is the b

Re: [Jprogramming] permutation list

2012-06-26 Thread Raul Miller
This works in j6 require'stats' $ 4 perm 10 210 10 I think the require statement might have to change for j7. -- Raul On Tue, Jun 26, 2012 at 12:14 PM, ed bierly wrote: > what is the best way to get this list of 210 vectors? > > 4!10 > ---

Re: [Jprogramming] permutation list

2012-06-26 Thread Henry Rich
Go to http://www.jsoftware.com/jwiki/Essays/Combinations and use R. E. Boss's version, which appears just above the pretty pictures. This gives combinations, not permutations, but there are 210 of them. Henry Rich On 6/26/2012 12:14 PM, ed bierly wrote: > what is the best way to get this li