Subj : Unique sets from {1..n} ? To : comp.programming From : TC Date : Fri Jul 08 2005 01:29 am Hi folks Apologies if this has been answered before. I've googled in various places & have not found it yet. I need to generate every unique set of numbers, of the integer numbers 1 thru n inclusive. Eg. if n=3 (to take a small example), I need to generate the 7 unique sets: {1} {2} {3} {1,2} {2,3} {1,3} {1,2,3} Does anyone have a simple, doubtless recursive, pseudocode algorithym for this? I should be able to do it myself, but I seem to be having a dumb attack :-( TIA, TC .