From: Baskin, Robert <RBaskin_at_ahrq.gov>

Date: Wed 14 Jul 2004 - 06:12:46 EST

R-help@stat.math.ethz.ch mailing list

https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!

http://www.R-project.org/posting-guide.html

R-help@stat.math.ethz.ch mailing list

https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Jul 14 06:26:08 2004

Date: Wed 14 Jul 2004 - 06:12:46 EST

I may be confused, but I think what you described will produce greater than
472 million permutations. I think your second permutation <1 2 4 | 3 5 6 |
7 8 9 | 10 11 12 YES-----2nd permutation> shows that you want more than
just a permutation of entire blocks.

There are a total of 12! (12 factorial) permutations of 1:12 ignoring your blocking restriction.

There are 3! * 9! Permutations in which the first block has an intrablock permutation and the rest of the 9 symbols can do anything. Since there are 4 blocks then there are fewer than 4 * 3! * 9! permutations with intra-block transfers (this 4*3!*9! double counts some intrablock permutations - you need to take out of the 9! the count of intra-block only permutations among the remaining 9 symbols: 3!*3!*3!).

This gives more than

12! - 4*3!*9! + 1 = 9!*[12*11*10 - 4*3*2*1] + 1 = 12*9![110 - 2] + 1 ~ 472
million permutations.

How could you possibly deal with all of these permutations? If you can deal with this much junk then maybe you can generate all 12! Permutations and take out the ones you don't want.

Sorry if I got it totally wrong

bob

-----Original Message-----

From: Jordi Altirriba Gutiérrez [mailto:altirriba@hotmail.com]
Sent: Tuesday, July 13, 2004 3:07 PM

To: r-help@stat.math.ethz.ch

Subject: [R] Permutations

1 2 3 | 4 5 6 | 7 8 9 | 10 11 12 ----------1st permutation

1 3 2 | 4 5 6 | 7 8 9 | 10 11 12 NO

Thanks for your time,

Jordi Altirriba

Ph D student

Hospital Clinic - Barcelona - Spain

MSN Motor. http://motor.msn.es/researchcentre/

R-help@stat.math.ethz.ch mailing list

https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!

http://www.R-project.org/posting-guide.html

R-help@stat.math.ethz.ch mailing list

https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Jul 14 06:26:08 2004

*
This archive was generated by hypermail 2.1.8
: Wed 03 Nov 2004 - 22:54:56 EST
*