Combinations / Sets of objects

1 reply · 2K views · last reply
arno100
Messages
1
Reaction score
0
Hi,

I am looking for a solution that generates combinations of objects from a series of objects in a set. For example, {Apple, Pear, Orange} should bring back
Apple
Pear
Orange
Apple, Pear
Apple, Pear, Orange,
Apple, Orange
...

Items in the series should not repeat (i.e. Apple, Orange / Orange, Apple should only appear once). Any online generators anybody can suggest? Or, material I can use to figure this out?

Many thanks
 
You forgot "Pear, Orange", the formula is 2^n with n is the number of elements in the set. Beware that 2^n also includes an empty set.