Subj : Re: Unique sets from {1..n} ? To : comp.programming From : Willem Date : Sun Jul 10 2005 08:36 am TC wrote: ) Hi Willem ) ) I am aware of the pattern! It was just the algorithym that defeated me. ) And I had not thought of using the bit pattern to select the items. I'm ) currently using that approach: ) ) for k = 1 to n ) for j=1 to 32(or whatever) ) if bit j=1, add item #j to set #k The two variables (j and k) don't loop to the right amounts. This algorithm won't work as such. (Except for a very specific value for n, which I doubt you had in mind.) ) But I will look at the other suggested approaches as well. Good idea. ^_^ SaSW, Willem -- Disclaimer: I am in no way responsible for any of the statements made in the above text. For all I know I might be drugged or something.. No I'm not paranoid. You all think I'm paranoid, don't you ! #EOT .