From: Harry Ohlsen Date: 2001-05-27T11:10:05+09:00 Subject: [ruby-talk:15782] Subsets of a set I know that the Array class has a number of methods that make it usable for storing sets. What I need is a method that will allow me to generate all of the subsets of a given set that are a certain size. For example, if my set was { 1, 2, 3, 4 } then all the subsets of size 3 would be ... {1, 2, 3}, {1, 2, 4}, {2, 3, 4} It will need to be a recursive routine. I tried to write one, but only got as far as having it generate all sets of size 1 or the whole set. Has anyone done this before? If not, I'll just keep plugging away, but I figure it never hurts to ask! TIA Harry O.